Skip to content

Commit b6f3d78

Browse files
committed
mod_md: change types of fields of ocsp_summary_ctx_t
The number of members in ostat_by_id may be up to UINT_MAX and there are no guarantees that all types of members (good, revoked or unknown) are present. An integer overflow may also occur in md_ocsp_get_summary() when they are summed as ints. Change types of good, revoked and unknown to unsigned. Found by Linux Verification Center (linuxtesting.org) with SVACE. Submitted by: Anastasia Belova <nabelova31 gmail.com> Github: closes #534 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1930710 13f79535-47bb-0310-9956-ffa450edef68
1 parent 8169261 commit b6f3d78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/md/md_ocsp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -930,9 +930,9 @@ apr_status_t md_ocsp_remove_responses_older_than(md_ocsp_reg_t *reg, apr_pool_t
930930
typedef struct {
931931
apr_pool_t *p;
932932
md_ocsp_reg_t *reg;
933-
int good;
934-
int revoked;
935-
int unknown;
933+
unsigned good;
934+
unsigned revoked;
935+
unsigned unknown;
936936
} ocsp_summary_ctx_t;
937937

938938
static int add_to_summary(void *baton, const void *key, apr_ssize_t klen, const void *val)

0 commit comments

Comments
 (0)