Subj : New Defects reported by Coverity Scan for Synchronet To : All From : scan-admin@coverity.com Date : Wed Jan 28 2026 01:46 pm ----==_mimepart_697a13306f491_cf6782d0dbe50d9a0894b Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan. 3 new defect(s) introduced to Synchronet found with Coverity Scan. New defect(s) Reported-by: Coverity Scan Showing 3 of 3 defect(s) ** CID 642982: (FORWARD_NULL) /prntfile.cpp: 263 in sbbs_t::printfile(const char *, int, int, JSObject *)() /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)() _____________________________________________________________________________________________ *** CID 642982: (FORWARD_NULL) /prntfile.cpp: 263 in sbbs_t::printfile(const char *, int, int, JSObject *)() 257 default: 258 case TERM_KEY_DOWN: 259 nextline = line + 1; 260 break; 261 } 262 if (nextline != line + 1 && nextline < lines) >>> CID 642982: (FORWARD_NULL) >>> Dereferencing null pointer "offset". 263 fseeko(stream, offset[nextline], 0); 264 line = nextline; 265 } 266 else 267 ++line; 268 } /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)() 222 else 223 nextline = line - (((term->rows - 1) * 2) - 1); 224 break; 225 case TERM_KEY_END: 226 { 227 bputs(text[SeekingFile]); >>> CID 642982: (FORWARD_NULL) >>> Dereferencing null pointer "offset". 228 fseeko(stream, offset[lines - 1], SEEK_SET); 229 if (fgets(buf, length + 1, stream) == NULL) 230 break; 231 off_t lastline = lines - 1; 232 while (!feof(stream) && !msgabort()) { 233 o = ftello(stream); ** CID 642981: Error handling issues (CHECKED_RETURN) /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)() _____________________________________________________________________________________________ *** CID 642981: Error handling issues (CHECKED_RETURN) /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)() 222 else 223 nextline = line - (((term->rows - 1) * 2) - 1); 224 break; 225 case TERM_KEY_END: 226 { 227 bputs(text[SeekingFile]); >>> CID 642981: Error handling issues (CHECKED_RETURN) >>> Calling "fseeko(stream, offset[lines - 1UL], 0)" without checking return value. This library function may fail and return an error code. 228 fseeko(stream, offset[lines - 1], SEEK_SET); 229 if (fgets(buf, length + 1, stream) == NULL) 230 break; 231 off_t lastline = lines - 1; 232 while (!feof(stream) && !msgabort()) { 233 o = ftello(stream); ** CID 642980: Integer handling issues (INTEGER_OVERFLOW) /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)() _____________________________________________________________________________________________ *** CID 642980: Integer handling issues (INTEGER_OVERFLOW) /prntfile.cpp: 228 in sbbs_t::printfile(const char *, int, int, JSObject *)() 222 else 223 nextline = line - (((term->rows - 1) * 2) - 1); 224 break; 225 case TERM_KEY_END: 226 { 227 bputs(text[SeekingFile]); >>> CID 642980: Integer handling issues (INTEGER_OVERFLOW) >>> Expression "lines - 1UL", where "lines" is known to be equal to 0, underflows the type of "lines - 1UL", which is type "unsigned long". 228 fseeko(stream, offset[lines - 1], SEEK_SET); 229 if (fgets(buf, length + 1, stream) == NULL) 230 break; 231 off_t lastline = lines - 1; 232 while (!feof(stream) && !msgabort()) { 233 o = ftello(stream); ________________________________________________________________________________________________________ To view the defects in Coverity Scan visit, https://scan.coverity.com/projects/synchronet?tab=overview ----==_mimepart_697a13306f491_cf6782d0dbe50d9a0894b Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit New Defects Reported - Synchronet

Hi,

Please find the latest report on new defect(s) introduced to Synchronet found with Coverity Scan.

Defect Details

** CID 642982:         (FORWARD_NULL)
/prntfile.cpp: 263           in sbbs_t::printfile(const char *, int, int, JSObject *)()
/prntfile.cpp: 228           in sbbs_t::printfile(const char *, int, int, JSObject *)()


_____________________________________________________________________________________________
*** CID 642982:           (FORWARD_NULL)
/prntfile.cpp: 263             in sbbs_t::printfile(const char *, int, int, JSObject *)()
257     					default:
258     					case TERM_KEY_DOWN:
259     						nextline = line + 1;
260     						break;
261     				}
262     				if (nextline != line + 1 && nextline < lines)
>>>     CID 642982:           (FORWARD_NULL)
>>>     Dereferencing null pointer "offset".
263     					fseeko(stream, offset[nextline], 0);
264     				line = nextline;
265     			}
266     			else
267     				++line;
268     		}
/prntfile.cpp: 228             in sbbs_t::printfile(const char *, int, int, JSObject *)()
222     						else
223     							nextline = line - (((term->rows - 1) * 2) - 1);
224     						break;
225     					case TERM_KEY_END:
226     					{
227     						bputs(text[SeekingFile]);
>>>     CID 642982:           (FORWARD_NULL)
>>>     Dereferencing null pointer "offset".
228     						fseeko(stream, offset[lines - 1], SEEK_SET);
229     						if (fgets(buf, length + 1, stream) == NULL)
230     							break;
231     						off_t lastline = lines - 1;
232     						while (!feof(stream) && !msgabort()) {
233     							o = ftello(stream);

** CID 642981:       Error handling issues  (CHECKED_RETURN)
/prntfile.cpp: 228           in sbbs_t::printfile(const char *, int, int, JSObject *)()


_____________________________________________________________________________________________
*** CID 642981:         Error handling issues  (CHECKED_RETURN)
/prntfile.cpp: 228             in sbbs_t::printfile(const char *, int, int, JSObject *)()
222     						else
223     							nextline = line - (((term->rows - 1) * 2) - 1);
224     						break;
225     					case TERM_KEY_END:
226     					{
227     						bputs(text[SeekingFile]);
>>>     CID 642981:         Error handling issues  (CHECKED_RETURN)
>>>     Calling "fseeko(stream, offset[lines - 1UL], 0)" without checking return value. This library function may fail and return an error code.
228     						fseeko(stream, offset[lines - 1], SEEK_SET);
229     						if (fgets(buf, length + 1, stream) == NULL)
230     							break;
231     						off_t lastline = lines - 1;
232     						while (!feof(stream) && !msgabort()) {
233     							o = ftello(stream);

** CID 642980:       Integer handling issues  (INTEGER_OVERFLOW)
/prntfile.cpp: 228           in sbbs_t::printfile(const char *, int, int, JSObject *)()


_____________________________________________________________________________________________
*** CID 642980:         Integer handling issues  (INTEGER_OVERFLOW)
/prntfile.cpp: 228             in sbbs_t::printfile(const char *, int, int, JSObject *)()
222     						else
223     							nextline = line - (((term->rows - 1) * 2) - 1);
224     						break;
225     					case TERM_KEY_END:
226     					{
227     						bputs(text[SeekingFile]);
>>>     CID 642980:         Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "lines - 1UL", where "lines" is known to be equal to 0, underflows the type of "lines - 1UL", which is type "unsigned long".
228     						fseeko(stream, offset[lines - 1], SEEK_SET);
229     						if (fgets(buf, length + 1, stream) == NULL)
230     							break;
231     						off_t lastline = lines - 1;
232     						while (!feof(stream) && !msgabort()) {
233     							o = ftello(stream);

  

View Defects in Coverity Scan

Best regards,

The Coverity Scan Admin Team

----==_mimepart_697a13306f491_cf6782d0dbe50d9a0894b-- .