[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-bugs] #15546 [Tor]: handle_control_postdescriptor() modifies a const char
#15546: handle_control_postdescriptor() modifies a const char
---------------------+---------------------
Reporter: donncha | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Tor | Version:
Keywords: | Actual Points:
Parent ID: | Points:
---------------------+---------------------
`handle_control_postdescriptor()` in src/or/control.c modifies the const
char body. This is a pretty bad practice and might causes errors with non
writable memory segments.
{{{
static int handle_control_postdescriptor(control_connection_t *conn,
uint32_t len, const char *body) {
char *cp = memchr(body, '\n', len);
smartlist_t *args = smartlist_new();
tor_assert(cp);*cp++ = '\0';
}}}
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15546>
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