diff options
author | Paul Nasrat <pnasrat@redhat.com> | 2007-04-16 13:17:19 +0100 |
---|---|---|
committer | Paul Nasrat <pnasrat@redhat.com> | 2007-04-16 13:17:19 +0100 |
commit | 3c102d6404bdaa14c6553049f9cf1dcec127814a (patch) | |
tree | 9d4ab3215cce8f96fd7320d0828494a993c73c3d /rpmio | |
parent | 9b0ef9f4f326c02906a4f9dd636b95fcf3d88553 (diff) | |
download | rpm-3c102d6404bdaa14c6553049f9cf1dcec127814a.tar.gz rpm-3c102d6404bdaa14c6553049f9cf1dcec127814a.tar.bz2 rpm-3c102d6404bdaa14c6553049f9cf1dcec127814a.zip |
Return an error if Fileno is called with NULL instead of segfaulting.
Patch from OpenSuSE
Diffstat (limited to 'rpmio')
-rw-r--r-- | rpmio/rpmio.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rpmio/rpmio.c b/rpmio/rpmio.c index e78f33b1a..1d91a0e31 100644 --- a/rpmio/rpmio.c +++ b/rpmio/rpmio.c @@ -3164,6 +3164,7 @@ int Fileno(FD_t fd) { int i, rc = -1; + if (fd == NULL) return -1; if (fd->req != NULL) rc = 123456789; /* HACK: https has no steenkin fileno. */ else |