diff --git a/src/sbbs3/sbbsecho.c b/src/sbbs3/sbbsecho.c
index 0f422f3aea53e4d81d19e4b2942fefa21bc33540..9c8c6d895d87efa29f7cb5d5db084ce37f778747 100644
--- a/src/sbbs3/sbbsecho.c
+++ b/src/sbbs3/sbbsecho.c
@@ -3224,6 +3224,10 @@ char* getfmsg(FILE* stream, ulong* outlen)
 
 	length=0L;
 	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 */