summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/libc/string.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/payloads/libpayload/libc/string.c b/payloads/libpayload/libc/string.c
index 9502acfa6e..b9ecb907f6 100644
--- a/payloads/libpayload/libc/string.c
+++ b/payloads/libpayload/libc/string.c
@@ -212,10 +212,10 @@ char *strdup(const char *s)
int n = strlen(s);
char *p = malloc(n + 1);
- if (p != NULL)
+ if (p != NULL) {
strncpy(p, s, n);
-
- p[n] = 0;
+ p[n] = 0;
+ }
return p;
}