commit | 3a374eaeebb6aab0302653d048d08707c1ecd17c | [log] [tgz] |
---|---|---|
author | William Lallemand <wlallemand@haproxy.org> | Tue Sep 27 14:31:37 2022 +0200 |
committer | William Lallemand <wlallemand@haproxy.org> | Tue Sep 27 14:31:37 2022 +0200 |
tree | d6d4543d95686a758a59f14f6010697c3eb1ec3b | |
parent | bb650f2be81f1415debfa26e837d6b6bdff0fd2e [diff] |
BUG/MINOR: ring: fix the size check in ring_make_from_area() Fix the size check in ring_make_from_area() which is checking the size of the pointer instead of the size of the structure. No backport needed, 2.7 only.
diff --git a/src/ring.c b/src/ring.c index 089a2fc..da987c5 100644 --- a/src/ring.c +++ b/src/ring.c
@@ -85,7 +85,7 @@ { struct ring *ring = NULL; - if (size < sizeof(ring)) + if (size < sizeof(*ring)) return NULL; if (!area)