Hello,

found a string handling issue:
$ svn --version -v
[...]
  - openSUSE 12 (Mantis) [Linux 3.4.63-2.44-desktop]
[...]         ^^^
This when "lsb_release -a" clearly contains:
Description:    openSUSE 12.2 (i586)

Turns out stringbuf_split_key calculates the buffer length incorrectly,
causing the distribution name to be cut off after the length of the
label instead of the remaining string, in this case 11 characters. Patch
attached.

[[[
Ensure full distribution description is printed in svn --version -v

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

With kind regards,
Andreas Stieger
Index: subversion/libsvn_subr/sysinfo.c
===================================================================
--- subversion/libsvn_subr/sysinfo.c	(revision 1544877)
+++ subversion/libsvn_subr/sysinfo.c	(working copy)
@@ -285,7 +285,7 @@ stringbuf_split_key(svn_stringbuf_t *buffer, char
   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);
 

Reply via email to