Diff of /libpe_utils/op_pe_utils.cpp [4b1497] .. [fb9529]  Maximize  Restore

Switch to side-by-side view

--- a/libpe_utils/op_pe_utils.cpp
+++ b/libpe_utils/op_pe_utils.cpp
@@ -484,7 +484,8 @@
 		pclose(fp);
 		event->evt_um = strtoull(mask, &endptr, 10);
 		if ((endptr >= mask) &&
-				(endptr <= (mask + strlen(mask) - 1))) {
+				(endptr <= (mask + strlen(mask) - 2))) { // '- 2' to account for linefeed and '\0'
+
 			// Must be a default named unit mask
 			strncpy(event->um_name, mask, OP_MAX_UM_NAME_LEN);
 			goto handle_named_um;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks