mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07: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;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->elf = calloc(fsize, sizeof(uint8_t));
|
ctx->elf = calloc(fsize + 1, sizeof(uint8_t));
|
||||||
if (!ctx->elf) {
|
if (!ctx->elf) {
|
||||||
PrintAndLogEx(ERR, "Error, cannot allocate memory");
|
PrintAndLogEx(ERR, "Error, cannot allocate memory");
|
||||||
res = PM3_EMALLOC;
|
res = PM3_EMALLOC;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue