Skip to content
Snippets Groups Projects
Commit 121ce679 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Safe string formatting of fido netmail time header field

Suppresses GCC warning. I suppose some of these fields could be more digits
than expected.
parent bfd364c8
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #3105 passed
......@@ -821,7 +821,7 @@ void sbbs_t::qwktonetmail(FILE *rep, char *block, char *into, uchar fromhub)
tm.tm_hour=((qwkbuf[16]&0xf)*10)+(qwkbuf[17]&0xf);
tm.tm_min=((qwkbuf[19]&0xf)*10)+(qwkbuf[20]&0xf); /* From QWK time */
tm.tm_sec=0;
sprintf(hdr.time,"%02u %3.3s %02u %02u:%02u:%02u" /* To FidoNet */
safe_snprintf(hdr.time, sizeof(hdr.time), "%02u %3.3s %02u %02u:%02u:%02u" /* To FidoNet */
,tm.tm_mday,mon[tm.tm_mon],TM_YEAR(tm.tm_year)
,tm.tm_hour,tm.tm_min,tm.tm_sec);
hdr.attr=(FIDO_LOCAL|FIDO_PRIVATE);
......
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