Skip to content
Snippets Groups Projects
Commit 379f9426 authored by rswindell's avatar rswindell
Browse files

Fix (new) potential dereference of NULL (top) pointer in writemsg(), reported

by Deuce. If 'top' is passed in as NULL, assign a blank string constant to it
since we dereference top a few places in this function and pass it to putmsg().
parent 211a2a1a
No related branches found
No related tags found
No related merge requests found
......@@ -233,6 +233,9 @@ bool sbbs_t::writemsg(const char *fname, const char *top, char *subj, long mode,
return false;
}
if(top == NULL)
top = "";
if(useron_xedit && !chk_ar(cfg.xedit[useron_xedit-1]->ar, &useron, &client))
useron_xedit = 0;
......
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