mirror of
https://github.com/ipmitool/ipmitool.git
synced 2025-05-10 18:47:22 +00:00
Increase the data buffer size of raw packet data. Also avoid buffer
overflows with this data.
This commit is contained in:
parent
e4ba0c3de3
commit
0d72cd27cc
@ -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 <netfn> <cmd> [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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user