You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/05/23 01:41:11 UTC

svn commit: r1485507 - /subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c

Author: stefan2
Date: Wed May 22 23:41:11 2013
New Revision: 1485507

URL: http://svn.apache.org/r1485507
Log:
On the fsfs-format7 branch:
Fix an evil off-by-two error in string length calculation.

* subversion/libsvn_fs_fs/string_table.c
  (svn_fs_fs__string_table_get_func): s/+1/-1/

Modified:
    subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c

Modified: subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c?rev=1485507&r1=1485506&r2=1485507&view=diff
==============================================================================
--- subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c (original)
+++ subversion/branches/fsfs-format7/subversion/libsvn_fs_fs/string_table.c Wed May 22 23:41:11 2013
@@ -840,9 +840,8 @@ svn_fs_fs__string_table_get_func(const s
               len = header->head_length + header->tail_length + 1;
               result = apr_palloc(pool, len);
               
-
               if (length)
-                *length = len + 1;
+                *length = len - 1;
               table_copy_string(result, len, &table_copy, header);
 
               return result;