ruby-changes:4256
From: ko1@a...
Date: Tue, 11 Mar 2008 16:44:16 +0900 (JST)
Subject: [ruby-changes:4256] nobu - Ruby:r15746 (ruby_1_8): * win32/win32.c (rb_w32_cmdvector): terminate shrunken command line.
nobu 2008-03-11 16:43:55 +0900 (Tue, 11 Mar 2008)
New Revision: 15746
Modified files:
branches/ruby_1_8/ChangeLog
branches/ruby_1_8/win32/win32.c
Log:
* win32/win32.c (rb_w32_cmdvector): terminate shrunken command line.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/ChangeLog?r1=15746&r2=15745&diff_format=u
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/win32/win32.c?r1=15746&r2=15745&diff_format=u
Index: ruby_1_8/ChangeLog
===================================================================
--- ruby_1_8/ChangeLog (revision 15745)
+++ ruby_1_8/ChangeLog (revision 15746)
@@ -1,3 +1,7 @@
+Tue Mar 11 16:43:53 2008 Nobuyoshi Nakada <nobu@r...>
+
+ * win32/win32.c (rb_w32_cmdvector): terminate shrunken command line.
+
Tue Mar 11 12:39:03 2008 Nobuyoshi Nakada <nobu@r...>
* common.mk (clean-local): removes MINOBJS.
Index: ruby_1_8/win32/win32.c
===================================================================
--- ruby_1_8/win32/win32.c (revision 15745)
+++ ruby_1_8/win32/win32.c (revision 15746)
@@ -1424,9 +1424,10 @@
ptr = buffer + (elements+1) * sizeof(char *);
while (curr = cmdhead) {
- memcpy(ptr, curr->str, curr->len + 1);
+ memcpy(ptr, curr->str, curr->len);
*vptr++ = ptr;
- ptr += curr->len + 1;
+ ptr += curr->len;
+ *ptr++ = '\0';
cmdhead = curr->next;
if (curr->flags & NTMALLOC) free(curr->str);
free(curr);
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/