[ 2821646 ] Possible buffer overrun in amd_detect (MURANAKA Masaki)

git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1661 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 16 years ago
parent 47414f376c
commit 558247e218

@ -2,6 +2,8 @@
* src/flash/amd_flash.c: [ 2821629 ] Can't find flash_info : amd_flash.c
(MURANAKA Masaki)
* src/flash/amd_flash.c: [ 2821646 ] Possible buffer overrun in amd_detect
(MURANAKA Masaki)
* src/flash/flash.c, include/jtag.h:
[ 2816643 ] Matching arguments of funcion flasherase()

@ -157,8 +157,8 @@ int amd_detect(bus_t *bus, uint32_t adr, cfi_array_t **cfi_array )
if (!cfi->device_geometry.erase_block_regions)
return -2; /* out of memory */
cfi->device_geometry.erase_block_regions[i].erase_block_size = 64 * 1024;
cfi->device_geometry.erase_block_regions[i].number_of_erase_blocks = 8;
cfi->device_geometry.erase_block_regions[0].erase_block_size = 64 * 1024;
cfi->device_geometry.erase_block_regions[0].number_of_erase_blocks = 8;
//Add other details for info
}
return 0;

@ -2,6 +2,8 @@
* src/flash/amd_flash.c: [ 2821629 ] Can't find flash_info : amd_flash.c
(MURANAKA Masaki)
* src/flash/amd_flash.c: [ 2821646 ] Possible buffer overrun in amd_detect
(MURANAKA Masaki)
* src/flash/flash.c, include/urjtag/flash.h:
[ 2816643 ] Matching arguments of funcion flasherase()

@ -181,9 +181,9 @@ urj_flash_amd_detect (urj_bus_t *bus, uint32_t adr,
return URJ_STATUS_FAIL;
}
cfi->device_geometry.erase_block_regions[i].erase_block_size =
cfi->device_geometry.erase_block_regions[0].erase_block_size =
64 * 1024;
cfi->device_geometry.erase_block_regions[i].number_of_erase_blocks =
cfi->device_geometry.erase_block_regions[0].number_of_erase_blocks =
8;
//Add other details for info
}

Loading…
Cancel
Save