Hi,
compiling freeipmi-0.8.2, GNU-C 4.4 gives a warning about a buffer
overflow in libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c at line
1487.
Looking more closely, there are a couple of duplicate lines due to a
copy-and-paste error.
Patch attached.
Enjoy,
Klaus
---
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
diff -wruN ../orig-freeipmi-0.8.2/libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c ./libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c
--- ../orig-freeipmi-0.8.2/libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c 2009-12-23 22:24:20.000000000 +0100
+++ ./libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c 2010-01-14 16:10:23.000000000 +0100
@@ -1481,14 +1481,6 @@
memcpy (stringbuf, string_block, string_block_length);
FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "string", stringbuf, IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX);
- /* achu: spec is not clear if this data should be 0 extended, we
- * will do it to be on the safe side
- */
- memset (stringbuf, '\0', IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX);
- if (string_block && string_block_length)
- memcpy (stringbuf, string_block, string_block_length);
- FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "string", stringbuf, IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX);
-
return (0);
}
_______________________________________________
Freeipmi-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/freeipmi-devel