[Dnsmasq-discuss] [PATCH] fix segfault when using tftp_no_fail

Simon Kelley simon at thekelleys.org.uk
Thu Apr 16 15:22:06 BST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mea culpa.  Patch applied. Thanks.


Simon.


On 14/04/15 14:40, Stefan Tomanek wrote:
> This change prevents dnsmasq from calling closedir() on an invalid
> pointer (which happens if the TFTP directory cannot be opened). The
> 'else' was probably accidently dropped while applying and
> refactoring patch 30d0879ed55cb67b1b735beab3d93f3bb3ef1dd2.
> 
> Signed-off-by: Stefan Tomanek
> <stefan.tomanek+dnsmasq at wertarbyte.de> --- src/dnsmasq.c | 6
> ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/src/dnsmasq.c b/src/dnsmasq.c index a7c5da8..20b15c0
> 100644 --- a/src/dnsmasq.c +++ b/src/dnsmasq.c @@ -655,7 +655,8 @@
> int main (int argc, char **argv) _exit(0); } tftp_no_fail } -
> closedir(dir); +	  else +	    closedir(dir); }
> 
> for (p = daemon->if_prefix; p; p = p->next) @@ -670,7 +671,8 @@ int
> main (int argc, char **argv) _exit(0); } } -	  closedir(dir); +
> else +	    closedir(dir); } } #endif
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iEYEARECAAYFAlUvxY4ACgkQKPyGmiibgrdz+gCfU04g+Sn4fEp14iejpC+ert6B
FQIAn3b6ZnHlSDbRRRDTucgaZaOKumDY
=inuk
-----END PGP SIGNATURE-----



More information about the Dnsmasq-discuss mailing list