summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1998-01-04 22:28:47 +0000
committerache <ache@FreeBSD.org>1998-01-04 22:28:47 +0000
commitee72d26c0d2f312136d421affd8cf6033f616502 (patch)
treed050a40118a27fa1de182e5c6f86c111e8c1f343 /lib/libc/stdio
parent0c8025c02b7562adf53d8c054a7839dc570fffe1 (diff)
downloadFreeBSD-src-ee72d26c0d2f312136d421affd8cf6033f616502.zip
FreeBSD-src-ee72d26c0d2f312136d421affd8cf6033f616502.tar.gz
size_t -> unsigned
in arguments length INT_MAX overflow check Suggested-by: bde
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/vfprintf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/stdio/vfprintf.c b/lib/libc/stdio/vfprintf.c
index a325784..dd3f743 100644
--- a/lib/libc/stdio/vfprintf.c
+++ b/lib/libc/stdio/vfprintf.c
@@ -39,7 +39,7 @@
static char sccsid[] = "@(#)vfprintf.c 8.1 (Berkeley) 6/4/93";
#endif
static const char rcsid[] =
- "$Id: vfprintf.c,v 1.15 1997/12/24 23:02:43 ache Exp $";
+ "$Id: vfprintf.c,v 1.16 1997/12/25 00:32:17 ache Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -457,7 +457,7 @@ vfprintf(fp, fmt0, ap)
for (cp = fmt; (ch = *fmt) != '\0' && ch != '%'; fmt++)
/* void */;
if ((n = fmt - cp) != 0) {
- if ((size_t)ret + n > INT_MAX) {
+ if ((unsigned)ret + n > INT_MAX) {
ret = EOF;
goto error;
}
@@ -786,7 +786,7 @@ number: if ((dprec = prec) >= 0)
realsz += 2;
prsize = width > realsz ? width : realsz;
- if ((size_t)ret + prsize > INT_MAX) {
+ if ((unsigned)ret + prsize > INT_MAX) {
ret = EOF;
goto error;
}
OpenPOWER on IntegriCloud