summaryrefslogtreecommitdiffstats
path: root/bin/ed/re.c
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-05-29 18:03:14 +0000
committerimp <imp@FreeBSD.org>2001-05-29 18:03:14 +0000
commit6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421 (patch)
treea7285d6ceab135cd35a2477ee8b4752f5ad7c3ad /bin/ed/re.c
parent6709d5cb0cba6c2b7897b943a8a49cb42034ab88 (diff)
downloadFreeBSD-src-6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421.zip
FreeBSD-src-6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421.tar.gz
Use PATH_MAX rather than MAXPATHLEN. Also fix a possible off by one
error caused by the -1 being on the wrong side of the comparison. This would not cause an overflow, as near as I can tell, because we truncate later anyway. We'd just fail to get a diagnostic for 1024 and 1025 byte file names.
Diffstat (limited to 'bin/ed/re.c')
-rw-r--r--bin/ed/re.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/ed/re.c b/bin/ed/re.c
index d81d0d7..523e2a4 100644
--- a/bin/ed/re.c
+++ b/bin/ed/re.c
@@ -40,7 +40,7 @@ static char * const rcsid =
extern int patlock;
-char errmsg[MAXPATHLEN + 40] = "";
+char errmsg[PATH_MAX + 40] = "";
/* get_compiled_pattern: return pointer to compiled pattern from command
buffer */
OpenPOWER on IntegriCloud