Vernon Mauery wants to merge 1 commit from /u/vmauery11/ipmitool/ to master, 2018-04-05
This increases the buffer size for outgoing and incoming packets so that the BMC does not overflow the buffer and cause ipmitool to segfault.
Commit | Date | |
---|---|---|
[d2e772]
(id_497_raw_command_buffer_size)
by
Vernon Mauery
ID:497 Raw command to allow responses larger than 256 bytes A full response (though not very likely) could be as large a a full UDP Signed-off-by: Vernon Mauery <vernon.mauery@...> |
2017-11-03 21:37:46 | Tree |
IPMI_BUF_SIZE is used in a lot of places. Increasing it to 64K will result in static allocation of 512K in ipmi_tsol.c, for example.
It looks to me like a more thorough refactoring of the code is required.
For instance, I'd go with dynamic allocation of the buffers (not just here, but everywhere) and would base their sizes on the maximum possible value for the relevant structure field size, using something like
#define MAX_VAL(t) ((typeof(t))(~((typeof(t))0)))
For the code in question that would be
ipmiv2_payload.payload_length
field.Anyway, I can't accept this pull request as-is.