From a6d4786f0d6839f7b3cb34bb77744b9932b73197 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 31 Jul 2002 09:19:41 +0000 Subject: sync to libc calloc() --- usr.sbin/named/named/storage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/named') diff --git a/usr.sbin/named/named/storage.c b/usr.sbin/named/named/storage.c index b71f8a41966..a9d9b37a3ac 100644 --- a/usr.sbin/named/named/storage.c +++ b/usr.sbin/named/named/storage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: storage.c,v 1.6 2002/07/30 22:39:35 deraadt Exp $ */ +/* $OpenBSD: storage.c,v 1.7 2002/07/31 09:19:40 deraadt Exp $ */ /* * ++Copyright++ 1985, 1989 @@ -192,7 +192,7 @@ calloc(num, size) { register char *p; - if (SIZE_T_MAX / num < size) { + if (num && size && SIZE_T_MAX / num < size) { errno = ENOMEM; return NULL; } -- cgit v1.2.3