From 1eeeb568922b9a0ecb2a0acf454e4f3fea686a5c Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Oct 09 2010 18:59:52 +0000 Subject: avoid SIGSEGV in v4l2_capture_start() (#641623) --- diff --git a/libunicap-bz641623.patch b/libunicap-bz641623.patch new file mode 100644 index 0000000..983eeae --- /dev/null +++ b/libunicap-bz641623.patch @@ -0,0 +1,15 @@ +diff --git a/cpi/v4l2cpi/v4l2.c b/cpi/v4l2cpi/v4l2.c +index a8e0c92..ec4c8db 100644 +--- a/cpi/v4l2cpi/v4l2.c ++++ b/cpi/v4l2cpi/v4l2.c +@@ -1928,6 +1928,10 @@ static unicap_status_t v4l2_capture_start( void *cpi_data ) + } + + handle->buffer_mgr = buffer_mgr_create( handle->fd, &handle->current_format ); ++ if( !handle->buffer_mgr ) ++ { ++ return STATUS_FAILURE; ++ } + + handle->capture_running = 1; + diff --git a/libunicap.spec b/libunicap.spec index 27f2f82..f4f6a8a 100644 --- a/libunicap.spec +++ b/libunicap.spec @@ -7,7 +7,7 @@ Summary: Library to access different kinds of (video) capture devices Name: libunicap Version: 0.9.12 -Release: 2%{?dist} +Release: 3%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://www.unicap-imaging.org/ @@ -17,6 +17,7 @@ Patch0: libunicap-0.9.12-includes.patch Patch1: libunicap-0.9.12-memerrs.patch Patch2: libunicap-0.9.12-arraycmp.patch Patch3: libunicap-0.9.12-warnings.patch +Patch4: libunicap-bz641623.patch BuildRequires: intltool, /usr/bin/perl, perl(XML::Parser), gettext, gtk-doc >= 1.4 %ifnarch s390 s390x BuildRequires: libraw1394-devel >= 1.1.0 @@ -52,6 +53,7 @@ API documentation of the library, too. %patch1 -p1 %patch2 -p1 %patch3 -p1 +%patch4 -p1 # Needed to get rid of rpath %if 0%{?rhel}%{?fedora} >= 6 @@ -98,6 +100,9 @@ rm -rf $RPM_BUILD_ROOT %{_datadir}/gtk-doc/html/%{name} %changelog +* Sat Oct 09 2010 Kamil Dudka 0.9.12-3 +- avoid SIGSEGV in v4l2_capture_start() (#641623) + * Thu Oct 07 2010 Kamil Dudka 0.9.12-2 - build the package in %%build - fix tons of compile-time warnings