diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-10-14 12:07:47 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-10-14 12:07:47 +0000 |
commit | eac291348da754aaa6630a3ac95b290bcd850243 (patch) | |
tree | be421b37de4c0448d77f51d01126ca942c8f5cd5 | |
parent | e4f64da35f8450f01044a80b27bba21641a68c21 (diff) | |
download | rockbox-eac291348da754aaa6630a3ac95b290bcd850243.tar.gz rockbox-eac291348da754aaa6630a3ac95b290bcd850243.zip |
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
-rw-r--r-- | utils/jz4740_tools/jz4740_usbtool.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/utils/jz4740_tools/jz4740_usbtool.c b/utils/jz4740_tools/jz4740_usbtool.c index 5f391b155e..42d3160a5e 100644 --- a/utils/jz4740_tools/jz4740_usbtool.c +++ b/utils/jz4740_tools/jz4740_usbtool.c | |||
@@ -420,8 +420,8 @@ int mimic_of(usb_dev_handle *dh, bool vx767) | |||
420 | { | 420 | { |
421 | int err, fsize; | 421 | int err, fsize; |
422 | unsigned char *buffer, *buffer2; | 422 | unsigned char *buffer, *buffer2; |
423 | char cpu[8]; | 423 | char cpu[9]; |
424 | 424 | ||
425 | fprintf(stderr, "[INFO] Start!\n"); | 425 | fprintf(stderr, "[INFO] Start!\n"); |
426 | _GET_CPU; | 426 | _GET_CPU; |
427 | _SET_ADDR(0x8000 << 16); | 427 | _SET_ADDR(0x8000 << 16); |