From 85eeb68ea1a415f9d7b54d0a7a61803e72cd50c0 Mon Sep 17 00:00:00 2001 From: Christian Spielberger Date: Wed, 9 Nov 2022 08:14:28 +0100 Subject: [PATCH] aubuf: avoid underflow of cur_sz --- src/aubuf/aubuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/aubuf/aubuf.c b/src/aubuf/aubuf.c index 5a2bd8f..e2b5adb 100644 --- a/src/aubuf/aubuf.c +++ b/src/aubuf/aubuf.c @@ -254,7 +254,7 @@ int aubuf_append_auframe(struct aubuf *ab, struct mbuf *mb, #endif f = list_ledata(ab->afl.head); if (f) { - ab->cur_sz -= sz; + ab->cur_sz -= mbuf_get_left(f->mb); mem_deref(f); } }