You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2014/09/19 18:16:47 UTC
svn commit: r1626259 - in /subversion/branches/remove-log-addressing: ./
subversion/libsvn_fs_fs/lock.c subversion/libsvn_fs_fs/low_level.c
subversion/libsvn_fs_fs/temp_serializer.c subversion/libsvn_ra_svn/client.c
Author: ivan
Date: Fri Sep 19 16:16:47 2014
New Revision: 1626259
URL: http://svn.apache.org/r1626259
Log:
On remove-log-addressing branch: Merge changes from trunk.
Modified:
subversion/branches/remove-log-addressing/ (props changed)
subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c
subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.c
subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/temp_serializer.c
subversion/branches/remove-log-addressing/subversion/libsvn_ra_svn/client.c
Propchange: subversion/branches/remove-log-addressing/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1626220-1626258
Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c?rev=1626259&r1=1626258&r2=1626259&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/lock.c Fri Sep 19 16:16:47 2014
@@ -386,7 +386,8 @@ add_to_digest(const char *fs_path,
const char *index_digest_path;
apr_hash_t *children;
svn_lock_t *lock;
- int i, original_count;
+ int i;
+ unsigned int original_count;
SVN_ERR(digest_path_from_path(&index_digest_path, fs_path, index_path, pool));
Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.c?rev=1626259&r1=1626258&r2=1626259&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/low_level.c Fri Sep 19 16:16:47 2014
@@ -615,8 +615,8 @@ read_header_block(apr_hash_t **headers,
{
svn_stringbuf_t *header_str;
const char *name, *value;
- apr_ssize_t i = 0;
- apr_ssize_t name_len;
+ apr_size_t i = 0;
+ apr_size_t name_len;
svn_boolean_t eof;
SVN_ERR(svn_stream_readline(stream, &header_str, "\n", &eof,
@@ -640,13 +640,10 @@ read_header_block(apr_hash_t **headers,
name = header_str->data;
name_len = i;
- /* Skip over the NULL byte and the space following it. */
- i += 2;
-
- if (i > header_str->len)
+ /* Check if we have enough data to parse. */
+ if (i + 2 > header_str->len)
{
/* Restore the original line for the error. */
- i -= 2;
header_str->data[i] = ':';
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
_("Found malformed header '%s' in "
@@ -654,6 +651,9 @@ read_header_block(apr_hash_t **headers,
header_str->data);
}
+ /* Skip over the NULL byte and the space following it. */
+ i += 2;
+
value = header_str->data + i;
/* header_str is safely in our pool, so we can use bits of it as
Modified: subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/temp_serializer.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/temp_serializer.c?rev=1626259&r1=1626258&r2=1626259&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/temp_serializer.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_fs_fs/temp_serializer.c Fri Sep 19 16:16:47 2014
@@ -205,7 +205,7 @@ static svn_temp_serializer__context_t *
serialize_dir(apr_array_header_t *entries, apr_pool_t *pool)
{
dir_data_t dir_data;
- apr_size_t i = 0;
+ int i = 0;
svn_temp_serializer__context_t *context;
/* calculate sizes */
Modified: subversion/branches/remove-log-addressing/subversion/libsvn_ra_svn/client.c
URL: http://svn.apache.org/viewvc/subversion/branches/remove-log-addressing/subversion/libsvn_ra_svn/client.c?rev=1626259&r1=1626258&r2=1626259&view=diff
==============================================================================
--- subversion/branches/remove-log-addressing/subversion/libsvn_ra_svn/client.c (original)
+++ subversion/branches/remove-log-addressing/subversion/libsvn_ra_svn/client.c Fri Sep 19 16:16:47 2014
@@ -368,15 +368,16 @@ ra_svn_get_reporter(svn_ra_svn__session_
/* --- RA LAYER IMPLEMENTATION --- */
-/* (Note: *ARGV is an output parameter.) */
+/* (Note: *ARGV_P is an output parameter.) */
static svn_error_t *find_tunnel_agent(const char *tunnel,
const char *hostinfo,
- const char ***argv,
+ const char ***argv_p,
apr_hash_t *config, apr_pool_t *pool)
{
svn_config_t *cfg;
const char *val, *var, *cmd;
char **cmd_argv;
+ const char **argv;
apr_size_t len;
apr_status_t status;
int n;
@@ -430,16 +431,22 @@ static svn_error_t *find_tunnel_agent(co
if (status != APR_SUCCESS)
return svn_error_wrap_apr(status, _("Can't tokenize command '%s'"), cmd);
- /* Append the fixed arguments to the result. */
+ /* Calc number of the fixed arguments. */
for (n = 0; cmd_argv[n] != NULL; n++)
;
- *argv = apr_palloc(pool, (n + 4) * sizeof(char *));
- memcpy(*argv, cmd_argv, n * sizeof(char *));
- (*argv)[n++] = svn_path_uri_decode(hostinfo, pool);
- (*argv)[n++] = "svnserve";
- (*argv)[n++] = "-t";
- (*argv)[n] = NULL;
+ argv = apr_palloc(pool, (n + 4) * sizeof(char *));
+
+ /* Append the fixed arguments to the result. */
+ for (n = 0; cmd_argv[n] != NULL; n++)
+ argv[n] = cmd_argv[n];
+
+ argv[n++] = svn_path_uri_decode(hostinfo, pool);
+ argv[n++] = "svnserve";
+ argv[n++] = "-t";
+ argv[n] = NULL;
+
+ *argv_p = argv;
return SVN_NO_ERROR;
}