mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 15:57:00 +00:00
getdata: certain input files caused SIGSEGV
When dhcpd.conf file got to be parsed such way that IP version could not be determined the dhcpd.lease file parsing resulted to SIGSEGV. Reported-by: Joey D. <jobewan@gmail.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
5966360f12
commit
805d353584
2 changed files with 5 additions and 0 deletions
1
THANKS
1
THANKS
|
|
@ -26,3 +26,4 @@ Ryan Malek
|
|||
Cheer Xiao
|
||||
Gilles Bouthenot
|
||||
Helmut Grohne
|
||||
Joey D.
|
||||
|
|
|
|||
|
|
@ -160,6 +160,10 @@ int
|
|||
xstrstr(const char *restrict a, const char *restrict b, const int len)
|
||||
{
|
||||
int i;
|
||||
/* Skip when config.dhcp_version == VERSION_UNKNOWN -> len is zero. */
|
||||
if (len == 0) {
|
||||
return false;
|
||||
}
|
||||
/* two spaces are very common in lease file, after them
|
||||
* nearly everything differs */
|
||||
if (likely(a[2] != b[2])) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue