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

Commit 160606e4 authored by Rob Swindell's avatar Rob Swindell 💬

Print error and return NULL from getfmsg() upon ftell error

Caught by Coverity - ftell[o] can return negative.
parent d8f994cd
Pipeline #1394 passed with stage
in 11 minutes and 36 seconds
......@@ -3224,6 +3224,10 @@ char* getfmsg(FILE* stream, ulong* outlen)
start=ftello(stream); /* Beginning of Message */
if(start < 0) {
lprintf(LOG_ERR, "ERROR %d line %d getting file offset", errno, __LINE__);
return NULL;
while(1) {
ch=fgetc(stream); /* Look for Terminating NULL */
if(ch==0 || ch==EOF) /* Found end of message */
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