diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libc/stdlib/calloc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libc/stdlib/calloc.c b/src/lib/libc/stdlib/calloc.c index 7105141db8..43a0d1632c 100644 --- a/src/lib/libc/stdlib/calloc.c +++ b/src/lib/libc/stdlib/calloc.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: calloc.c,v 1.10 2005/08/08 08:05:36 espie Exp $ */ | 1 | /* $OpenBSD: calloc.c,v 1.11 2006/04/02 18:22:14 otto Exp $ */ |
| 2 | /*- | 2 | /*- |
| 3 | * Copyright (c) 1990 The Regents of the University of California. | 3 | * Copyright (c) 1990 The Regents of the University of California. |
| 4 | * All rights reserved. | 4 | * All rights reserved. |
| @@ -38,7 +38,7 @@ calloc(size_t num, size_t size) | |||
| 38 | { | 38 | { |
| 39 | void *p; | 39 | void *p; |
| 40 | 40 | ||
| 41 | if (num && size && SIZE_T_MAX / num < size) { | 41 | if (num && SIZE_MAX / num < size) { |
| 42 | errno = ENOMEM; | 42 | errno = ENOMEM; |
| 43 | return NULL; | 43 | return NULL; |
| 44 | } | 44 | } |
