summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorjmallett <jmallett@FreeBSD.org>2002-08-19 03:52:36 +0000
committerjmallett <jmallett@FreeBSD.org>2002-08-19 03:52:36 +0000
commit77aebb609af70a086beb39dfeb65d2f433041e3a (patch)
treeffe262fdfb41753acc23726161e4d42dab5dcd44 /lib/libc/stdio
parent2b6e4e1504c52fa78fbca036c0a7b8cdda7d5468 (diff)
downloadFreeBSD-src-77aebb609af70a086beb39dfeb65d2f433041e3a.zip
FreeBSD-src-77aebb609af70a086beb39dfeb65d2f433041e3a.tar.gz
Leave room for a trailing NUL not a NULL, that's not an ASCII character.
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/asprintf.c2
-rw-r--r--lib/libc/stdio/vasprintf.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/asprintf.c b/lib/libc/stdio/asprintf.c
index 1eddf57..95c22b6 100644
--- a/lib/libc/stdio/asprintf.c
+++ b/lib/libc/stdio/asprintf.c
@@ -54,7 +54,7 @@ asprintf(char **str, char const *fmt, ...)
errno = ENOMEM;
return (-1);
}
- f._bf._size = f._w = 127; /* Leave room for the NULL */
+ f._bf._size = f._w = 127; /* Leave room for the NUL */
f._extra = &ext;
INITEXTRA(&f);
ret = __vfprintf(&f, fmt, ap); /* Use unlocked __vfprintf */
diff --git a/lib/libc/stdio/vasprintf.c b/lib/libc/stdio/vasprintf.c
index 498e7bbe..9d55725 100644
--- a/lib/libc/stdio/vasprintf.c
+++ b/lib/libc/stdio/vasprintf.c
@@ -53,7 +53,7 @@ vasprintf(str, fmt, ap)
errno = ENOMEM;
return (-1);
}
- f._bf._size = f._w = 127; /* Leave room for the NULL */
+ f._bf._size = f._w = 127; /* Leave room for the NUL */
f._extra = &ext;
INITEXTRA(&f);
ret = __vfprintf(&f, fmt, ap);
OpenPOWER on IntegriCloud