From: Michael Orlitzky Date: Mon, 7 Aug 2023 00:44:29 +0000 (-0400) Subject: io-svg.c: do nothing if we're handed an increment of size zero X-Git-Tag: 0.0.1~16 X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=d526290b2a14183621b368b255c5e56190fd13cb;p=libsvgtiny-pixbuf.git io-svg.c: do nothing if we're handed an increment of size zero --- diff --git a/io-svg.c b/io-svg.c index e44af1a..b1cb332 100644 --- a/io-svg.c +++ b/io-svg.c @@ -363,7 +363,10 @@ static gboolean gdk_pixbuf_load_increment(gpointer data, GError** error) { SvgTinyContext* context = (SvgTinyContext*)data; - /* YOLO, what is error checking? */ + if (buf_size == 0) { + return TRUE; + } + context->svg_data = g_realloc(context->svg_data, context->svg_data_size + buf_size); memcpy(context->svg_data + context->svg_data_size, buf, buf_size);