[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-bugs] #21496 [Core Tor/Tor]: Check string passed to extrainfo_parse_entry_from_string



#21496: Check string passed to extrainfo_parse_entry_from_string
------------------------------+--------------------------------------------
     Reporter:  teor          |      Owner:
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: 0.3.2.x-final
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  clang scan-build memory-safety
Actual Points:                |  Parent ID:
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+--------------------------------------------
 scan-build reports the following out of bounds access, because it doesn't
 know that s is always non-NULL. But we should guard against it being NULL.

 extrainfo_parse_entry_from_string:
 {{{
 +  if (BUG(!s))
 +    return;
    while (end > s+2 && *(end-1) == '\n' && *(end-2) == '\n')
 }}}

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/21496>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs