aboutsummaryrefslogtreecommitdiffstats
path: root/com32/lib/sys/module/common.c
diff options
context:
space:
mode:
authorMatt Fleming <matt.fleming@intel.com>2012-11-27 21:13:45 +0000
committerMatt Fleming <matt.fleming@intel.com>2012-11-27 21:13:45 +0000
commitaffd61825f0502af0697d393aeb76ddf0a7a4fac (patch)
tree28be443968b3f1775bf21575272d4d584aaabec9 /com32/lib/sys/module/common.c
parentf3cac0e6203c532efc97a6ae8955fc4b79a2b373 (diff)
parente955e5c00a852883f6972e1a9bc304413ff79627 (diff)
downloadsyslinux-affd61825f0502af0697d393aeb76ddf0a7a4fac.tar.gz
syslinux-affd61825f0502af0697d393aeb76ddf0a7a4fac.tar.xz
syslinux-affd61825f0502af0697d393aeb76ddf0a7a4fac.zip
Merge branch 'coverity' into elflinksyslinux-5.00-pre11
Diffstat (limited to 'com32/lib/sys/module/common.c')
-rw-r--r--com32/lib/sys/module/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c
index 30c57b4b..dfbdf617 100644
--- a/com32/lib/sys/module/common.c
+++ b/com32/lib/sys/module/common.c
@@ -71,7 +71,7 @@ FILE *findpath(char *name)
p = PATH;
again:
i = 0;
- while (*p && *p != ':' && i < FILENAME_MAX) {
+ while (*p && *p != ':' && i < FILENAME_MAX - 1) {
path[i++] = *p++;
}
@@ -79,7 +79,7 @@ again:
p++;
n = name;
- while (*n && i < FILENAME_MAX)
+ while (*n && i < FILENAME_MAX - 1)
path[i++] = *n++;
path[i] = '\0';