From ed237e8e196058314e10e8619c8792c9594be0c9 Mon Sep 17 00:00:00 2001 From: david Date: Thu, 15 Aug 2013 08:07:21 +0000 Subject: [PATCH] Use %lu instead of %ul. Discovered by Gisle Vanem. http://seclists.org/nmap-dev/2013/q3/269 --- libnetutil/netutil.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libnetutil/netutil.cc b/libnetutil/netutil.cc index 37e47bafe..0bc195650 100644 --- a/libnetutil/netutil.cc +++ b/libnetutil/netutil.cc @@ -2436,7 +2436,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) { Snprintf(protoinfo, sizeof(protoinfo), "TCP %s:?? > %s:?? %s %s %s %s", srchost, dsthost, tflags, ipinfo, tcpinfo, tcpoptinfo); } else if (detail == MEDIUM_DETAIL) { - Snprintf(protoinfo, sizeof(protoinfo), "TCP %s:?? > %s:?? %s ack=%ul win=%hu %s IP [%s]", + Snprintf(protoinfo, sizeof(protoinfo), "TCP %s:?? > %s:?? %s ack=%lu win=%hu %s IP [%s]", srchost, dsthost, tflags, ntohl(tcp->th_ack), ntohs(tcp->th_win), tcpoptinfo, ipinfo); @@ -2451,7 +2451,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) { (tcpoptinfo[0]!='\0') ? " " : "", tcpoptinfo, ipinfo); } else { /* We only have bytes 8-16 */ - Snprintf(protoinfo, sizeof(protoinfo), "TCP %s:?? > %s:?? %s ack=%ul win=%hu %s IP [%s]", + Snprintf(protoinfo, sizeof(protoinfo), "TCP %s:?? > %s:?? %s ack=%lu win=%hu %s IP [%s]", srchost, dsthost, tflags, ntohl(tcp->th_ack), ntohs(tcp->th_win), tcpoptinfo, ipinfo); @@ -2650,7 +2650,7 @@ const char *ippackethdrinfo(const u8 *packet, u32 len, int detail) { srchost, ntohs(sctp->sh_sport), dsthost, ntohs(sctp->sh_dport), ntohl(sctp->sh_sum), ipinfo); } else if (detail == HIGH_DETAIL) { - Snprintf(protoinfo, sizeof(protoinfo), "SCTP [%s:%d > %s:%d vtag=%ul csum=0x%08x] IP [%s]", + Snprintf(protoinfo, sizeof(protoinfo), "SCTP [%s:%d > %s:%d vtag=%lu csum=0x%08x] IP [%s]", srchost, ntohs(sctp->sh_sport), dsthost, ntohs(sctp->sh_dport), ntohl(sctp->sh_vtag), ntohl(sctp->sh_sum), ipinfo);