GNOME Bugzilla – Bug 742367
wavparse: initialize variables
Last modified: 2015-01-06 14:36:19 UTC
cur and stop variable are not initialized. This may result in wrong calculations at lines 437 and 441 respectively. Hence initializing the variables to 0, during declaration.
Created attachment 293801 [details] [review] initialize variables
You are correct about that if variable event is False, variables cur and stop aren't set by gst_event_parse_seek(). But, event being False also means line 421: if (!event || wav->state != GST_WAVPARSE_DATA) { Will resolve to True and the true statement block will be run. Meanwhile the lines you are worried about (437 and 441) are in the false statement block of that conditional. There is no combination of values where cur and stop are used without being initialized. At least I don't see any situation where this might be a problem. If you know of any please say so :) If not I will close this bug. Thanks for looking into this.
Hi Luis, Thanks for the review. As you have mentioned, this case will not arise :) sorry about the wrong bug :).
No worries Vineeth :) Thanks for looking at the code and helping.