diff options
| author | 2015-12-18 21:01:01 +0100 | |
|---|---|---|
| committer | 2015-12-18 21:01:01 +0100 | |
| commit | cae19fa6cf28074b51ce421d64142f7ec1e1dde2 (patch) | |
| tree | a78be394887f2350f0e5eddc2d4b5890163c840d /tools | |
| parent | 2203f4cba9ddaacee1ad702b7948da0e59d33497 (diff) | |
| download | libimobiledevice-cae19fa6cf28074b51ce421d64142f7ec1e1dde2.tar.gz libimobiledevice-cae19fa6cf28074b51ce421d64142f7ec1e1dde2.tar.bz2 | |
tools: idevicecrashreport: Propertly initialize buffer used to check for ping message
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicecrashreport.c | 1 |
1 files changed, 1 insertions, 0 deletions
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[]) { | |||
| 404 | 404 | ||
| 405 | /* read "ping" message which indicates the crash logs have been moved to a safe harbor */ | 405 | /* read "ping" message which indicates the crash logs have been moved to a safe harbor */ |
| 406 | char *ping = malloc(4); | 406 | char *ping = malloc(4); |
| 407 | memset(ping, '\0', 4); | ||
| 407 | int attempts = 0; | 408 | int attempts = 0; |
| 408 | while ((strncmp(ping, "ping", 4) != 0) && (attempts < 10)) { | 409 | while ((strncmp(ping, "ping", 4) != 0) && (attempts < 10)) { |
| 409 | uint32_t bytes = 0; | 410 | uint32_t bytes = 0; |
