[libunicap/f14/master] avoid SIGSEGV in v4l2_capture_start() (#641623)

Kamil Dudka kdudka at fedoraproject.org
Tue Oct 12 12:00:01 UTC 2010


commit cb9b9b58b9692c9497cdd22429c6a1a42655e84b
Author: Kamil Dudka <kdudka at redhat.com>
Date:   Sat Oct 9 20:59:52 2010 +0200

    avoid SIGSEGV in v4l2_capture_start() (#641623)

 libunicap-bz641623.patch |   15 +++++++++++++++
 libunicap.spec           |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)
---
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 6f15ac9..cb64721 100644
--- a/libunicap.spec
+++ b/libunicap.spec
@@ -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
@@ -102,6 +104,7 @@ rm -rf $RPM_BUILD_ROOT
 - build the package in %%build
 - fix tons of compile-time warnings
 - fix some memory errors in the code
+- avoid SIGSEGV in v4l2_capture_start() (#641623)
 
 * Mon Oct 04 2010 Robert Scheck <robert at fedoraproject.org> 0.9.12-1
 - Upgrade to 0.9.12 (#635377)


More information about the scm-commits mailing list