|
Karsten Hopp |
62cfb5 |
To: vim-dev@vim.org
|
|
Karsten Hopp |
62cfb5 |
Subject: Patch 7.2.038
|
|
Karsten Hopp |
62cfb5 |
Fcc: outbox
|
|
Karsten Hopp |
62cfb5 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
62cfb5 |
Mime-Version: 1.0
|
|
Karsten Hopp |
62cfb5 |
Content-Type: text/plain; charset=ISO-8859-1
|
|
Karsten Hopp |
62cfb5 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
62cfb5 |
------------
|
|
Karsten Hopp |
62cfb5 |
|
|
Karsten Hopp |
62cfb5 |
Patch 7.2.038
|
|
Karsten Hopp |
62cfb5 |
Problem: Overlapping arguments to memcpy().
|
|
Karsten Hopp |
62cfb5 |
Solution: Use mch_memmove(). (Dominique Pelle)
|
|
Karsten Hopp |
62cfb5 |
Files: src/if_xcmdsrv.c
|
|
Karsten Hopp |
62cfb5 |
|
|
Karsten Hopp |
62cfb5 |
|
|
Karsten Hopp |
62cfb5 |
*** ../vim-7.2.037/src/if_xcmdsrv.c Wed Aug 6 18:38:13 2008
|
|
Karsten Hopp |
62cfb5 |
--- src/if_xcmdsrv.c Wed Nov 12 12:09:01 2008
|
|
Karsten Hopp |
62cfb5 |
***************
|
|
Karsten Hopp |
62cfb5 |
*** 736,742 ****
|
|
Karsten Hopp |
62cfb5 |
+ serverReply.ga_len;
|
|
Karsten Hopp |
62cfb5 |
e.id = w;
|
|
Karsten Hopp |
62cfb5 |
ga_init2(&e.strings, 1, 100);
|
|
Karsten Hopp |
62cfb5 |
! memcpy(p, &e, sizeof(e));
|
|
Karsten Hopp |
62cfb5 |
serverReply.ga_len++;
|
|
Karsten Hopp |
62cfb5 |
}
|
|
Karsten Hopp |
62cfb5 |
}
|
|
Karsten Hopp |
62cfb5 |
--- 736,742 ----
|
|
Karsten Hopp |
62cfb5 |
+ serverReply.ga_len;
|
|
Karsten Hopp |
62cfb5 |
e.id = w;
|
|
Karsten Hopp |
62cfb5 |
ga_init2(&e.strings, 1, 100);
|
|
Karsten Hopp |
62cfb5 |
! mch_memmove(p, &e, sizeof(e));
|
|
Karsten Hopp |
62cfb5 |
serverReply.ga_len++;
|
|
Karsten Hopp |
62cfb5 |
}
|
|
Karsten Hopp |
62cfb5 |
}
|
|
Karsten Hopp |
62cfb5 |
***************
|
|
Karsten Hopp |
62cfb5 |
*** 1018,1024 ****
|
|
Karsten Hopp |
62cfb5 |
p++;
|
|
Karsten Hopp |
62cfb5 |
count = numItems - (p - regProp);
|
|
Karsten Hopp |
62cfb5 |
if (count > 0)
|
|
Karsten Hopp |
62cfb5 |
! memcpy(entry, p, count);
|
|
Karsten Hopp |
62cfb5 |
XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING,
|
|
Karsten Hopp |
62cfb5 |
8, PropModeReplace, regProp,
|
|
Karsten Hopp |
62cfb5 |
(int)(numItems - (p - entry)));
|
|
Karsten Hopp |
62cfb5 |
--- 1018,1024 ----
|
|
Karsten Hopp |
62cfb5 |
p++;
|
|
Karsten Hopp |
62cfb5 |
count = numItems - (p - regProp);
|
|
Karsten Hopp |
62cfb5 |
if (count > 0)
|
|
Karsten Hopp |
62cfb5 |
! mch_memmove(entry, p, count);
|
|
Karsten Hopp |
62cfb5 |
XChangeProperty(dpy, RootWindow(dpy, 0), registryProperty, XA_STRING,
|
|
Karsten Hopp |
62cfb5 |
8, PropModeReplace, regProp,
|
|
Karsten Hopp |
62cfb5 |
(int)(numItems - (p - entry)));
|
|
Karsten Hopp |
62cfb5 |
***************
|
|
Karsten Hopp |
62cfb5 |
*** 1072,1078 ****
|
|
Karsten Hopp |
62cfb5 |
p++;
|
|
Karsten Hopp |
62cfb5 |
lastHalf = numItems - (p - regProp);
|
|
Karsten Hopp |
62cfb5 |
if (lastHalf > 0)
|
|
Karsten Hopp |
62cfb5 |
! memcpy(entry, p, lastHalf);
|
|
Karsten Hopp |
62cfb5 |
numItems = (entry - regProp) + lastHalf;
|
|
Karsten Hopp |
62cfb5 |
p = entry;
|
|
Karsten Hopp |
62cfb5 |
continue;
|
|
Karsten Hopp |
62cfb5 |
--- 1072,1078 ----
|
|
Karsten Hopp |
62cfb5 |
p++;
|
|
Karsten Hopp |
62cfb5 |
lastHalf = numItems - (p - regProp);
|
|
Karsten Hopp |
62cfb5 |
if (lastHalf > 0)
|
|
Karsten Hopp |
62cfb5 |
! mch_memmove(entry, p, lastHalf);
|
|
Karsten Hopp |
62cfb5 |
numItems = (entry - regProp) + lastHalf;
|
|
Karsten Hopp |
62cfb5 |
p = entry;
|
|
Karsten Hopp |
62cfb5 |
continue;
|
|
Karsten Hopp |
62cfb5 |
*** ../vim-7.2.037/src/version.c Wed Nov 12 14:09:38 2008
|
|
Karsten Hopp |
62cfb5 |
--- src/version.c Wed Nov 12 14:51:00 2008
|
|
Karsten Hopp |
62cfb5 |
***************
|
|
Karsten Hopp |
62cfb5 |
*** 678,679 ****
|
|
Karsten Hopp |
62cfb5 |
--- 678,681 ----
|
|
Karsten Hopp |
62cfb5 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
62cfb5 |
+ /**/
|
|
Karsten Hopp |
62cfb5 |
+ 38,
|
|
Karsten Hopp |
62cfb5 |
/**/
|
|
Karsten Hopp |
62cfb5 |
|
|
Karsten Hopp |
62cfb5 |
--
|
|
Karsten Hopp |
62cfb5 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
62cfb5 |
241. You try to look for Net Search even when you're in File Manager.
|
|
Karsten Hopp |
62cfb5 |
|
|
Karsten Hopp |
62cfb5 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
62cfb5 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
62cfb5 |
\\\ download, build and distribute -- http://www.A-A-P.org ///
|
|
Karsten Hopp |
62cfb5 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|