From 91e01aa577acbfe9aa5e611a70e4c1c1b3407304 Mon Sep 17 00:00:00 2001 From: BALATON Zoltan Date: Tue, 15 Sep 2015 00:41:47 +0200 Subject: Use udid as temp file name prefix to make it more unique and avoid race conditions when tempnam generated name is not random enough. --- src/restore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/restore.c b/src/restore.c index 807047c..d354ac6 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1566,7 +1566,7 @@ int restore_send_baseband_data(restored_client_t restore, struct idevicerestore_ } // extract baseband firmware to temp file - bbfwtmp = tempnam(NULL, "bbfw_"); + bbfwtmp = tempnam(NULL, client->udid); if (!bbfwtmp) { error("WARNING: Could not generate temporary filename, using bbfw.tmp\n"); bbfwtmp = strdup("bbfw.tmp"); -- cgit v1.1-32-gdbae