diff --git a/include/haproxy/hpack-tbl.h b/include/haproxy/hpack-tbl.h index 02cf7db54..becabf21b 100644 --- a/include/haproxy/hpack-tbl.h +++ b/include/haproxy/hpack-tbl.h @@ -78,7 +78,7 @@ static inline const struct hpack_dte *hpack_get_dte(const struct hpack_dht *dht, /* returns non-zero if is valid for table */ static inline int hpack_valid_idx(const struct hpack_dht *dht, uint32_t idx) { - return idx < dht->used + HPACK_SHT_SIZE; + return idx > 0 && idx < dht->used + HPACK_SHT_SIZE; } /* return a pointer to the header name for entry . */