Created attachment 154744 [details]
Add error check
g_eli_read_metadata() doesn't check the return value of eli_metadata_read(). Because of that, if eli_metadata_read() fails, the g_eli_metadata struct passed isn't changed (and so probably contains garbage from the caller), but g_eli_read_metadata() returns success, so the caller will try using it.
The goto in the patch is redundant with the current code, but is added for symmetry with other earlier error checks, and for safety if anything else later gets added to the function.
A commit references this bug:
Date: Thu Jul 2 10:57:35 UTC 2015
New revision: 285024
Properly propagate errors in metadata reading.
Submitted by: Matthew D. Fuller