diff options
| author | 2007-09-02 15:19:07 +0000 | |
|---|---|---|
| committer | 2007-09-02 15:19:07 +0000 | |
| commit | 1ed98fdf61d9dd29369f246109081408082ce54d (patch) | |
| tree | ad7631e58c83830d1fc51cbadb9a2da53c1abfb7 /usr.bin/grep/grep.h | |
| parent | OpenCVS server init-support with OpenCVS and GNU cvs clients. (diff) | |
| download | wireguard-openbsd-1ed98fdf61d9dd29369f246109081408082ce54d.tar.xz wireguard-openbsd-1ed98fdf61d9dd29369f246109081408082ce54d.zip | |
use calloc() to avoid malloc(n * m) overflows; checked by djm canacar jsg
Diffstat (limited to 'usr.bin/grep/grep.h')
| -rw-r--r-- | usr.bin/grep/grep.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/grep/grep.h b/usr.bin/grep/grep.h index b753bc8740a..5ba9b442347 100644 --- a/usr.bin/grep/grep.h +++ b/usr.bin/grep/grep.h @@ -1,4 +1,4 @@ -/* $OpenBSD: grep.h,v 1.13 2006/02/09 09:54:47 otto Exp $ */ +/* $OpenBSD: grep.h,v 1.14 2007/09/02 15:19:32 deraadt Exp $ */ /*- * Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav @@ -82,6 +82,7 @@ extern char re_error[RE_ERROR_BUF + 1]; /* Seems big enough */ int procfile(char *fn); int grep_tree(char **argv); void *grep_malloc(size_t size); +void *grep_calloc(size_t nmemb, size_t size); void *grep_realloc(void *ptr, size_t size); void printline(str_t *line, int sep); int fastcomp(fastgrep_t *, const char *); |
