subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1652461 - /subversion/trunk/subversion/libsvn_fs_x/util.c
Date Fri, 16 Jan 2015 17:14:23 GMT
Author: stefan2
Date: Fri Jan 16 17:14:22 2015
New Revision: 1652461

URL: http://svn.apache.org/r1652461
Log:
Follow-up to r1652457: Fix Windows build.

* subversion/libsvn_fs_x/util.c
  (construct_txn_path): Use sizeof instead of strlen to determine an upper
                        limit to the length of the constant string.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/util.c

Modified: subversion/trunk/subversion/libsvn_fs_x/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/util.c?rev=1652461&r1=1652460&r2=1652461&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/util.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/util.c Fri Jan 16 17:14:22 2015
@@ -284,7 +284,7 @@ construct_txn_path(svn_fs_t *fs,
                    apr_pool_t *result_pool)
 {
   /* Construct the transaction directory name without temp. allocations. */
-  char buffer[SVN_INT64_BUFFER_SIZE + strlen(PATH_EXT_TXN)];
+  char buffer[SVN_INT64_BUFFER_SIZE + sizeof(PATH_EXT_TXN)];
   apr_size_t len = svn__ui64tobase36(buffer, txn_id);
   strncpy(buffer + len, PATH_EXT_TXN, sizeof(buffer) - len - 1);
 



Mime
View raw message