summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/vfprintf.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1998-08-14 21:39:18 +0000
committerderaadt <deraadt@openbsd.org>1998-08-14 21:39:18 +0000
commite512315e955209fedb2d53461c3973f04fc1dd55 (patch)
treeb9010203c21d01e17b517ff226492586563669b8 /lib/libc/stdio/vfprintf.c
parentrealloc repair (diff)
downloadwireguard-openbsd-e512315e955209fedb2d53461c3973f04fc1dd55.tar.xz
wireguard-openbsd-e512315e955209fedb2d53461c3973f04fc1dd55.zip
realloc repair
Diffstat (limited to 'lib/libc/stdio/vfprintf.c')
-rw-r--r--lib/libc/stdio/vfprintf.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index 274f7b9d82f..1a1cf974a25 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -35,7 +35,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char *rcsid = "$OpenBSD: vfprintf.c,v 1.7 1997/07/25 20:30:12 mickey Exp $";
+static char *rcsid = "$OpenBSD: vfprintf.c,v 1.8 1998/08/14 21:39:42 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -60,9 +60,10 @@ static char *rcsid = "$OpenBSD: vfprintf.c,v 1.7 1997/07/25 20:30:12 mickey Exp
#include "local.h"
#include "fvwrite.h"
-static void __find_arguments(const char *fmt0, va_list ap, va_list **argtable);
-static int __grow_type_table(unsigned char **typetable,
- int *tablesize);
+static void __find_arguments __P((const char *fmt0, va_list ap,
+ va_list **argtable));
+static int __grow_type_table __P((unsigned char **typetable,
+ int *tablesize));
/*
* Flush out all the vectors defined by the given uio,
@@ -1068,7 +1069,7 @@ done:
* Increase the size of the type table.
*/
static int
-__grow_type_table (typetable, tablesize)
+__grow_type_table(typetable, tablesize)
unsigned char **typetable;
int *tablesize;
{
@@ -1082,7 +1083,7 @@ __grow_type_table (typetable, tablesize)
} else {
*typetable = (unsigned char *)
realloc (typetable, sizeof (unsigned char) * newsize);
-
+ /* XXX unchecked */
}
memset (&typetable [*tablesize], T_UNUSED, (newsize - *tablesize));