mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-07 02:28:53 +08:00
fix: remove redundant sizeof check
Co-authored-by: Tatsuhiro Tsujikawa <404610+tatsuhiro-t@users.noreply.github.com>
This commit is contained in:
@@ -603,7 +603,7 @@ static int hd_ringbuf_init(nghttp2_hd_ringbuf *ringbuf, size_t bufsize,
|
|||||||
for (size = 1; size < bufsize; size <<= 1)
|
for (size = 1; size < bufsize; size <<= 1)
|
||||||
;
|
;
|
||||||
|
|
||||||
if (size * sizeof(nghttp2_hd_entry *) > max_size) {
|
if (size > max_size) {
|
||||||
return NGHTTP2_ERR_NOMEM;
|
return NGHTTP2_ERR_NOMEM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user