Synchronet now requires the libarchive development package (e.g. libarchive-dev on Debian-based Linux distros, libarchive.org for more info) to build successfully.

Commit 08f3f5c9 authored by Rob Swindell's avatar Rob Swindell 💬

Address Coverity-reported issue

Check return value from read().
parent 93719595
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment