Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #25912

Closed (moved)
(moved)
Open
Created Apr 25, 2018 by George Kadianakis@asn

CID 1435130: Incorrect expression (COPY_PASTE_ERROR)

Seems like #23693 (moved) caused the following coverity warning:

** CID 1435130:  Incorrect expression  (COPY_PASTE_ERROR)
/src/or/router.c: 153 in dup_onion_keys()

________________________________________________________________________________________________________
*** CID 1435130:  Incorrect expression  (COPY_PASTE_ERROR)
/src/or/router.c: 153 in dup_onion_keys()
147       tor_assert(key);
148       tor_assert(last);
149       tor_mutex_acquire(key_lock);
150       if (onionkey)
151         *key = crypto_pk_copy_full(onionkey);
152       else
>>>     CID 1435130:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "last" in "*last = NULL" looks like a copy-paste error.
153         *last = NULL;
154       if (lastonionkey)
155         *last = crypto_pk_copy_full(lastonionkey);
156       else
157         *last = NULL;
158       tor_mutex_release(key_lock);

Perhaps this new *last = NULL; should have been *key = NULL.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking