talloc: Fix copy&paste errors
authorVolker Lendecke <vl@samba.org>
Tue, 24 Apr 2012 08:28:29 +0000 (10:28 +0200)
committerVolker Lendecke <vl@samba.org>
Tue, 24 Apr 2012 11:28:44 +0000 (13:28 +0200)
lib/talloc/talloc.c

index 38e6f21854a643559a4cf653ce8f7125f0984651..e5fd0d28232a654749b020e5e5c4bec100f31a0b 100644 (file)
@@ -2019,7 +2019,7 @@ _PUBLIC_ char *talloc_strdup_append_buffer(char *s, const char *a)
 _PUBLIC_ char *talloc_strndup_append(char *s, const char *a, size_t n)
 {
        if (unlikely(!s)) {
-               return talloc_strdup(NULL, a);
+               return talloc_strndup(NULL, a, n);
        }
 
        if (unlikely(!a)) {
@@ -2038,7 +2038,7 @@ _PUBLIC_ char *talloc_strndup_append_buffer(char *s, const char *a, size_t n)
        size_t slen;
 
        if (unlikely(!s)) {
-               return talloc_strdup(NULL, a);
+               return talloc_strndup(NULL, a, n);
        }
 
        if (unlikely(!a)) {