mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-01-22 01:30:35 -05:00
nwztools/scsitool: fix out of buffer access
Change-Id: Ib2c25dd21d39fda026e008950a805f032c916a72
This commit is contained in:
parent
fbad457339
commit
9e94a5eadc
1 changed files with 2 additions and 3 deletions
|
|
@ -710,8 +710,8 @@ int get_dev_info(int argc, char **argv)
|
|||
(void) argc;
|
||||
(void )argv;
|
||||
uint8_t cdb[12] = {0xfc, 0, 0x20, 'd', 'b', 'm', 'n', 0, 0x80, 0, 0, 0};
|
||||
char buffer[80];
|
||||
int buffer_size = 0x80;
|
||||
char buffer[0x80];
|
||||
int buffer_size = sizeof(buffer);
|
||||
uint8_t sense[32];
|
||||
int sense_size = 32;
|
||||
|
||||
|
|
@ -724,7 +724,6 @@ int get_dev_info(int argc, char **argv)
|
|||
cprintf(GREY, "An error occured during request\n");
|
||||
return ret;
|
||||
}
|
||||
buffer[buffer_size] = 0;
|
||||
cprintf_field("Raw device info:", "\n");
|
||||
print_hex(buffer, buffer_size);
|
||||
// the 16 first bytes are 'DEVINFO', 0x80, followed by zeroes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue