diff options
-rw-r--r-- | tools/idevicecrashreport.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/idevicecrashreport.c b/tools/idevicecrashreport.c index 484212e..09bd537 100644 --- a/tools/idevicecrashreport.c +++ b/tools/idevicecrashreport.c | |||
@@ -163,7 +163,7 @@ static int afc_client_copy_and_remove_crash_reports(afc_client_t afc, const char | |||
163 | char* p = strrchr(list[k], '.'); | 163 | char* p = strrchr(list[k], '.'); |
164 | if (p != NULL && !strncmp(p, ".synced", 7)) { | 164 | if (p != NULL && !strncmp(p, ".synced", 7)) { |
165 | /* make sure to strip ".synced" extension as seen on iOS 5 */ | 165 | /* make sure to strip ".synced" extension as seen on iOS 5 */ |
166 | int newlen = strlen(list[k]) - 7; | 166 | size_t newlen = p - list[k]; |
167 | strncpy(((char*)target_filename) + host_directory_length, list[k], newlen); | 167 | strncpy(((char*)target_filename) + host_directory_length, list[k], newlen); |
168 | target_filename[host_directory_length + newlen] = '\0'; | 168 | target_filename[host_directory_length + newlen] = '\0'; |
169 | } else { | 169 | } else { |