From: volpol Date: Wed, 9 Sep 2020 09:37:23 +0000 (+0200) Subject: Fix an off-by-one waiting to happen X-Git-Url: https://git.packet-gain.de/?a=commitdiff_plain;h=3ebd6631f4b9529bc0916508db05225996376432;p=hls.git Fix an off-by-one waiting to happen --- diff --git a/ring.c b/ring.c index 78224aa..7b2a98b 100644 --- a/ring.c +++ b/ring.c @@ -28,7 +28,7 @@ void ring_add(void *data, size_t len){ wrapped = 1; w1 = 0; } else - if (len <= rest){ + if (len < rest){ memcpy(ring + w1, data, len); w1 += len; } else {