[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Crash in svn_client_switch()

From: SteveKing <steveking_at_gmx.ch>
Date: 2005-06-23 19:38:47 CEST

Hi,

another crashreport sent for TSVN, but happens actually in the
Subversion lib:

svn_client_switch() (switch.c: line 154)
  svn_wc_crawl_revisions2() (adm_crawler.c: line 489)

The reason for the crash:
the line 489 in adm_crawler.c reads
  base_rev = parent_entry->revision;
and 'parent_entry' is NULL.

The 'parent_entry' should be set in svn_wc_entry(), but obviously it
isn't and no error is returned. I've looked that that function:
...
   if (dir_access)
     {
       apr_hash_t *entries;
       SVN_ERR (svn_wc_entries_read (&entries, dir_access, show_hidden,
pool));
       *entry = apr_hash_get (entries, entry_name, APR_HASH_KEY_STRING);
     }
...

the line *entry = apr_hash_get (...) seems the reason for this.
apr_hash_get can return NULL if the hash wasn't found (for whatever
reason), and that return value is not checked. And even though this
function returns NO_ERROR, the apr_hash_get() function could have failed.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Jun 23 19:39:58 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.