|
|
Message-ID: <20180426104630.GR4418@port70.net>
Date: Thu, 26 Apr 2018 12:46:31 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: getopt_long_only bug
i got the following bug report:
$ cat a.c
#include <stdio.h>
#include <getopt.h>
int main()
{
struct option lo[] =
{
{"emit-relocs", no_argument, NULL, 'q'},
{"qmagic", no_argument, NULL, 'Q'},
{ 0 }
};
int li = -1;
char* a[] = { "", "-q", NULL };
int c = getopt_long_only(2, a, "q", lo, &li);
printf("c=%c/%i\n", c, c);
return 0;
}
$ ./a.musl
c=Q/81
$ ./a.glibc
c=q/113
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.