]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
fixup! Don't atoi off the end of a buffer chunk.
authorNick Mathewson <nickm@torproject.org>
Tue, 14 Feb 2017 21:45:18 +0000 (16:45 -0500)
committerNick Mathewson <nickm@torproject.org>
Tue, 14 Feb 2017 21:45:18 +0000 (16:45 -0500)
Use STATIC.

src/or/buffers.c
src/or/buffers.h

index 537a14a5545b56452152212bd89fe9dea2d1bc39..015208fbc0124b92e006a54ccd5333a7d42dc875 100644 (file)
@@ -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)
 {
index 9762cf2af25e654d4bf1776d20e054073b06803c..a9273dcd0e09e5bbd13503f529b79020df539d95 100644 (file)
@@ -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