changeset 24350:eb7b1f3327aa

Add a check for c->head being NULL in pullup_free_context(). This fixes crashes when an invalid filter chain is built Patch by Alexander Strange % astrange A ithinksw P com % Original thread: date: Sep 7, 2007 8:47 PM subject: [MPlayer-dev-eng] [PATCH] crash in pullup with invalid filters
author gpoirier
date Sat, 08 Sep 2007 14:43:10 +0000
parents 30092ed63592
children 5a92d4b9f1fb
files libmpcodecs/pullup.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/pullup.c	Sat Sep 08 14:02:22 2007 +0000
+++ b/libmpcodecs/pullup.c	Sat Sep 08 14:43:10 2007 +0000
@@ -795,6 +795,7 @@
 	free(c->buffers);
 	f = c->head;
 	do {
+		if (!f) break;
 		free(f->diffs);
 		free(f->comb);
 		f = f->next;