From: Mark Wooding Date: Sat, 19 Oct 2019 13:41:53 +0000 (+0100) Subject: Merge branch '2.4.x' X-Git-Tag: 2.5.0~7 X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/commitdiff_plain/58f72497877a064213e939bf0b160a6b5c1f29e4?hp=82fc9c74a76f4bfa7cbbb60571ec7cabafa5859f Merge branch '2.4.x' * 2.4.x: struct/buf.c (buf_getmem*): Add an explicit `BENSURE'. --- diff --git a/struct/buf.c b/struct/buf.c index d86904c..bd16ec7 100644 --- a/struct/buf.c +++ b/struct/buf.c @@ -247,6 +247,7 @@ static int findz(buf *b, size_t *nn) { \ uint##n sz; \ if (buf_getu##w(b, &sz)) return (0); \ + if (BENSURE(b, sz)) return (0); \ *nn = sz; \ return (buf_get(b, sz)); \ }