summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipsw.c4
-rw-r--r--src/restore.c7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/ipsw.c b/src/ipsw.c
index 2920bf2..e56afa2 100644
--- a/src/ipsw.c
+++ b/src/ipsw.c
@@ -704,14 +704,14 @@ int ipsw_download_fw(const char *fwurl, unsigned char* isha1, const char* todir,
}
fwfn++;
- char fwlfn[256];
+ char fwlfn[PATH_MAX - 5];
if (todir) {
sprintf(fwlfn, "%s/%s", todir, fwfn);
} else {
sprintf(fwlfn, "%s", fwfn);
}
- char fwlock[256];
+ char fwlock[PATH_MAX];
sprintf(fwlock, "%s.lock", fwlfn);
lock_info_t lockinfo;
diff --git a/src/restore.c b/src/restore.c
index 2f72bd4..ecedb63 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -24,6 +24,7 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
+#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -965,11 +966,11 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t*
char* llb_filename = NULL;
char* sep_path = NULL;
char* restore_sep_path = NULL;
- char firmware_path[256];
- char manifest_file[256];
+ char firmware_path[PATH_MAX - 9];
+ char manifest_file[PATH_MAX];
unsigned int manifest_size = 0;
unsigned char* manifest_data = NULL;
- char firmware_filename[256];
+ char firmware_filename[PATH_MAX];
unsigned int llb_size = 0;
unsigned char* llb_data = NULL;
plist_t dict = NULL;