blob: e598a731be0aa4c6a283bd7e8454bad5178d0463 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
$NetBSD: patch-al,v 1.3 2007/01/06 22:45:49 wiz Exp $
--- src/find.c.orig 2006-09-30 10:13:00.000000000 +0200
+++ src/find.c
@@ -673,7 +673,7 @@ findinit(char *pattern)
/* must be an exact match */
/* note: regcomp doesn't recognize ^*keypad$ as a syntax error
unless it is given as a single arg */
- (void) sprintf(buf, "^%s$", s);
+ (void) snprintf(buf, sizeof(buf), "^%s$", s);
if (regcomp (®exp, buf, REG_EXTENDED | REG_NOSUB) != 0) {
return(REGCMPERROR);
}
|