GNOME Bugzilla – Bug 689701
There's an unitialised variable error in gupnp-didl-lite-writer.c
Last modified: 2019-02-22 05:57:51 UTC
Created attachment 230764 [details] [review] Patch to fix unitialised variable The is_container variable is only initialised if node->name = "container", otherwise it is uninitialised. I've attached a patch to initialise the variable. This issue was spotted by Coverity. Actually, I'm not sure that this patch will do anything apart from make the coverity error go away. As far as I can tell, node->name can have 3 different values, "container", "item", and "desc". I'm guessing only "container"s have children so is_container probably never gets tested when it is unintialised. Is this analysis correct? If not, are there any tests that need to be run apart from make check, which seems to run fine with this patch.
Interesting, the code is rather old, wonder why the coverity in the beginning of this year didn't find that.
Children is on XML level, <item> does have child nodes as well, so this fix looks rather important.