From 692ca250aa9107653a27ef47f02882cf2fd6fd35 Mon Sep 17 00:00:00 2001 From: rofl0r Date: Sat, 5 Oct 2013 06:18:14 +0200 Subject: [PATCH] mark.c: check malloc return value --- mark.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mark.c b/mark.c index ea6d798..9aa3969 100644 --- a/mark.c +++ b/mark.c @@ -112,6 +112,7 @@ void fill_with_string(void) } else if (!hexStringToBinString(tmp2, &l2)) return; } tmp1 = malloc(l1); + if(!tmp1) return; for (i = 0; i < l1 - l2 + 1; i += l2) memcpy(tmp1 + i, tmp2, l2); memcpy(tmp1 + i, tmp2, l1 - i); addToEdited(mark_min, l1, tmp1); -- 2.11.4.GIT