diff --git a/THANKS b/THANKS index f5f6554..fb9f030 100644 --- a/THANKS +++ b/THANKS @@ -26,3 +26,4 @@ Ryan Malek Cheer Xiao Gilles Bouthenot Helmut Grohne +Joey D. diff --git a/src/other.c b/src/other.c index 226fe30..fbdb3c0 100644 --- a/src/other.c +++ b/src/other.c @@ -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])) {