aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/opendeco-cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/opendeco-cli.c')
-rw-r--r--src/opendeco-cli.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/opendeco-cli.c b/src/opendeco-cli.c
index 42e3398..579e013 100644
--- a/src/opendeco-cli.c
+++ b/src/opendeco-cli.c
@@ -46,6 +46,12 @@ static void print_xxd_arr(char *name, unsigned char *content, unsigned int len)
{
char *tmp = strndup((const char *) content, len);
+ if (!tmp) {
+ errno = ENOMEM;
+ perror(__func__);
+ exit(EXIT_FAILURE);
+ }
+
wprintf(L"--------\n\n");
wprintf(L"License for: %s\n\n", name);
wprintf(L"%s", tmp);