Fix off-by-one buffer error
The _GET_CPU macro will write a terminating zero at cpu[8]. Detected by cppcheck git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30749 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e4f64da35f
commit
eac291348d
1 changed files with 2 additions and 2 deletions
|
@ -420,8 +420,8 @@ int mimic_of(usb_dev_handle *dh, bool vx767)
|
||||||
{
|
{
|
||||||
int err, fsize;
|
int err, fsize;
|
||||||
unsigned char *buffer, *buffer2;
|
unsigned char *buffer, *buffer2;
|
||||||
char cpu[8];
|
char cpu[9];
|
||||||
|
|
||||||
fprintf(stderr, "[INFO] Start!\n");
|
fprintf(stderr, "[INFO] Start!\n");
|
||||||
_GET_CPU;
|
_GET_CPU;
|
||||||
_SET_ADDR(0x8000 << 16);
|
_SET_ADDR(0x8000 << 16);
|
||||||
|
|
Loading…
Reference in a new issue