diff options
author | Valentin Bartenev <vbart@nginx.com> | 2017-10-19 17:26:56 +0300 |
---|---|---|
committer | Valentin Bartenev <vbart@nginx.com> | 2017-10-19 17:26:56 +0300 |
commit | 39fd38a948762d24f5860adb0bf8c78b6d65d79a (patch) | |
tree | ebc111451db632a6abe9b10753c12484d52eebf6 /src/nxt_string.c | |
parent | 0833074f304e0b9e973510ebc8f29505bb84a41d (diff) | |
download | unit-39fd38a948762d24f5860adb0bf8c78b6d65d79a.tar.gz unit-39fd38a948762d24f5860adb0bf8c78b6d65d79a.tar.bz2 |
Fixed matching of empty version.
Diffstat (limited to 'src/nxt_string.c')
-rw-r--r-- | src/nxt_string.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/nxt_string.c b/src/nxt_string.c index 8ac873b1..8225cd9b 100644 --- a/src/nxt_string.c +++ b/src/nxt_string.c @@ -416,6 +416,10 @@ nxt_strvers_match(u_char *version, u_char *prefix, size_t length) { u_char next, last; + if (length == 0) { + return 1; + } + if (nxt_strncmp(version, prefix, length) == 0) { next = version[length]; |