Increase the data buffer size of raw packet data. Also avoid buffer

overflows with this data.
This commit is contained in:
Jeremy Ellington 2005-02-02 20:47:11 +00:00
parent e4ba0c3de3
commit 0d72cd27cc

View File

@ -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);