[syslinux:elflink] module: Append '/' to PATH strings if missing
syslinux-bot for Matt Fleming
matt.fleming at intel.com
Thu Nov 29 05:33:07 PST 2012
Commit-ID: 771aea5ed2eb791717eea939089f8246a47d8634
Gitweb: http://www.syslinux.org/commit/771aea5ed2eb791717eea939089f8246a47d8634
Author: Matt Fleming <matt.fleming at intel.com>
AuthorDate: Thu, 29 Nov 2012 09:06:41 +0000
Committer: Matt Fleming <matt.fleming at intel.com>
CommitDate: Thu, 29 Nov 2012 09:06:41 +0000
module: Append '/' to PATH strings if missing
We shouldn't be appending a filename to any path string that isn't
terminated by a '/', otherwise we end up searching for files like
'/isolinuxpwd.c32'
Signed-off-by: Matt Fleming <matt.fleming at intel.com>
---
com32/lib/sys/module/common.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/com32/lib/sys/module/common.c b/com32/lib/sys/module/common.c
index dfbdf61..d72dd70 100644
--- a/com32/lib/sys/module/common.c
+++ b/com32/lib/sys/module/common.c
@@ -78,6 +78,10 @@ again:
if (*p == ':')
p++;
+ /* Ensure we have a '/' separator */
+ if (path[i] != '/' && i < FILENAME_MAX - 1)
+ path[i++] = '/';
+
n = name;
while (*n && i < FILENAME_MAX - 1)
path[i++] = *n++;
More information about the Syslinux-commits
mailing list