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

Address Coverity-reported issue

Check return value from read().
parent 93719595
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
......@@ -1082,7 +1082,8 @@ void sbbs_t::privchat(bool forced, int node_num)
lseek(in,0L,SEEK_SET);
ch=0;
utime(inpath,NULL);
(void)read(in,&ch,1);
if(read(in,&ch,1) != 1)
ch = 0;
(void)lseek(in,-1L,SEEK_CUR);
if(!ch) break; /* char from other node */
activity=1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment