Coverity <https://scan.coverity.com>


Found
r1816368, r1816367, r1816366, r1816365, r1816364, r1816363, r1738294, r1738262, r1738259, r1735916, r1735880, r877001, r872403, r872402, r872400, r863010, r859813, r859687, r859653, r859645, r859644, r859596, r859594, r859591, r859590, r859589, r859588, r859587, r859586, r859578, r859577

r859577 | djames | 2006-05-03 21:22:20 +0000 (Wed, 03 May 2006)

* subversion/libsvn_fs_base/dag.c
  (svn_fs_base__dag_commit_txn): Don't check whether 'new_rev' is NULL. We
  already require that new_rev must be non-NULL because we dereference the
  pointer regardless.

Found by: Coverity <http://scan.coverity.com>
(CID: 11)


r859578 | djames | 2006-05-03 21:44:30 +0000 (Wed, 03 May 2006)

* subversion/libsvn_wc/props.c
  (svn_wc_props_modified_p): Cleanup dead code. We only need to check once
  whether an entry exists -- not three times! Also, cleanup subpools when no
  entry is found, and when propcaching is enabled.

Found by: Coverity <http://scan.coverity.com>
(CID: 2)


r859586 | lundblad | 2006-05-04 19:45:54 +0000 (Thu, 04 May 2006)


* subversion/libsvn_ra_svn/editor.c
  (ra_svn_handle_apply_textdelta): Avoid use of uninitialized variable.

Found by: Coverity <http://www.coverity.com>
(CID: 28)


r859587 | djames | 2006-05-04 20:38:24 +0000 (Thu, 04 May 2006)

* subversion/libsvn_client/copy.c
  (wc_to_repos_copy): Remove unnecessary "commit_in_progress" variable and
  associated checks. We never abort a commit in progress, so these checks
  aren't necessary.

Found by: Coverity <http://scan.coverity.com>
(CID: 3)


r859588 | lundblad | 2006-05-04 20:56:34 +0000 (Thu, 04 May 2006)


* subversion/libsvn_wc/status.c
  (make_file_baton): Don't check for the parent baton being null, because it
  can't be.

Found by: Coverity <http://www.coverity.com>
(CID: 21)


r859589 | djames | 2006-05-04 21:04:25 +0000 (Thu, 04 May 2006)

* subversion/libsvn_fs_base/util/fs_skels.c
  (is_valid_rep_delta_chunk_skel): Update length check to account for the fact
  that the window checksum skel was removed in r7643.

Found by: Coverity <http://scan.coverity.com>
(CID: 1)


r859590 | lundblad | 2006-05-04 21:18:53 +0000 (Thu, 04 May 2006)

* subversion/mod_dav_svn/lock.c
  (dav_svn_find_lock): Create a new error in a case where we were trying to
  convert a non-existing svn error.

Found by: Coverity <http://scan.coverity.com>
(CID: 19)


r859591 | djames | 2006-05-04 22:02:34 +0000 (Thu, 04 May 2006)

* subversion/libsvn_ra_dav/replay.c
  (start_element): Don't push an undefined dir_baton onto the stack when
  the root element is missing a required attribute.

Found by: Coverity <http://scan.coverity.com>
(CID: 27)


r859594 | lundblad | 2006-05-05 06:37:34 +0000 (Fri, 05 May 2006)

* subversion/mod_dav_svn/version.c
  (dav_svn__build_lock_hash): Don't crash if there were elements in our
  namespace, but still no lock-token-list element.
  (This doesn't happen with our current client.)

Found by: Coverity <http://scan.coverity.com>
(CID: 18)


r859596 | lundblad | 2006-05-05 07:44:50 +0000 (Fri, 05 May 2006)


* subversion/libsvn_wc/update_editor.c
  (change_file_prop): Don't crash if the last-change-date property is
  NULL.

Found by: Coverity <http://scan.coverity.com>
(CID: 6)


r859644 | lundblad | 2006-05-09 09:10:06 +0000 (Tue, 09 May 2006)

* subversion/libsvn_repos/delta.c
  (delta_proplists): Remove redundant check for uuid being null.

Found by: Coverity <http://scan.coverity.com/>
(CID: 8)


r859645 | lundblad | 2006-05-09 09:31:34 +0000 (Tue, 09 May 2006)

* subversion/libsvn_client/repos_diff.c
  (open_root): Remove redundant check for the target being NULL.

Found by: Coverity <http://scan.coverity.com>
(CID: 22)


r859653 | lundblad | 2006-05-09 15:25:52 +0000 (Tue, 09 May 2006)

* subversion/libsvn_subr/prompt.c
  (svn_cmdline_auth_ssl_server_trust_prompt): Remove redundant NULL
  pointer check.

Found by: Coverity <http://scan.coverity.com>
(CID: 26)


r859687 | maxb | 2006-05-11 12:10:34 +0000 (Thu, 11 May 2006)

Remove some redundant NULL-ness checks, and clarify others by checking
variables more directly related to the flow of control.

Found by: Coverity <http://scan.coverity.com>
(CID: 13, 14, 15, 16)

* subversion/libsvn_subr/opt.c (svn_opt_print_help, svn_opt_print_help2):


r859813 | malcolm | 2006-05-22 13:55:50 +0000 (Mon, 22 May 2006)

* subversion/libsvn_repos/reporter.c
  (delta_proplists): Remove redundant check for uuid being null.

See also r19570, which fixed an identical instance of this problem in delta.c.

Found by: Coverity <http://scan.coverity.com/>
(CID: 8)


r863010 | ehu | 2007-01-08 23:44:35 +0000 (Mon, 08 Jan 2007)

r22727 followup

* subversion/libsvn_wc/adm_crawler.c
  (svn_wc_transmit_text_deltas2): Remove dead code and comment cruft.

Found by: Coverity <http://scan.coverity.com/>
(CID: 47)


r872400 | hwright | 2008-07-29 19:53:06 +0000 (Tue, 29 Jul 2008)

Avoid a NULL-pointer dereference.

Found by: Coverity <http://scan.coverity.com/>
(CID: 75)

* subversion/libsvn_subr/mergeinfo.c
  (combine_with_lastrange):  Allocate a stucture before attempting to
    access its members.


r872402 | hwright | 2008-07-29 20:33:47 +0000 (Tue, 29 Jul 2008)

Avoid passing a NULL value to strcmp().  Although most modern implementations
of strcmp() include a NULL check, the C89 standard, which we claim to support,
does not allow this.  A cursory web search reveals some implementations which
do crash on NULL input, so this is a valid issue.

Found by: Coverity <http://scan.coverity.com/>
(CID: 85)

* subversion/libsvn_subr/simple_providers.c
  (svn_auth__simple_save_creds_helper): Check a value for NULL before using
    it for comparison.


r872403 | hwright | 2008-07-29 20:40:30 +0000 (Tue, 29 Jul 2008)

Fix an uninitialized variable error.

Found by: Coverity <http://scan.coverity.com/>
(CID: 77)

* subversion/libsvn_client/url.c
  (svn_client__derive_location): Initialize the cancelation function and baton
    for the case where they aren't user provided.


r877001 | hwright | 2009-04-01 19:48:18 +0000 (Wed, 01 Apr 2009)

Remove some dead code.

* subversion/libsvn_client/externals.c
  (switch_file_external): We don't generate any errors between this check and
    the one before it, so don't bother checking the error again.

Found by: Coverity <http://scan.coverity.com/>
(CID: 104)


r1735880 | jamessan | 2016-03-20 13:35:09 +0000 (Sun, 20 Mar 2016)

* subversion/tests/libsvn_diff/parse-diff-test.c
  (test_parse_git_tree_and_text_diff, test_parse_git_diff): Assert on
  {old,new}_{executable,symlink}_bit equality with expected value instead of
  the reslut of the assignment of the expected value.

Found by: Coverity <https://scan.coverity.com/>
(CID: 1356909-1356916, 1356946-1356952)



r1735916 | jamessan | 2016-03-21 01:33:59 +0000 (Mon, 21 Mar 2016)

* subversion/libsvn_fs_fs/cached_data.c
  (skip_contents): Remove use of subpool variable in its initialization.

Found by: Coverity <https://scan.coverity.com>
(CID: 1331979)



r1738259 | jamessan | 2016-04-08 15:28:27 +0000 (Fri, 08 Apr 2016)

* subversion/libsvn_repos/log.c
  (do_logs): Use sizeof(*cur_rev) instead of sizeof(cur_rev) to fix out of
    bounds read when sizeof(svn_revnum_t) < sizeof(svn_revnum_t *)

Found by: Coverity <https://scan.coverity.com>
(CID: 1331600)


r1738262 | jamessan | 2016-04-08 15:53:02 +0000 (Fri, 08 Apr 2016)

* subversion/libsvn_client/diff_local.c
  (inner_dir_diff): Set left_only, not right_only, when right_abspath doesn't exist.

Found by: Coverity <https://scan.coverity.com>
(CID: 1332090)


r1738294 | ivan | 2016-04-08 19:58:36 +0000 (Fri, 08 Apr 2016)

* subversion/libsvn_client/diff_local.c
  (svn_client__arbitrary_nodes_diff): Remove duplicate condition.

Found by: Coverity <https://scan.coverity.com>
(CID: 1331995)


r1816363 | jamessan | 2017-11-26 05:32:51 +0000 (Sun, 26 Nov 2017)

Use consistent ordering for normalize_props argument, after ignore_date.

* subversion/libsvn_repos/load-fs-vtable.c
  (svn_repos_load_fs6): Reorder parameters to match declaration

* subversion/svnadmin/svnadmin.c
  (subcommand_load): Call svn_repos_load_fs6() with normalize_props in the
    correct argument.
  (subcommand_load_revprops): Call svn_repos_load_fs_revprops() with
    normalize_props in the correct argument.

Found by: Coverity <https://scan.coverity.com>
(CID: 1423312)


r1816364 | jamessan | 2017-11-26 06:18:13 +0000 (Sun, 26 Nov 2017)

* subversion/svn/util.c
  (svn_cl__try): Add missing call to va_end() in happy path

Found by: Coverity <https://scan.coverity.com>
(CID: 1036813)


r1816365 | jamessan | 2017-11-26 06:35:30 +0000 (Sun, 26 Nov 2017)

* subversion/libsvn_ra_serf/serf.c
  (ra_serf_dup_session): Duplicate proxy_password to the correct member of the
    new session, instead of overwriting proxy_username.

Found by: Coverity <https://scan.coverity.com>
(CID: 1332091)


r1816366 | jamessan | 2017-11-26 06:46:13 +0000 (Sun, 26 Nov 2017)

* subversion/tests/libsvn_subr/subst_translate-test.c
  (test_svn_subst_translate_string2_null_encoding): Adjust size for strncpy()
    to ensure buffer is NULL-terminated.

Found by: Coverity <https://scan.coverity.com>
(CID: 1356919)


r1816367 | jamessan | 2017-11-26 07:04:47 +0000 (Sun, 26 Nov 2017)

* subversion/libsvn_client/conflicts.c
  (find_modified_rev): Remove unnecessary check for details being NULL, since
    it has already been dereferenced earlier in the function.

Found by: Coverity <https://scan.coverity.com>
(CID: 1357097)


r1816368 | jamessan | 2017-11-26 07:12:26 +0000 (Sun, 26 Nov 2017)

* subversion/libsvn_client/conflicts.c
  (conflict_tree_get_details_incoming_delete): Check if details is NULL before
    dereferencing it

Found by: Coverity <https://scan.coverity.com>
(CID: 1400672)