autofs-5.0.8 - fix fix options compare From: Ian Kent The change to fix the mount options compare replaced the strncmp() function used to compare substrings of options with an internal function that also used the passed in length for the compare. But the case of a passed in length of 0 was not handled and for that case the function returned a value different to strncmp() and code that relied on that behaviour n longer behaves as expected. --- CHANGELOG | 1 + lib/cat_path.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 2cbfcb7..f58efa9 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -36,6 +36,7 @@ - dont ignore null cache entries on multi mount umount. - fix inconsistent error returns in handle_packet_missing_direct(). - simple coverity fixes. +- fix fix options compare. 17/10/2013 autofs-5.0.8 ======================= diff --git a/lib/cat_path.c b/lib/cat_path.c index c386b33..527fb9c 100644 --- a/lib/cat_path.c +++ b/lib/cat_path.c @@ -92,7 +92,7 @@ int _strncmp(const char *s1, const char *s2, size_t n) { size_t len = strlen(s1); - if (n != len) + if (n && n != len) return n - len; return strncmp(s1, s2, n); }