Bug 635645

Summary: check return value of theora_encode_init()
Product: Red Hat Enterprise Linux 6 Reporter: Kamil Dudka <kdudka>
Component: unicapAssignee: Kamil Dudka <kdudka>
Status: CLOSED ERRATA QA Contact: Desktop QE <desktop-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.1CC: ovasik, pkovar, redhat-bugzilla, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard: abrt_hash:75b6de4e1a115913d438ce36c24865aff857b446
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Prior to this update, the unicap utility did not check for a return value of the Theora encoder initialization. As a result, unicap terminated unexpectedly if the initialization of the Theora encoder failed. With this update, the bug has been fixed by adding the missing check for a return value in order to handle failure of the Theora encoder initialization gracefully.
Story Points: ---
Clone Of: 627890 Environment:
Last Closed: 2011-08-24 15:10:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 627890    
Bug Blocks:    

Description Kamil Dudka 2010-09-20 12:25:40 UTC
+++ This bug was initially created as a clone of Bug #627890 +++

abrt version: 1.1.13
architecture: x86_64
Attached file: backtrace
cmdline: ucview
component: ucview
crash_function: theora_encode_header
executable: /usr/bin/ucview
kernel: 2.6.33.8-149.fc13.x86_64
package: ucview-0.31-1.fc13
rating: 4
reason: Process /usr/bin/ucview was killed by signal 11 (SIGSEGV)
release: Fedora release 13 (Goddard)
time: 1282903397
uid: 500

comment
-----
This is a repeat of bug 587800 but as I am now running Fedora 13 (old bug on 12) I thought it 
better to register a 'new' bug.

How to reproduce
-----
1. select Celestron NexImage camera
2. start recording.
3.

--- Additional comment from chuck.elliot.uk on 2010-08-27 12:09:04 CEST ---

Created an attachment (id=441456)
File: backtrace

--- Additional comment from kdudka on 2010-08-27 12:36:38 CEST ---

*** Bug 587800 has been marked as a duplicate of this bug. ***

--- Additional comment from kdudka on 2010-08-27 13:03:56 CEST ---

 chuck elliot      2010-08-27 12:43:03 CEST

libucil-0.9.8-2.fc13.x86_64
libunicap-0.9.8-1.fc13.x86_64
libunicapgtk-0.9.8-1.fc13.x86_64
ucview-0.31-1.fc13.x86_64

--- Additional comment from kdudka on 2010-09-15 14:03:39 CEST ---

Return value of theora_encode_init() should be checked:

diff --git a/src/ucil_theora.c b/src/ucil_theora.c
--- a/src/ucil_theora.c
+++ b/src/ucil_theora.c
@@ -1556,7 +1556,11 @@ ucil_theora_video_file_object_t *ucil_theora_create_video_filev( const char *pat
    
 #endif
 
-   theora_encode_init( &vobj->th, &vobj->ti );   
+   if( theora_encode_init( &vobj->th, &vobj->ti ) != 0)
+   {
+      free( vobj );
+      return NULL;
+   }
 
    vobj->full_queue = g_queue_new();
    vobj->empty_queue = g_queue_new();

--- Additional comment from updates on 2010-09-15 14:36:17 CEST ---

libucil-0.9.8-5.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/libucil-0.9.8-5.fc14

--- Additional comment from updates on 2010-09-15 14:36:29 CEST ---

libucil-0.9.8-4.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/libucil-0.9.8-4.fc13

--- Additional comment from updates on 2010-09-16 00:35:40 CEST ---

libucil-0.9.8-4.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update libucil'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/libucil-0.9.8-4.fc13

--- Additional comment from updates on 2010-09-19 22:19:11 CEST ---

libucil-0.9.8-3.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/libucil-0.9.8-3.fc12

Comment 2 Suzanne Logcher 2011-02-15 21:43:02 UTC
This issue was proposed for RHEL 6.1 FasTrack but did not get resolved in time.
It has been moved to RHEL 6.2 FasTrack.

Comment 7 Petr Kovar 2011-07-04 17:10:18 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Prior to this update, the unicap utility did not check for a return value of the Theora encoder initialization. As a result, unicap terminated unexpectedly if the initialization of the Theora encoder failed. With this update, the bug has been fixed by adding the missing check for a return value in order to handle failure of the Theora encoder initialization gracefully.

Comment 10 errata-xmlrpc 2011-08-24 15:10:22 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1202.html