Date: Tue, 18 Sep 2018 10:01:39 +0000 (UTC) From: Dmitry Sivachenko <demon@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r480005 - in head/net/haproxy: . files Message-ID: <201809181001.w8IA1duC017700@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: demon Date: Tue Sep 18 10:01:39 2018 New Revision: 480005 URL: https://svnweb.freebsd.org/changeset/ports/480005 Log: Fix out-of-bounds access. Obtained from: upstream Added: head/net/haproxy/files/patch-fix-outofbounds (contents, props changed) Modified: head/net/haproxy/Makefile Modified: head/net/haproxy/Makefile ============================================================================== --- head/net/haproxy/Makefile Tue Sep 18 09:38:23 2018 (r480004) +++ head/net/haproxy/Makefile Tue Sep 18 10:01:39 2018 (r480005) @@ -3,6 +3,7 @@ PORTNAME= haproxy DISTVERSION= 1.8.13 +PORTREVISION= 1 CATEGORIES= net www MASTER_SITES= http://www.haproxy.org/download/1.8/src/ Added: head/net/haproxy/files/patch-fix-outofbounds ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/haproxy/files/patch-fix-outofbounds Tue Sep 18 10:01:39 2018 (r480005) @@ -0,0 +1,60 @@ +diff --git a/include/common/hpack-tbl.h b/include/common/hpack-tbl.h +index ffa866b..385f386 100644 +--- include/common/hpack-tbl.h ++++ include/common/hpack-tbl.h +@@ -155,7 +155,7 @@ static inline const struct hpack_dte *hpack_get_dte(const struct hpack_dht *dht, + } + + /* returns non-zero if <idx> is valid for table <dht> */ +-static inline int hpack_valid_idx(const struct hpack_dht *dht, uint16_t idx) ++static inline int hpack_valid_idx(const struct hpack_dht *dht, uint32_t idx) + { + return idx < dht->used + HPACK_SHT_SIZE; + } +@@ -181,7 +181,7 @@ static inline struct ist hpack_get_value(const struct hpack_dht *dht, const stru + } + + /* takes an idx, returns the associated name */ +-static inline struct ist hpack_idx_to_name(const struct hpack_dht *dht, int idx) ++static inline struct ist hpack_idx_to_name(const struct hpack_dht *dht, uint32_t idx) + { + const struct hpack_dte *dte; + +@@ -196,7 +196,7 @@ static inline struct ist hpack_idx_to_name(const struct hpack_dht *dht, int idx) + } + + /* takes an idx, returns the associated value */ +-static inline struct ist hpack_idx_to_value(const struct hpack_dht *dht, int idx) ++static inline struct ist hpack_idx_to_value(const struct hpack_dht *dht, uint32_t idx) + { + const struct hpack_dte *dte; + +diff --git a/src/hpack-dec.c b/src/hpack-dec.c +index dfbcaff..99d40f9 100644 +--- src/hpack-dec.c ++++ src/hpack-dec.c +@@ -110,7 +110,7 @@ static inline int hpack_idx_to_phdr(uint32_t idx) + * allocated there. In case of allocation failure, returns a string whose + * pointer is NULL. + */ +-static inline struct ist hpack_alloc_string(struct chunk *store, int idx, struct ist in) ++static inline struct ist hpack_alloc_string(struct chunk *store, uint32_t idx, struct ist in) + { + struct ist out; + +diff --git a/src/hpack-tbl.c b/src/hpack-tbl.c +index 9d6b764..e2d4426 100644 +--- src/hpack-tbl.c ++++ src/hpack-tbl.c +@@ -113,7 +113,7 @@ static inline unsigned int hpack_dht_get_tail(const struct hpack_dht *dht) + /* dump the whole dynamic header table */ + static void hpack_dht_dump(const struct hpack_dht *dht) + { +- int i; ++ unsigned int i; + unsigned int slot; + char name[4096], value[4096]; + +-- +1.7.12.1 +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201809181001.w8IA1duC017700>