summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAaron Bannert <aaron@apache.org>2002-06-19 18:43:28 +0000
committerAaron Bannert <aaron@apache.org>2002-06-19 18:43:28 +0000
commitc37b7fb8b5357f3f969f1bf16fc338817cb16f9f (patch)
tree79a0092e15ecebddeb0d388ee6fb3134cc36e83c /modules
parent95f8a13d4215c9b0aa6abacfeea8b7197877d8ba (diff)
downloadhttpd-c37b7fb8b5357f3f969f1bf16fc338817cb16f9f.tar.gz
Better document the error cases returned from get_chunk_size().
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95810 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules')
-rw-r--r--modules/http/http_protocol.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index d8f18ccfc9..48082def1a 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -1763,6 +1763,15 @@ AP_DECLARE(int) ap_should_client_block(request_rec *r)
return 1;
}
+/**
+ * Parse a chunk extension, detect overflow.
+ * There are two error cases:
+ * 1) If the conversion would require too many bits, a -1 is returned.
+ * 2) If the conversion used the correct number of bits, but an overflow
+ * caused only the sign bit to flip, then that negative number is
+ * returned.
+ * In general, any negative number can be considered an overflow error.
+ */
static long get_chunk_size(char *b)
{
long chunksize = 0;