diff options
-rw-r--r-- | source3/lib/talloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/lib/talloc.c b/source3/lib/talloc.c index 3650ab7f51..46abd89bac 100644 --- a/source3/lib/talloc.c +++ b/source3/lib/talloc.c @@ -919,7 +919,7 @@ char *talloc_strndup(const void *t, const char *p, size_t n) size_t len; char *ret; - for (len=0; p[len] && len<n; len++) ; + for (len=0; len<n && p[len]; len++) ; ret = _talloc(t, len + 1); if (!ret) { return NULL; } |