Module Name:    src
Committed By:   roy
Date:           Mon Dec  7 21:31:44 UTC 2009

Modified Files:
        src/lib/libc/stdio: getdelim.c

Log Message:
Test against SSIZE_MAX as pointed out by enami tsugutomo.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/lib/libc/stdio/getdelim.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/lib/libc/stdio/getdelim.c
diff -u src/lib/libc/stdio/getdelim.c:1.11 src/lib/libc/stdio/getdelim.c:1.12
--- src/lib/libc/stdio/getdelim.c:1.11	Wed Dec  2 11:14:47 2009
+++ src/lib/libc/stdio/getdelim.c	Mon Dec  7 21:31:43 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: getdelim.c,v 1.11 2009/12/02 11:14:47 roy Exp $ */
+/* $NetBSD: getdelim.c,v 1.12 2009/12/07 21:31:43 roy Exp $ */
 
 /*
  * Copyright (c) 2009 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: getdelim.c,v 1.11 2009/12/02 11:14:47 roy Exp $");
+__RCSID("$NetBSD: getdelim.c,v 1.12 2009/12/07 21:31:43 roy Exp $");
 
 #include "namespace.h"
 
@@ -92,7 +92,7 @@
 
 		newlen = off + len;
 		/* Ensure we can handle it */
-		if (newlen < off || newlen > SIZE_MAX) {
+		if (newlen < off || newlen > SSIZE_MAX) {
 			errno = EOVERFLOW;
 			goto error;
 		}

Reply via email to