0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 00:10:52 +00:00
termux-packages/packages/argp/fix-segfault.patch
Tee KOBAYASHI 1f140d9f75 argp: Bump to 1.5.0
* Switch to active fork

* Build shared libs
2022-11-25 20:28:34 +00:00

27 lines
636 B
Diff

similar to https://www.gnu.org/software/gnutls/clang/report-NwyD8A.html
--- argp-standalone-1.3/argp-help.c 2003-12-11 14:07:05.000000000 +0530
+++ argp-standalone-1.3-patch/argp-help.c 2021-08-30 20:06:23.807999907 +0530
@@ -731,6 +731,11 @@
canon_doc_option(const char** name)
{
int non_opt;
+#if 1
+ if (!*name)
+ non_opt = 1;
+ else {
+#endif
/* Skip initial whitespace. */
while (isspace(**name))
(*name)++;
@@ -739,6 +744,9 @@
/* Skip until part of name used for sorting. */
while (**name && !isalnum(**name))
(*name)++;
+#if 1
+ }
+#endif
return non_opt;
}