mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2026-10-23 00:03:09 +00: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:
1 parent
fcde2978a8
commit
90d1fed1fa
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user