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 736906 - wavparse: Initializing variables before using them
wavparse: Initializing variables before using them
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
unspecified
Other Linux
: Normal minor
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-09-18 13:30 UTC by Sanjay NM
Modified: 2018-01-22 18:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
wavparse: Initializing variables before using them (825 bytes, patch)
2014-09-18 13:30 UTC, Sanjay NM
needs-work Details | Review
wavparse: cur, stop are not initialized before sending them as parameter (1.05 KB, patch)
2014-09-26 11:51 UTC, Sanjay NM
none Details | Review
wavparse: Initializing uninitialized cur, stop variables (997 bytes, patch)
2015-01-29 06:20 UTC, Sanjay NM
needs-work Details | Review

Description Sanjay NM 2014-09-18 13:30:55 UTC
Created attachment 286498 [details] [review]
wavparse: Initializing variables before using them

Initializing stop, cur variables before sending them by reference
Comment 1 Luis de Bethencourt 2014-09-23 16:46:32 UTC
True. If !event and cur is used uninitialized.

Could you fix the commit message format? It needs the bug id link, then I will merge this.

Format is as follows or check commits in the git log as reference:
area: summary

well written description

bug id link
Comment 2 Sanjay NM 2014-09-26 11:51:02 UTC
Created attachment 287148 [details] [review]
wavparse: cur, stop are not initialized before sending them as parameter

cur, stop are not initialized in gst_wavparse_perform_seek function before sending them as parameter to gst_event_parse_seek function. Initializing these varibles
Comment 3 Sanjay NM 2015-01-29 06:20:15 UTC
Created attachment 295721 [details] [review]
wavparse: Initializing uninitialized cur, stop variables

cur, stop variable at line 376 are not initialized before sending them by reference to another function.
Initializing them to avoid any possible issues due to it.
Comment 4 Tim-Philipp Müller 2016-01-08 18:08:16 UTC
Comment on attachment 295721 [details] [review]
wavparse: Initializing uninitialized cur, stop variables

Thanks for the patch. Two more nitpicks (sorry! :))

1) I think for clarity these two should be set in the else block of if(event){ } else { ... } alongside the other bits that are set there.

2) I think in the else block stop_type should be set to GST_SEEK_TYPE_NONE (this is unrelated to your patch I guess), I'm a bit puzzled why this wasn't a problem so far though. If we do start_type=SET,start=0,stop_type=SET,stop=0 I would expect it to stop immediately. I'm clearly missing something.
Comment 5 Tim-Philipp Müller 2018-01-22 18:31:58 UTC
Dunno what to do with this.

Doesn't hurt to initialise them, but should also not be needed. And if they should probably be initialised to 0/-1 or so.

Closing for now to reduce clutter.