summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/microcode/aic7xxx/aicasm_gram.y4
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 */