mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 13:13:44 +01:00
nodelist: use strcmpstart() instead of strncmp()
in rend_parse_v2_service_descriptor.
Fix on c58675ca72
This commit is contained in:
parent
19dbc385d5
commit
ab91302fd0
3
changes/ticket27630
Normal file
3
changes/ticket27630
Normal file
@ -0,0 +1,3 @@
|
||||
o Code simplification and refactoring:
|
||||
- Use the simpler strcmpstart() helper in rend_parse_v2_service_descriptor
|
||||
instead of strncmp(). Closes ticket 27630.
|
@ -5167,8 +5167,7 @@ rend_parse_v2_service_descriptor(rend_service_descriptor_t **parsed_out,
|
||||
|
||||
tor_assert(desc);
|
||||
/* Check if desc starts correctly. */
|
||||
if (strncmp(desc, "rendezvous-service-descriptor ",
|
||||
strlen("rendezvous-service-descriptor "))) {
|
||||
if (strcmpstart(desc, "rendezvous-service-descriptor ")) {
|
||||
log_info(LD_REND, "Descriptor does not start correctly.");
|
||||
goto err;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user