diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-02-14 16:45:18 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-02-14 16:45:18 -0500 |
commit | 4c1ecd75830cbf43bc39b9c77ee01b3ce138e40c (patch) | |
tree | 7efee26cecd81f0426de9aaeda2f5ac24be1bc79 /src | |
parent | ff088ea7d7eb854846a5611361f4744f9bb0ee9e (diff) | |
download | tor-4c1ecd75830cbf43bc39b9c77ee01b3ce138e40c.tar.gz tor-4c1ecd75830cbf43bc39b9c77ee01b3ce138e40c.zip |
fixup! Don't atoi off the end of a buffer chunk.
Use STATIC.
Diffstat (limited to 'src')
-rw-r--r-- | src/or/buffers.c | 4 | ||||
-rw-r--r-- | src/or/buffers.h | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index 537a14a554..015208fbc0 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -1091,13 +1091,13 @@ buf_find_string_offset(const buf_t *buf, const char *s, size_t n) } /** - * Scan the HTTP headers in the <b>headerlen</b>-byte string at + * Scan the HTTP headers in the <b>headerlen</b>-byte memory range at * <b>headers</b>, looking for a "Content-Length" header. Try to set * *<b>result_out</b> to the numeric value of that header if possible. * Return -1 if the header was malformed, 0 if it was missing, and 1 if * it was present and well-formed. */ -/* STATIC */ int +STATIC int buf_http_find_content_length(const char *headers, size_t headerlen, size_t *result_out) { diff --git a/src/or/buffers.h b/src/or/buffers.h index 9762cf2af2..a9273dcd0e 100644 --- a/src/or/buffers.h +++ b/src/or/buffers.h @@ -98,7 +98,7 @@ struct buf_t { #endif #ifdef BUFFERS_PRIVATE -int buf_http_find_content_length(const char *headers, size_t headerlen, +STATIC int buf_http_find_content_length(const char *headers, size_t headerlen, size_t *result_out); #endif |