GNOME Bugzilla – Bug 731339
giochannel: avoid setting uninitialised length
Last modified: 2014-06-28 17:53:16 UTC
Our internal call to g_io_channel_read_line_backend() may return G_IO_STATUS_ERROR, in which case two things will be true: - the GError will have been set (if appropriate) - the &got_length return value may not have been set Since it's our convention to leave 'out' parameters untouched in exception cases, this is perfectly fine. Unfortunately, g_io_channel_read_line(), in wrapping this internal function, always promotes the length parameter, even in the case of error. Stop doing that in order to avoid overwriting the callers's variable with junk in the error case.
Created attachment 278047 [details] [review] giochannel: avoid setting uninitialised length
Review of attachment 278047 [details] [review]: Looks good.
Attachment 278047 [details] pushed as 0007376 - giochannel: avoid setting uninitialised length