Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/stdio Test against SSIZE_MAX as pointed out by enam...
details: https://anonhg.NetBSD.org/src/rev/4388a3674d22
branches: trunk
changeset: 749775:4388a3674d22
user: roy <roy%NetBSD.org@localhost>
date: Mon Dec 07 21:31:43 2009 +0000
description:
Test against SSIZE_MAX as pointed out by enami tsugutomo.
diffstat:
lib/libc/stdio/getdelim.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r ecd3779d9faf -r 4388a3674d22 lib/libc/stdio/getdelim.c
--- a/lib/libc/stdio/getdelim.c Mon Dec 07 20:57:55 2009 +0000
+++ b/lib/libc/stdio/getdelim.c Mon Dec 07 21:31:43 2009 +0000
@@ -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;
}
Home |
Main Index |
Thread Index |
Old Index