diff options
author | 2020-04-12 17:53:08 -0700 | |
---|---|---|
committer | 2020-04-18 20:04:41 -0700 | |
commit | 654201734cc57b91fcc1c9dc653ce573fc9a5dcb (patch) | |
tree | ce5d8fc4ec6b20fa7ec9a0747a25ade4f08ef2ff /src/ipsw.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/ipsw.c')
-rw-r--r-- | src/ipsw.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |