Question regarding pointer assumptions in input.c
MANJEET YADUVANSHI <[email protected]> Tue, 14 Apr 2026 15:35:14 +0530
| Newsgroups | gmane.comp.video.videolan.vlc.devel |
|---|---|
| Message-ID | <CAJP-peQKJPBQCEooEBZx4ihdYM-Ytg3es+8=06BO0s7_ucyrcA@mail.gmail.com> |
--===============7604207742278815420== Content-Type: multipart/alternative; boundary="000000000000071953064f68bdaf" --000000000000071953064f68bdaf Content-Type: text/plain; charset="UTF-8" Hi, I was reading input.c to better understand the input pipeline. I noticed that in functions like Preparse(), there are accesses such as priv->master->p_demux->pf_readdir without explicit NULL checks. I wanted to ask whether it is guaranteed by design that these pointers are always valid at that point, or if defensive checks would be appropriate here. I was also considering whether this could be an area for a small improvement, but wanted to clarify the intended design first. Thanks. Manjeet --000000000000071953064f68bdaf Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto">Hi,<br><br>I was reading input.c to better understand the= input pipeline.<br><br>I noticed that in functions like Preparse(), there = are accesses such as priv->master->p_demux->pf_readdir without exp= licit NULL checks.<br><br>I wanted to ask whether it is guaranteed by desig= n that these pointers are always valid at that point, or if defensive check= s would be appropriate here.<br><br>I was also considering whether this cou= ld be an area for a small improvement, but wanted to clarify the intended d= esign first.<br><br>Thanks.<br>Manjeet=C2=A0</div> --000000000000071953064f68bdaf-- --===============7604207742278815420== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ vlc-devel mailing list To unsubscribe or modify your subscription options: https://mailman.videolan.org/listinfo/vlc-devel --===============7604207742278815420==--