X-Git-Url: https://git.distorted.org.uk/~mdw/mLib/blobdiff_plain/0d61a23cc6a7628bb9ada98ae7a65700dc1fd2f7..f868c4327d366a7e142e27ffbaa383d75aef6c1b:/struct/buf.c 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)); \ }