summaryrefslogtreecommitdiff
path: root/devel/cscope/patches/patch-al
blob: 4863d55c79276167c4017738c6b61c0ea61b6df2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
$NetBSD: patch-al,v 1.2 2006/05/29 13:51:20 tron Exp $

--- src/find.c.orig	2003-09-04 16:58:52.000000000 +0100
+++ src/find.c	2006-05-29 14:34:26.000000000 +0100
@@ -666,7 +666,7 @@
 		/* 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 (&regexp, buf, REG_EXTENDED | REG_NOSUB) != 0) {
 			return(REGCMPERROR);
 		}