diff options
author | imp <imp@FreeBSD.org> | 2001-05-29 18:03:14 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2001-05-29 18:03:14 +0000 |
commit | 6d5c9e2a159911e48f405cbdbd6eaeb8fb1aa421 (patch) | |
tree | a7285d6ceab135cd35a2477ee8b4752f5ad7c3ad /bin/ed/re.c | |
parent | 6709d5cb0cba6c2b7897b943a8a49cb42034ab88 (diff) | |
download | FreeBSD-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.c | 2 |
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 */ |