Hi,
I hope I'm using the correct mailing list.
I just built libserialport on Windows 10 and while stepping through the
code I noticed a bug so I created the following patch:
--- serialport.c 2016-10-08 13:41:23.269484000 -0400
+++ serialport1.c 2016-10-08 13:43:10.958994300 -0400
@@ -459,8 +459,8 @@
char *escaped_port_name;
COMSTAT status;
- /* Prefix port name with '\\.\' to work with ports above COM9. */
- if (!(escaped_port_name = malloc(strlen(port->name) + 5)))
+ /* Prefix port name with '\\\\.\\' to work with ports above COM9. */
+ if (!(escaped_port_name = malloc(strlen(port->name) + 8)))
RETURN_ERROR(SP_ERR_MEM, "Escaped port name malloc failed");
sprintf(escaped_port_name, "\\\\.\\%s", port->name);
Gaitan
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
sigrok-devel mailing list
sigrok-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sigrok-devel