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 789521 - GESAssets : Added function guards to avoid NULL pointer dereferencing
GESAssets : Added function guards to avoid NULL pointer dereferencing
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-editing-services
1.12.3
Other All
: Normal enhancement
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 789806 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-10-26 13:05 UTC by Ashish Kumar
Modified: 2017-11-21 13:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer-editing-services: GESAssets : Added function guards to avoid NULL pointer dereferencing (2.12 KB, patch)
2017-10-26 13:06 UTC, Ashish Kumar
none Details | Review
[PATCH] gstreamer-editing-services: GESAssets : Added function guards to avoid NULL pointer dereferencing (2.12 KB, patch)
2017-10-30 05:26 UTC, Ashish Kumar
none Details | Review
[PATCH] GESAsset and GESLayer: Added function guards to avoid NULL pointer dereferencing (3.28 KB, patch)
2017-11-07 06:43 UTC, Ashish Kumar
none Details | Review

Description Ashish Kumar 2017-10-26 13:05:05 UTC
NULL pointer dereferencing must be handled for GESAsset in public APIs at below:-
File: gst-plugins-good-1.12.3/gst/isomp4/atomsrecovery.c
Comment 1 Ashish Kumar 2017-10-26 13:06:16 UTC
Created attachment 362344 [details] [review]
gstreamer-editing-services: GESAssets : Added function guards to avoid NULL pointer dereferencing

Please review the patch attached to fix the issue and share your feedback.
Comment 2 Mathieu Duponchelle 2017-10-27 13:56:16 UTC
Looks good to me, but the commit date is a bit off, I don't think you really did that 16 years ago, can you fix this ? :)
Comment 3 Ashish Kumar 2017-10-30 05:26:10 UTC
Created attachment 362505 [details] [review]
[PATCH] gstreamer-editing-services: GESAssets : Added function guards to avoid NULL pointer dereferencing

Updated commit date.
Comment 4 Tim-Philipp Müller 2017-11-04 10:32:58 UTC
Comment on attachment 362505 [details] [review]
[PATCH] gstreamer-editing-services: GESAssets : Added function guards to avoid NULL pointer dereferencing

Thanks for the patches. However:

- Please make patches against a git checkout (you have an additional path component in there that doesn't belong).

- There should be an empty newline after g_return_*if_fail() blocks.

- NULL is not a GType, use G_TYPE_NONE or G_TYPE_INVALID.
Comment 5 Tim-Philipp Müller 2017-11-04 10:34:30 UTC
*** Bug 789806 has been marked as a duplicate of this bug. ***
Comment 6 Ashish Kumar 2017-11-07 06:43:39 UTC
Created attachment 363129 [details] [review]
[PATCH] GESAsset and GESLayer: Added function guards to avoid NULL pointer dereferencing

Review comments implemented and merged patch for bug #789806
Comment 7 Ashish Kumar 2017-11-14 14:11:29 UTC
Please review the patch and share the feedback.
Comment 8 Ashish Kumar 2017-11-21 13:01:10 UTC
Dear Mr. Tim
Can you please review or are you waiting to "Squash" another patch too, like that of [Bug 789806], in this patch ? :)
Comment 9 Tim-Philipp Müller 2017-11-21 13:15:38 UTC
Was waiting to see if Thibault had any opinions.

Pushed, with minor changes (removed function guard from _init function, and return 0 instead of NULL for GstClockTime).

commit 23e9044b4e3df5f9ef03b873b2c09be046c93cb7 (HEAD -> master)
Author: Ashish Kumar <kr.ashish@samsung.com>
Date:   Tue Nov 7 12:04:03 2017 +0530

    GESAsset, GESLayer: add some function guards
    
    https://bugzilla.gnome.org/show_bug.cgi?id=789521