diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2005-04-28 10:10:50 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2005-04-28 10:10:50 +0000 |
commit | 0f345a5f1e841e2d61ba049644acd3b2edbb1720 (patch) | |
tree | 280921e113c552fee1875e029658fff779ea2904 /sys/dev | |
parent | e7bbc8811b44ee79700c5bbff5d4989c46a437eb (diff) |
more snprintf checking. ok krw@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/microcode/aic7xxx/aicasm_gram.y | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/microcode/aic7xxx/aicasm_gram.y b/sys/dev/microcode/aic7xxx/aicasm_gram.y index 4b5e9d2c570..234bc977468 100644 --- a/sys/dev/microcode/aic7xxx/aicasm_gram.y +++ b/sys/dev/microcode/aic7xxx/aicasm_gram.y @@ -1,5 +1,5 @@ %{ -/* $OpenBSD: aicasm_gram.y,v 1.12 2004/09/18 19:51:53 mickey Exp $ */ +/* $OpenBSD: aicasm_gram.y,v 1.13 2005/04/28 10:10:49 moritz Exp $ */ /* $NetBSD: aicasm_gram.y,v 1.3 2003/04/19 19:26:11 fvdl Exp $ */ /* @@ -1554,7 +1554,7 @@ add_macro_arg(const char *argtext, int argnum) retval = snprintf(regex_pattern, sizeof(regex_pattern), "[^-/A-Za-z0-9_](%s)([^-/A-Za-z0-9_]|$)", argtext); - if (retval >= sizeof(regex_pattern)) { + if (retval == -1 || retval >= sizeof(regex_pattern)) { stop("Regex text buffer too small for arg", EX_SOFTWARE); /* NOTREACHED */ |