[libdvbpsi-devel] src/demux.c: Fix CID #110841
Jean-Paul Saman
git at videolan.org
Thu Jun 4 10:02:04 CEST 2015
libdvbpsi | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Sat May 30 17:01:10 2015 +0200| [65ed42a6c5eb90873068941ebb2dbd4b24551c70] | committer: Jean-Paul Saman
src/demux.c: Fix CID #110841
Fix dereference before NULL check.
> http://git.videolan.org/gitweb.cgi/libdvbpsi.git/?a=commit;h=65ed42a6c5eb90873068941ebb2dbd4b24551c70
---
src/demux.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/demux.c b/src/demux.c
index adbf1e1..5db63a9 100644
--- a/src/demux.c
+++ b/src/demux.c
@@ -220,13 +220,13 @@ void dvbpsi_AttachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t
void dvbpsi_DetachDemuxSubDecoder(dvbpsi_demux_t *p_demux, dvbpsi_demux_subdec_t *p_subdec)
{
assert(p_demux);
- assert(p_demux->p_first_subdec);
-
assert(p_subdec);
if (!p_demux || !p_subdec)
abort();
+ assert(p_demux->p_first_subdec);
+
dvbpsi_demux_subdec_t** pp_prev_subdec;
pp_prev_subdec = &p_demux->p_first_subdec;
while(*pp_prev_subdec != p_subdec)
More information about the libdvbpsi-devel
mailing list