Skip to content

Commit 8e529ce

Browse files
committed
* mod_http2/mod_proxy_http2: fix a bug in calculating the log2 value of
integers, used in push diaries and proxy window size calculations. PR69741 [Benjamin P. Kallus] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1927235 13f79535-47bb-0310-9956-ffa450edef68
1 parent dd60cec commit 8e529ce

File tree

5 files changed

+7
-4
lines changed

5 files changed

+7
-4
lines changed

changes-entries/pr69741.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
* mod_http2/mod_proxy_http2: fix a bug in calculating the log2 value of
2+
integers, used in push diaries and proxy window size calculations.
3+
PR69741 [Benjamin P. Kallus]

modules/http2/h2_proxy_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
APLOG_USE_MODULE(proxy_http2);
3535

3636
/* h2_log2(n) iff n is a power of 2 */
37-
unsigned char h2_proxy_log2(int n)
37+
unsigned char h2_proxy_log2(unsigned int n)
3838
{
3939
int lz = 0;
4040
if (!n) {

modules/http2/h2_proxy_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ int h2_proxy_iq_shift(h2_proxy_iqueue *q);
150150
* common helpers
151151
******************************************************************************/
152152
/* h2_proxy_log2(n) iff n is a power of 2 */
153-
unsigned char h2_proxy_log2(int n);
153+
unsigned char h2_proxy_log2(unsigned int n);
154154

155155
/*******************************************************************************
156156
* HTTP/2 header helpers

modules/http2/h2_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
#include "h2_util.h"
3333

3434
/* h2_log2(n) iff n is a power of 2 */
35-
unsigned char h2_log2(int n)
35+
unsigned char h2_log2(unsigned int n)
3636
{
3737
int lz = 0;
3838
if (!n) {

modules/http2/h2_util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ apr_status_t h2_ififo_remove(h2_ififo *fifo, int id);
323323
* common helpers
324324
******************************************************************************/
325325
/* h2_log2(n) iff n is a power of 2 */
326-
unsigned char h2_log2(int n);
326+
unsigned char h2_log2(unsigned int n);
327327

328328
/**
329329
* Count the bytes that all key/value pairs in a table have

0 commit comments

Comments
 (0)