Package: nbtscan
Version: 1.5.1-6
Severity: normal

Dear Maintainer,

Part of the verbose output of the nbtscan probram is looking
odd. There are clearly some missing format specifiers in some of the
format strings to some of the `printf'.  This causes the verbose
output to look like:

FRMRs Received: 0x%04 (0)
FRMRs Transmitted: 0x%04 (0)
IFrame Receive errors: 0x%04 (0)
Transmit aborts: 0x%04 (0)
Transmitted: 0x%08 (0)
Received: 0x%08 (0)
IFrame transmit errors: 0x%04 (0)
No receive buffers: 0x%04 (0)
tl timeouts: 0x%04 (0)
ti timeouts: 0x%04 (0)
Free NCBS: 0x%04 (0)
NCBS: 0x%04 (0)
Max NCBS: 0x%04 (0)
No transmit buffers: 0x%04 (0)
Max datagram: 0x%04 (0)
Pending sessions: 0x%04 (0)
Max sessions: 0x%04 (0)
Packet sessions: 0x%04 (0)

.... instead of ...

FRMRs Received: 0x0000 (0)
FRMRs Transmitted: 0x0000 (0)
IFrame Receive errors: 0x0000 (0)
Transmit aborts: 0x0000 (0)
Transmitted: 0x00000000 (0)
Received: 0x00000000 (0)
IFrame transmit errors: 0x0000 (0)
No receive buffers: 0x0000 (0)
tl timeouts: 0x0000 (0)
ti timeouts: 0x0000 (0)
Free NCBS: 0x0000 (0)
NCBS: 0x0000 (0)
Max NCBS: 0x0000 (0)
No transmit buffers: 0x0000 (0)
Max datagram: 0x0000 (0)
Pending sessions: 0x0000 (0)
Max sessions: 0x0000 (0)
Packet sessions: 0x0000 (0)


Changing these format strings (in function d_print_hostinfo in
nbtscan.c) to conform with other smilar `printf's seems to fix the
problem. This is the changes I made to get the fixed output above:

--- nbtscan-1.5.1~/nbtscan.c    2015-12-22 22:28:08.779354535 +0100
+++ nbtscan-1.5.1/nbtscan.c     2015-12-22 22:20:54.789202494 +0100
@@ -131,24 +131,24 @@
     printf("Version major: 0x%02x (%1$d)\n", hostinfo->footer->version_major);
     printf("Version minor: 0x%02x (%1$d)\n", hostinfo->footer->version_minor);
     printf("Duration: 0x%04x (%1$d)\n", hostinfo->footer->duration);
-    printf("FRMRs Received: 0x%04 (%1$d)\n", hostinfo->footer->frmps_received);
-    printf("FRMRs Transmitted: 0x%04 (%1$d)\n", 
hostinfo->footer->frmps_transmitted);
-    printf("IFrame Receive errors: 0x%04 (%1$d)\n", 
hostinfo->footer->iframe_receive_errors);
-    printf("Transmit aborts: 0x%04 (%1$d)\n", 
hostinfo->footer->transmit_aborts);
-    printf("Transmitted: 0x%08 (%1$d)\n", hostinfo->footer->transmitted);
-    printf("Received: 0x%08 (%1$d)\n", hostinfo->footer->received);
-    printf("IFrame transmit errors: 0x%04 (%1$d)\n", 
hostinfo->footer->iframe_transmit_errors);
-    printf("No receive buffers: 0x%04 (%1$d)\n", 
hostinfo->footer->no_receive_buffer);
-    printf("tl timeouts: 0x%04 (%1$d)\n", hostinfo->footer->tl_timeouts);
-    printf("ti timeouts: 0x%04 (%1$d)\n", hostinfo->footer->ti_timeouts);
-    printf("Free NCBS: 0x%04 (%1$d)\n", hostinfo->footer->free_ncbs);        
-    printf("NCBS: 0x%04 (%1$d)\n", hostinfo->footer->ncbs);
-    printf("Max NCBS: 0x%04 (%1$d)\n", hostinfo->footer->max_ncbs);
-    printf("No transmit buffers: 0x%04 (%1$d)\n", 
hostinfo->footer->no_transmit_buffers);
-    printf("Max datagram: 0x%04 (%1$d)\n", hostinfo->footer->max_datagram);
-    printf("Pending sessions: 0x%04 (%1$d)\n", 
hostinfo->footer->pending_sessions);
-    printf("Max sessions: 0x%04 (%1$d)\n", hostinfo->footer->max_sessions);
-    printf("Packet sessions: 0x%04 (%1$d)\n", 
hostinfo->footer->packet_sessions);
+    printf("FRMRs Received: 0x%04x (%1$d)\n", 
hostinfo->footer->frmps_received);
+    printf("FRMRs Transmitted: 0x%04x (%1$d)\n", 
hostinfo->footer->frmps_transmitted);
+    printf("IFrame Receive errors: 0x%04x (%1$d)\n", 
hostinfo->footer->iframe_receive_errors);
+    printf("Transmit aborts: 0x%04x (%1$d)\n", 
hostinfo->footer->transmit_aborts);
+    printf("Transmitted: 0x%08x (%1$d)\n", hostinfo->footer->transmitted);
+    printf("Received: 0x%08x (%1$d)\n", hostinfo->footer->received);
+    printf("IFrame transmit errors: 0x%04x (%1$d)\n", 
hostinfo->footer->iframe_transmit_errors);
+    printf("No receive buffers: 0x%04x (%1$d)\n", 
hostinfo->footer->no_receive_buffer);
+    printf("tl timeouts: 0x%04x (%1$d)\n", hostinfo->footer->tl_timeouts);
+    printf("ti timeouts: 0x%04x (%1$d)\n", hostinfo->footer->ti_timeouts);
+    printf("Free NCBS: 0x%04x (%1$d)\n", hostinfo->footer->free_ncbs);        
+    printf("NCBS: 0x%04x (%1$d)\n", hostinfo->footer->ncbs);
+    printf("Max NCBS: 0x%04x (%1$d)\n", hostinfo->footer->max_ncbs);
+    printf("No transmit buffers: 0x%04x (%1$d)\n", 
hostinfo->footer->no_transmit_buffers);
+    printf("Max datagram: 0x%04x (%1$d)\n", hostinfo->footer->max_datagram);
+    printf("Pending sessions: 0x%04x (%1$d)\n", 
hostinfo->footer->pending_sessions);
+    printf("Max sessions: 0x%04x (%1$d)\n", hostinfo->footer->max_sessions);
+    printf("Packet sessions: 0x%04x (%1$d)\n", 
hostinfo->footer->packet_sessions);
   };
 };
 
If you apply this patch, check that it actually fixes the problem and
that there is no other underlying problem.

Regards,
--
Johan Eidenvall


-- System Information:
Debian Release: 8.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 3.16.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages nbtscan depends on:
ii  libc6  2.19-18+deb8u1

nbtscan recommends no packages.

nbtscan suggests no packages.

-- no debconf information

Reply via email to