From cae19fa6cf28074b51ce421d64142f7ec1e1dde2 Mon Sep 17 00:00:00 2001 From: Nikias Bassen Date: Fri, 18 Dec 2015 21:01:01 +0100 Subject: tools: idevicecrashreport: Propertly initialize buffer used to check for ping message --- tools/idevicecrashreport.c | 1 + 1 file changed, 1 insertion(+) (limited to 'tools/idevicecrashreport.c') diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c index 8c04fd1..8502938 100644 --- a/tools/idevicecrashreport.c +++ b/tools/idevicecrashreport.c @@ -404,6 +404,7 @@ int main(int argc, char* argv[]) { /* read "ping" message which indicates the crash logs have been moved to a safe harbor */ char *ping = malloc(4); + memset(ping, '\0', 4); int attempts = 0; while ((strncmp(ping, "ping", 4) != 0) && (attempts < 10)) { uint32_t bytes = 0; -- cgit v1.1-32-gdbae