diff options
author | 2020-04-12 17:53:08 -0700 | |
---|---|---|
committer | 2020-04-18 20:04:41 -0700 | |
commit | 654201734cc57b91fcc1c9dc653ce573fc9a5dcb (patch) | |
tree | ce5d8fc4ec6b20fa7ec9a0747a25ade4f08ef2ff /src/restore.c | |
parent | 10b85ce085e4f2c0d695ee6c92fc26a7c9f456d7 (diff) | |
download | idevicerestore-654201734cc57b91fcc1c9dc653ce573fc9a5dcb.tar.gz idevicerestore-654201734cc57b91fcc1c9dc653ce573fc9a5dcb.tar.bz2 |
Use PATH_MAX for file sizes
Fixes several -Wformat-truncation warnings.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 7 |
1 files changed, 4 insertions, 3 deletions
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; |