about summary refs log tree commit diff
path: root/pkgs/test/make-binary-wrapper/suffix.c
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/test/make-binary-wrapper/suffix.c')
-rw-r--r--pkgs/test/make-binary-wrapper/suffix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkgs/test/make-binary-wrapper/suffix.c b/pkgs/test/make-binary-wrapper/suffix.c
index 865d76fe34e2a..a299f1fa0bd66 100644
--- a/pkgs/test/make-binary-wrapper/suffix.c
+++ b/pkgs/test/make-binary-wrapper/suffix.c
@@ -5,12 +5,14 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <string.h>
+#include <assert.h>
 
 char *concat3(char *x, char *y, char *z) {
     int xn = strlen(x);
     int yn = strlen(y);
     int zn = strlen(z);
     char *res = malloc(sizeof(*res)*(xn + yn + zn + 1));
+    assert(res != NULL);
     strncpy(res, x, xn);
     strncpy(res + xn, y, yn);
     strncpy(res + xn + yn, z, zn);