Comment 4 for bug 1767283

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

In gdb I see it gets to read -s

                case 's':
                        sflag = optarg;
                        break;

It realizes no more options are there and then ends at
        } else if (argv[0] && argv[1]) {
                host = argv[0];
                uport = &argv[1];
                if (pflag || sflag)
                        usage(1);

And sflag is set, so it reports usage and exits.
The particular check in this path of pflag/sflag didn't exist back then.

I found this comes in via a patch
  debian/patches/misc-failures-and-features.patch
That was in Debian and Ubuntu since late 2016

This patch was modified by:
commit 2ebffb014c830e49f6fad600c59cc1b82fe356a4
Author: Guilhem Moulin <email address hidden>
Date: Sun Dec 3 22:58:11 2017 +0100

    Allow usage of -s with -l for consistency with netcat-traditional.

Since then this is also in Debian.