freebsd-nq/lib/libc/stdlib
Kyle Evans 253b638eab getopt_long(3): fix case of malformed long opt
When presented with an arg string like '-l-', getopt_long will successfully
parse out the 'l' short option, then proceed to match '--' against the first
longopts entry as it later does a strncmp with len=0. This latter bit is
arguably another bug in itself, but presumably not a practical issue as all
callers of parse_long_options are already doing the right thing (except this
one pointed out).

An opt string like '-l-' should be considered malformed and throw a bad
argument rather than behaving as if '--' were passed. It cannot possibly do
what the invoker expects, and it's probably the result of a typo (ls -l- a)
rather than any intent.

Reported by:	Tony Overfield <toverfield@yahoo.com>
Reviewed by:	imp
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D18616
2019-01-04 03:13:24 +00:00
..
jemalloc Update jemalloc to version 5.1.0. 2018-05-11 00:32:31 +00:00
_Exit.c
a64l.3
a64l.c
abort.3 Bump the date on man pages in r334306 2018-05-29 02:41:32 +00:00
abort.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
abs.3
abs.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
alloca.3
at_quick_exit.3
atexit.3
atexit.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
atexit.h General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
atof.3
atof.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
atoi.3 atoi.3: bump .Dd 2018-06-13 09:07:24 +00:00
atoi.c libc: remove explicit cast NULL in atoi 2018-06-13 08:52:17 +00:00
atol.3
atol.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
atoll.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
bsearch_b.c
bsearch.3
bsearch.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
cxa_thread_atexit_impl.c
cxa_thread_atexit.c
div.3
div.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
exit.3 Bump the date on man pages in r334306 2018-05-29 02:41:32 +00:00
exit.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getenv.3
getenv.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
getopt_long.3 getopt_long(3): Document behavior of leading characters in optstring 2018-08-12 00:08:14 +00:00
getopt_long.c getopt_long(3): fix case of malformed long opt 2019-01-04 03:13:24 +00:00
getopt.3
getopt.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
getsubopt.3
getsubopt.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
hcreate_r.c
hcreate.3
hcreate.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
hdestroy_r.c
heapsort_b.c
heapsort.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
hsearch_r.c
hsearch.h
imaxabs.3
imaxabs.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
imaxdiv.3
imaxdiv.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
insque.3
insque.c
l64a.c
labs.3
labs.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
ldiv.3
ldiv.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
llabs.3
llabs.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
lldiv.3
lldiv.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
lsearch.3
lsearch.c
Makefile.inc Provide set_constraint_handler_s(3) man page. 2018-08-19 14:39:57 +00:00
memory.3
merge.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
mergesort_b.c
ptsname.3
ptsname.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
qsort_r.c
qsort.3 Don't put multiple names on a single .Nm line. This fixes apropos(1) 2018-04-17 09:05:46 +00:00
qsort.c libc qsort(3): stop aliasing. 2018-06-10 17:54:44 +00:00
quick_exit.3 C++17 requires quick_exit(3) to be async-signal safe. 2017-11-04 10:52:58 +00:00
quick_exit.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
radixsort.3
radixsort.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
rand.3
rand.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
random.3
random.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
reallocarray.3
reallocarray.c
reallocf.3
reallocf.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
realpath.3
realpath.c libc: further adoption of SPDX licensing ID tags. 2017-11-25 17:12:48 +00:00
remque.c
set_constraint_handler_s.3 Provide set_constraint_handler_s(3) man page. 2018-08-19 14:39:57 +00:00
set_constraint_handler_s.c Improve standard compliance for memset_s() and abort_handler_s(). 2017-08-12 15:18:17 +00:00
strfmon.3
strfmon.c Allow multi-byte thousands separators in strfmon(3) 2018-12-19 22:57:47 +00:00
strtod.3
strtoimax.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtol.3
strtol.c Move strtold wrapper from strtol.c to its own strtold.c. This code 2018-01-31 03:05:14 +00:00
strtold.c Use standard 2-clause license where copyright is held by the FreeBSD Foundation 2018-02-02 16:47:32 +00:00
strtoll.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtonum.3
strtonum.c
strtoq.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtoul.3
strtoul.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtoull.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtoumax.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
strtouq.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
Symbol.map
system.3
system.c General further adoption of SPDX licensing ID tags. 2017-11-20 19:49:47 +00:00
tdelete.c
tfind.c
tsearch_path.h
tsearch.3 Follow up to r320992, properly escape the backslash so it renders properly. 2017-07-14 17:27:15 +00:00
tsearch.c
twalk.c