Package: netcat-openbsd
Version: 1.195-1
Followup-For: Bug #747646

Performing this test with blank packets still works without the server seeing 
anything.

-- System Information:
Debian Release: buster/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.18.0-2-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages netcat-openbsd depends on:
ii  libbsd0  0.9.1-1
ii  libc6    2.27-8

netcat-openbsd recommends no packages.

netcat-openbsd suggests no packages.

-- no debconf information
--- ../netcat-openbsd-1.195/netcat.c    2018-11-09 12:15:42.000000000 -0500
+++ netcat.c    2018-11-08 23:07:38.858140209 -0500
@@ -1862,15 +1862,15 @@
 {
        int i, t;
 
-       if ((write(s, "X", 1) != 1) ||
-           ((write(s, "X", 1) != 1) && (errno == ECONNREFUSED)))
+       if ((write(s, "", 1) != 1) ||
+           ((write(s, "", 1) != 1) && (errno == ECONNREFUSED)))
                return -1;
 
        /* Give the remote host some time to reply. */
        for (i = 0, t = (timeout == -1) ? UDP_SCAN_TIMEOUT : (timeout / 1000);
             i < t; i++) {
                sleep(1);
-               if ((write(s, "X", 1) != 1) && (errno == ECONNREFUSED))
+               if ((write(s, "", 1) != 1) && (errno == ECONNREFUSED))
                        return -1;
        }
        return 1;

Reply via email to