Skip to content
Snippets Groups Projects
Commit 1f7cd77a authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Check return value of fread()

parent fb11866c
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4418 passed
...@@ -3717,7 +3717,9 @@ static void smtp_thread(void* arg) ...@@ -3717,7 +3717,9 @@ static void smtp_thread(void* arg)
subnum=INVALID_SUB; subnum=INVALID_SUB;
continue; continue;
} }
fread(msgbuf,(size_t)length,1,msgtxt); if(fread(msgbuf,(size_t)length,1,msgtxt) != 1)
*msgbuf = '\0';
else
msgbuf[length]=0; /* ASCIIZ */ msgbuf[length]=0; /* ASCIIZ */
/* Do external JavaScript processing here? */ /* Do external JavaScript processing here? */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment