summaryrefslogtreecommitdiff
path: root/libshouldbeinlibc/argp-help.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-07-19 21:25:23 +0000
committerMiles Bader <miles@gnu.org>1996-07-19 21:25:23 +0000
commitc7db48b1ba8193fdfef0d54a88c378db238d6e00 (patch)
tree4a27cf9d5a5a55ea422438d1143c9d579a293174 /libshouldbeinlibc/argp-help.c
parente964858b3d42538ba339325e8f19d3f3365a244f (diff)
(hol_usage):
Allocate enough space in SHORT_NO_ARG_OPTS for the '\0' terminator.
Diffstat (limited to 'libshouldbeinlibc/argp-help.c')
-rw-r--r--libshouldbeinlibc/argp-help.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libshouldbeinlibc/argp-help.c b/libshouldbeinlibc/argp-help.c
index 833f11f3..a56b999b 100644
--- a/libshouldbeinlibc/argp-help.c
+++ b/libshouldbeinlibc/argp-help.c
@@ -596,7 +596,7 @@ hol_usage (struct hol *hol, FILE *stream)
{
unsigned nentries;
struct hol_entry *entry;
- char *short_no_arg_opts = alloca (strlen (hol->short_options));
+ char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1);
char *snao_end = short_no_arg_opts;
/* First we put a list of short options without arguments. */