Skip to content

Commit

Permalink
Fix crash in PXE code with bad config.
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkelley committed Jan 18, 2022
1 parent 2362784 commit 4e2a4b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion debian/changelog
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dnsmasq (2.87-1) unstable; urgency=low

* New upstream. (closes: #1001209)
* New upstream. (closes: #1001209, #1003156)
* Include new NFTset support in the build.
* Fix crash on netboot with DNS server disabled. (closes: #996332)
* Fix rare lockup in DNSSEC. (closes: #1001576)
Expand Down
5 changes: 3 additions & 2 deletions src/rfc2131.c
Original file line number Diff line number Diff line change
Expand Up @@ -2200,8 +2200,9 @@ static int pxe_uefi_workaround(int pxe_arch, struct dhcp_netid *netid, struct dh
inet_ntop(AF_INET, &mess->siaddr, (char *)mess->sname, INET_ADDRSTRLEN);
}

snprintf((char *)mess->file, sizeof(mess->file),
strchr(found->basename, '.') ? "%s" : "%s.0", found->basename);
if (found->basename)
snprintf((char *)mess->file, sizeof(mess->file),
strchr(found->basename, '.') ? "%s" : "%s.0", found->basename);

return 1;
}
Expand Down

0 comments on commit 4e2a4b8

Please sign in to comment.