diff --git a/xawtv-3.95-no-double-exit.patch b/xawtv-3.95-no-double-exit.patch new file mode 100644 index 0000000..a45a765 --- /dev/null +++ b/xawtv-3.95-no-double-exit.patch @@ -0,0 +1,23 @@ +xawtv uses an idle callback to exit when a user requests it to exit. When xawtv +is blocked waiting for a video frame from a stuck video device, the user can +try to quit multiple times, which will lead to ExitCB getting called multiple +times, which leads to a double free error. + +This patch protects ExitCB against being called twice. Also see: +https://bugzilla.redhat.com/show_bug.cgi?id=608344 +diff -up xawtv-3.95/x11/xt.c~ xawtv-3.95/x11/xt.c +--- xawtv-3.95/x11/xt.c~ 2010-11-17 10:37:53.000000000 +0100 ++++ xawtv-3.95/x11/xt.c 2010-11-17 10:39:24.617724003 +0100 +@@ -313,6 +313,12 @@ ExitWP(XtPointer client_data) + void + ExitCB(Widget widget, XtPointer client_data, XtPointer calldata) + { ++ static int exit_pending = 0; ++ ++ if (exit_pending) ++ return; ++ ++ exit_pending = 1; + audio_off(); + video_overlay(0); + video_close(); diff --git a/xawtv.spec b/xawtv.spec index 2d01a68..79188e8 100644 --- a/xawtv.spec +++ b/xawtv.spec @@ -3,7 +3,7 @@ Summary: TV applications for video4linux compliant devices Name: xawtv Version: 3.95 -Release: 13%{?dist} +Release: 14%{?dist} Group: Applications/Multimedia License: GPLv2+ URL: http://bytesex.org/xawtv/ @@ -25,6 +25,7 @@ Patch10: xawtv-3.95-fixes.patch Patch11: xawtv-3.95-no-dga.patch Patch12: xawtv-3.95-bpl.patch Patch13: xawtv-3.95-v4l2-old-drop.patch +Patch14: xawtv-3.95-no-double-exit.patch # add libv4l2 layer... Patch100: xawtv-3.95-libv4l2.patch @@ -73,6 +74,7 @@ Xawtv also includes a grabber driver for vic. %patch11 -p1 -b .no-dga %patch12 -p1 -b .bpl %patch13 -p1 -b .v4l2-old-drop +%patch14 -p1 %{!?_without_libv4l:%patch100 -p1 -b .libv4l} sed -i -e 's,/usr/X11R6/lib/X11,%{_datadir}/X11,g' configure.ac @@ -164,6 +166,10 @@ rm -fr $RPM_BUILD_ROOT %changelog +* Wed Nov 17 2010 Hans de Goede 3.95-14 +- Protect the exit code from being called twice. This fixes a double + free error when the user tries to exit twice when xawtv is stuck (#608344) + * Fri Mar 12 2010 Hans de Goede 3.95-13 - Fix xawtv not starting due to it not finding its fonts