fixup! Don't atoi off the end of a buffer chunk.

Use STATIC.
This commit is contained in:
Nick Mathewson
2017-02-14 16:45:18 -05:00
parent ff088ea7d7
commit 4c1ecd7583
2 changed files with 3 additions and 3 deletions
+2 -2
View 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)
{
+1 -1
View 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