0
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-11-22 04:56:15 +00:00
openwrt/package/libs/argp-standalone/patches/900-fix-segfault-in_canon_doc_option.patch
Stijn Tintel 3a79e3b185 argp-standalone: fix segfault in canon_doc_option
Backported from glibc.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2020-05-03 20:31:30 +03:00

15 lines
465 B
Diff

--- a/argp-help.c
+++ b/argp-help.c
@@ -777,9 +777,9 @@ hol_entry_cmp (const struct hol_entry *e
const char *long2 = hol_entry_first_long (entry2);
if (doc1)
- doc1 = canon_doc_option (&long1);
+ doc1 = long1 != NULL && canon_doc_option (&long1);
if (doc2)
- doc2 = canon_doc_option (&long2);
+ doc2 = long2 != NULL && canon_doc_option (&long2);
if (doc1 != doc2)
/* `documentation' options always follow normal options (or