mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-27 22:03:31 +01:00
r18236@catbus: nickm | 2008-02-19 18:55:21 -0500
Explain why I am right and veracode is wrong in routerparse.c line 1141. Using math! svn:r13602
This commit is contained in:
parent
913f66278c
commit
260c37c14c
@ -1133,6 +1133,12 @@ router_parse_entry_from_string(const char *s, const char *end,
|
||||
memcpy(cp, prepend_annotations, prepend_len);
|
||||
cp += prepend_len;
|
||||
}
|
||||
/* This assertion will always succeed.
|
||||
* len == signed_desc_len + annotations_len
|
||||
* == end-s + s-start_of_annotations + prepend_len
|
||||
* == end-start_of_annotations + prepend_len
|
||||
* We already wrote prepend_len bytes into the buffer; now we're
|
||||
* writing end-start_of_annotations -NM. */
|
||||
tor_assert(cp+(end-start_of_annotations) ==
|
||||
router->cache_info.signed_descriptor_body+len);
|
||||
memcpy(cp, start_of_annotations, end-start_of_annotations);
|
||||
|
Loading…
Reference in New Issue
Block a user