]> granicus.if.org Git - libass/commitdiff
Fix broken memory leak check in legacy API
authorwm4 <wm4@nowhere>
Sat, 22 Nov 2014 02:18:25 +0000 (03:18 +0100)
committerwm4 <wm4@nowhere>
Sat, 22 Nov 2014 02:18:25 +0000 (03:18 +0100)
This was a check for the realloc() call, but the result was never
used in the success case - which makes no sense.

Doesn't really matter, because it's the legacy charset code which
hopefully is not used by anyone.

Found by Coverity.

libass/ass.c

index 75f646fdbad2842b1c97694aa1aa76fc080557a4..04ce895f46ed4fb1513499cd63be2d3a44c82d21 100644 (file)
@@ -1002,6 +1002,7 @@ static char *sub_recode(ASS_Library *library, char *data, size_t size,
                         outbuf = 0;
                         goto out;
                     }
+                    outbuf = nbuf;
                     op = outbuf + offset;
                     osize += size;
                     oleft += size;