Commit 414d34ec authored by Rob Swindell's avatar Rob Swindell 💬
Browse files

Fix packet filename in "Gruned message" log entry on Win32

e.g. "Grunged message (type 2) from 4:80/1 at offset 58 in packet: (null)"

off_t is 64-bit, but long in 32-bit (on Win32), so needs a typecast here in
lprintf() call (otherwise, the upper 4 bytes of the offset are interpreted
as the string address for the corresponding '%s' argument, the filename).
parent c6e83357
Pipeline #2980 passed with stage
in 12 minutes and 58 seconds
......@@ -5814,7 +5814,7 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure)
} else {
lprintf(LOG_NOTICE, "Grunged message (type %d) from %s at offset %ld in packet: %s"
, pkdmsg.type, smb_faddrtoa(&pkt_orig, NULL), msg_offset, packet);
, pkdmsg.type, smb_faddrtoa(&pkt_orig, NULL), (long)msg_offset, packet);
printf("Grunged message!\n");
bad_packet = true;
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