summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/strtofflags.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/gen/strtofflags.c')
-rw-r--r--lib/libc/gen/strtofflags.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/strtofflags.c b/lib/libc/gen/strtofflags.c
index 9eba0f4517d..a54fd2ce843 100644
--- a/lib/libc/gen/strtofflags.c
+++ b/lib/libc/gen/strtofflags.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: strtofflags.c,v 1.5 2005/08/08 08:05:34 espie Exp $ */
+/* $OpenBSD: strtofflags.c,v 1.6 2007/09/02 15:19:16 deraadt Exp $ */
/*-
* Copyright (c) 1993
@@ -82,7 +82,7 @@ fflagstostr(u_int32_t flags)
u_int32_t setflags;
int i;
- if ((string = (char *)malloc(nmappings * (longestflaglen + 1))) == NULL)
+ if ((string = (char *)calloc(nmappings, longestflaglen + 1)) == NULL)
return (NULL);
setflags = flags;