Commit 121ce679 authored by Rob Swindell's avatar Rob Swindell 💬
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
Pipeline #3105 passed with stage
in 10 minutes and 12 seconds
......@@ -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);
......
Supports Markdown
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