diff --git a/ipmitool/lib/ipmi_raw.c b/ipmitool/lib/ipmi_raw.c index 8db3f85..9d79c70 100644 --- a/ipmitool/lib/ipmi_raw.c +++ b/ipmitool/lib/ipmi_raw.c @@ -51,12 +51,18 @@ ipmi_raw_main(struct ipmi_intf * intf, int argc, char ** argv) struct ipmi_rq req; uint8_t netfn, cmd; int i; - uint8_t data[32]; + + uint8_t data[256]; if (argc < 2 || strncmp(argv[0], "help", 4) == 0) { lprintf(LOG_NOTICE, "RAW Commands: raw [data]"); return -1; } + else if (argc > sizeof(data)) + { + printf("Raw command input limit (%d bytes) exceeded\n", sizeof(data)); + return -1; + } netfn = (uint8_t)strtol(argv[0], NULL, 0); cmd = (uint8_t)strtol(argv[1], NULL, 0);