After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721268 - v4l2: Handle v4l2_ioctl() errors even in error handling
v4l2: Handle v4l2_ioctl() errors even in error handling
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal minor
: 1.2.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-31 12:31 UTC by Sebastian Rasmussen
Modified: 2014-01-06 10:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch checking for errors and unifying the code paths (1.45 KB, patch)
2013-12-31 12:34 UTC, Sebastian Rasmussen
committed Details | Review

Description Sebastian Rasmussen 2013-12-31 12:31:37 UTC
Coverity reported this:

** CID 1146960:  Unchecked return value  (CHECKED_RETURN)
/gst-plugins-good/sys/v4l2/gstv4l2object.c: 2334 in gst_v4l2_object_get_nearest_size()
/gst-plugins-good/sys/v4l2/gstv4l2object.c: 2339 in gst_v4l2_object_get_nearest_size()

In gst_v4l2_object_get_nearest_size() there is a workaround to retrieve the current format and save it, then probe a new format and then restore the saved format at the end of the function. The calls fail to check the return valueto v4l2_ioctl() when restoring the saved format. This patch adds the checks and prints a GST_WARNING when the call fails.
Comment 1 Sebastian Rasmussen 2013-12-31 12:34:31 UTC
Created attachment 265066 [details] [review]
Proposed patch checking for errors and unifying the code paths
Comment 2 Sebastian Dröge (slomo) 2014-01-03 10:00:16 UTC
commit 3f8b4235168dea3314c9d0d77bb3f23cf8eb9713
Author: Sebastian Rasmussen <sebras@hotmail.com>
Date:   Tue Dec 31 13:31:52 2013 +0100

    v4l2: Handle v4l2_ioctl() errors even in error handling
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=721268