Commits (1)
  • Rob Swindell's avatar
    Fix packet filename in "Gruned message" log entry on Win32 · 414d34ec
    Rob Swindell authored
    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).
    414d34ec
......@@ -5814,7 +5814,7 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure)
SAFECOPY(hdr.time,pkdmsg.time);
} 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;
break;
......