summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-08-28 08:31:17 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-08-28 22:17:50 +0200
commit8abef6397d380b72283bd2e9f0603378ba537ab2 (patch)
tree71b828e04c968cb90d76307c4126a572cadabcfe
parentfc97ab822fb6090789b62d2cec16615e1ab78e1b (diff)
downloadsssd-8abef6397d380b72283bd2e9f0603378ba537ab2.tar.gz
sssd-8abef6397d380b72283bd2e9f0603378ba537ab2.tar.xz
sssd-8abef6397d380b72283bd2e9f0603378ba537ab2.zip
CLIENT: Fix non gnu sss_strnlen implementation
last argument of function sss_strnlen "size_t *len" is output variable. We need to increment value of size_t being pointed to by pointer instead of incrementing pointer.
-rw-r--r--src/sss_client/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sss_client/common.c b/src/sss_client/common.c
index 6639ae156..d99086147 100644
--- a/src/sss_client/common.c
+++ b/src/sss_client/common.c
@@ -984,7 +984,7 @@ errno_t sss_strnlen(const char *str, size_t maxlen, size_t *len)
*len = 0;
while (*len < maxlen) {
if (str[*len] == '\0') break;
- len++;
+ (*len)++;
}
#endif