From 383f1657fdcb5d52c634d04443552ab76265e2b9 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 6 Apr 2003 23:38:08 +0000 Subject: more strlcpy/strlcat/snprintf, less strcpy/strcat/sprintf reviewed by tdeval, millert, dhartmei and others. more bits coming here from some of them i think --- usr.bin/less/search.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin/less/search.c') diff --git a/usr.bin/less/search.c b/usr.bin/less/search.c index 0e8c3a15716..67ce87efb8d 100644 --- a/usr.bin/less/search.c +++ b/usr.bin/less/search.c @@ -1,4 +1,4 @@ -/* $OpenBSD: search.c,v 1.3 2001/11/19 19:02:14 mpech Exp $ */ +/* $OpenBSD: search.c,v 1.4 2003/04/06 23:38:07 deraadt Exp $ */ /* * Copyright (c) 1984,1985,1989,1994,1995 Mark Nudelman @@ -295,7 +295,7 @@ compile_pattern(pattern) #endif #if NO_REGEX static char lpbuf[100]; - strcpy(lpbuf, pattern); + strlcpy(lpbuf, pattern, sizeof lbuf); last_pattern = lpbuf; #endif return (0); -- cgit v1.2.3