subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bert Huijben <b...@qqmail.nl>
Subject Re: svn commit: r1544878 - /subversion/trunk/subversion/libsvn_subr/sysinfo.c
Date Sat, 23 Nov 2013 22:28:42 GMT
Is It possible to somehow wrap this in some test case?


When just looking at this hunk the patch looks wrong. The old length correction is ok for
the code above it, but then immediately after that the data pointer is updated. (At that point
also the buffersize must be adjusted!)


Perhaps using a stringbuffer in this way is not really the appropriate operation?


Bert






Sent from Windows Mail





From: astieger@apache.org
Sent: ‎Saturday‎, ‎November‎ ‎23‎, ‎2013 ‎9‎:‎46‎ ‎PM
To: commits@subversion.apache.org





Author: astieger
Date: Sat Nov 23 20:46:50 2013
New Revision: 1544878

URL: http://svn.apache.org/r1544878
Log:
Ensure full distribution description is printed in svn --version -v

* subversion/libsvn_subr/sysinfo.c
  (stringbuf_split_key): fix buffer length calculation

Approved by: breser

Modified:
    subversion/trunk/subversion/libsvn_subr/sysinfo.c

Modified: subversion/trunk/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/sysinfo.c?rev=1544878&r1=1544877&r2=1544878&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/trunk/subversion/libsvn_subr/sysinfo.c Sat Nov 23 20:46:50 2013
@@ -285,7 +285,7 @@ stringbuf_split_key(svn_stringbuf_t *buf
   key = buffer->data;
   end = strchr(key, delim);
   *end = '\0';
-  buffer->len = 1 + end - key;
+  buffer->len -= 1 + end - key;
   buffer->data = end + 1;
   svn_stringbuf_strip_whitespace(buffer);
Mime
View raw message