X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/mLib/blobdiff_plain/0d61a23cc6a7628bb9ada98ae7a65700dc1fd2f7..refs/heads/mdw/cfd-subtree:/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)); \ }