Update sfud.c

修复可能存在越界访问的问题
This commit is contained in:
HubretXie 2019-04-02 16:09:17 +08:00 committed by GitHub
parent dc2ee97e66
commit 24c9e8cb3f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -691,7 +691,7 @@ __exit:
static sfud_err aai_write(const sfud_flash *flash, uint32_t addr, size_t size, const uint8_t *data) { static sfud_err aai_write(const sfud_flash *flash, uint32_t addr, size_t size, const uint8_t *data) {
sfud_err result = SFUD_SUCCESS; sfud_err result = SFUD_SUCCESS;
const sfud_spi *spi = &flash->spi; const sfud_spi *spi = &flash->spi;
uint8_t cmd_data[6], cmd_size; uint8_t cmd_data[8], cmd_size;
bool first_write = true; bool first_write = true;
SFUD_ASSERT(flash); SFUD_ASSERT(flash);