aboutsummaryrefslogtreecommitdiffstats
path: root/nt
diff options
context:
space:
mode:
authorJuanma Barranquero2014-04-30 21:54:52 +0200
committerJuanma Barranquero2014-04-30 21:54:52 +0200
commit09b911adf4e22bbcac8c588bc14ade801276732e (patch)
tree0d9eb9708479bb491d7e1e2bb030aa3e90299526 /nt
parentb0e36b7048c88aa24f6955c53fbe790bb9ebc54f (diff)
parent426b5dafdd837328d624a8ec5bfd567f2865c9f5 (diff)
downloademacs-09b911adf4e22bbcac8c588bc14ade801276732e.tar.gz
emacs-09b911adf4e22bbcac8c588bc14ade801276732e.zip
Merge from emacs-24; up to 2014-05-01T10:21:17Z!rgm@gnu.org
Diffstat (limited to 'nt')
-rw-r--r--nt/ChangeLog5
-rw-r--r--nt/cmdproxy.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/nt/ChangeLog b/nt/ChangeLog
index 9e7773a7421..f31d2619319 100644
--- a/nt/ChangeLog
+++ b/nt/ChangeLog
@@ -1,3 +1,8 @@
12014-04-30 Eli Zaretskii <eliz@gnu.org>
2
3 * cmdproxy.c (make_absolute): Don't copy more characters from PATH
4 than a single directory name can hold. (Bug#17334)
5
12014-04-22 Eli Zaretskii <eliz@gnu.org> 62014-04-22 Eli Zaretskii <eliz@gnu.org>
2 7
3 * inc/ms-w32.h (lseek): Define only if not already a macro. 8 * inc/ms-w32.h (lseek): Define only if not already a macro.
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index f3433f63684..e48ca63a257 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -292,11 +292,15 @@ make_absolute (const char *prog)
292 292
293 while (*path) 293 while (*path)
294 { 294 {
295 size_t len;
296
295 /* Get next directory from path. */ 297 /* Get next directory from path. */
296 p = path; 298 p = path;
297 while (*p && *p != ';') p++; 299 while (*p && *p != ';') p++;
298 strncpy (dir, path, p - path); 300 /* A broken PATH could have too long directory names in it. */
299 dir[p - path] = '\0'; 301 len = min (p - path, sizeof (dir) - 1);
302 strncpy (dir, path, len);
303 dir[len] = '\0';
300 304
301 /* Search the directory for the program. */ 305 /* Search the directory for the program. */
302 if (search_dir (dir, prog, MAX_PATH, absname) > 0) 306 if (search_dir (dir, prog, MAX_PATH, absname) > 0)