]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Better document the error cases returned from get_chunk_size().
authorAaron Bannert <aaron@apache.org>
Wed, 19 Jun 2002 18:44:25 +0000 (18:44 +0000)
committerAaron Bannert <aaron@apache.org>
Wed, 19 Jun 2002 18:44:25 +0000 (18:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95811 13f79535-47bb-0310-9956-ffa450edef68

src/main/http_protocol.c

index b96a55e45b062df97277646e131323aa5d9b8b7f..0ecc0ad03f72d7b1a6fdc52fe154983554f3c2bc 100644 (file)
@@ -2051,6 +2051,15 @@ API_EXPORT(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.
+ */
 API_EXPORT(long) ap_get_chunk_size(char *b)
 {
     long chunksize = 0;