mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-26 00:55:19 +08:00
coverity somehow believes we read a long string from a file and the data isnt null terminated (i.e. last char is 0x00) so let see if a ugly + 1 will do the trick
This commit is contained in:
parent
fcde2978a8
commit
90d1fed1fa
1 changed files with 1 additions and 1 deletions
|
@ -286,7 +286,7 @@ int flash_load(flash_file_t *ctx, bool force) {
|
|||
goto fail;
|
||||
}
|
||||
|
||||
ctx->elf = calloc(fsize, sizeof(uint8_t));
|
||||
ctx->elf = calloc(fsize + 1, sizeof(uint8_t));
|
||||
if (!ctx->elf) {
|
||||
PrintAndLogEx(ERR, "Error, cannot allocate memory");
|
||||
res = PM3_EMALLOC;
|
||||
|
|
Loading…
Reference in a new issue