Always initialize hdrp retval of rpmReadPackageFile()
Since commit 3ccd9ccf50
, hdrp has only
been set on success (at least half-intentionally), but turns out a
various third party software depends on the former behavior. And on
closer inspection, it's actually a documented feature of the API.
This commit is contained in:
parent
f064492a50
commit
73c76f5999
|
@ -298,6 +298,10 @@ rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
|
|||
.fn = fn ? fn : Fdescr(fd),
|
||||
};
|
||||
|
||||
/* XXX: lots of 3rd party software relies on the behavior */
|
||||
if (hdrp)
|
||||
*hdrp = NULL;
|
||||
|
||||
rpmRC rc = rpmpkgRead(keyring, vsflags, fd, handlePkgVS, &pkgdata, hdrp);
|
||||
|
||||
rpmKeyringFree(keyring);
|
||||
|
|
Loading…
Reference in New Issue