Message ID | 20190318144447.29215-1-krzysztof.michonski@digitalstrom.com |
---|---|
State | Accepted |
Headers | show |
Series | [1/1] Increase filename length where it's too small | expand |
On 18/03/19 15:44, Krzysztof Michoński wrote: > From: Krzysztof Michonski <krzysztof.michonski@digitalstrom.com> > > Most of filename size limitations were unified and unlike > in version 2018.03 we should be able to use files with filenames > longer than 64 bytes, this patch increases the filename size in places > still dependant on the older filename size. > > The filename + tmpdir can easily exceed 64 bytes size limit. > Today most of size limitations as in for example install > handlers are unified (for example fully dropped for flash handler: fa6fa9d3), > this patch unifies this limitations even more. > > We need this because we usually deal with filenames > with size of around ~100 chars. > > Signed-off-by: Krzysztof Michoński <krzysztof.michonski@digitalstrom.com> > --- > core/cpio_utils.c | 2 +- > handlers/boot_handler.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/core/cpio_utils.c b/core/cpio_utils.c > index 143474b..a464108 100644 > --- a/core/cpio_utils.c > +++ b/core/cpio_utils.c > @@ -540,7 +540,7 @@ int extract_sw_description(int fd, const char *descfile, off_t *offs) > { > struct filehdr fdh; > unsigned long offset = *offs; > - char output_file[64]; > + char output_file[MAX_IMAGE_FNAME]; > uint32_t checksum; > int fdout; > const char* TMPDIR = get_tmpdir(); > diff --git a/handlers/boot_handler.c b/handlers/boot_handler.c > index 2a1b61a..4af8bda 100644 > --- a/handlers/boot_handler.c > +++ b/handlers/boot_handler.c > @@ -30,7 +30,7 @@ static int install_boot_environment(struct img_type *img, > int fdout; > FILE *fp; > char *buf; > - char filename[64]; > + char filename[MAX_IMAGE_FNAME]; > struct stat statbuf; > > if (snprintf(filename, sizeof(filename), "%s%s", get_tmpdirscripts(), > Acked-by: Stefano Babic <sbabic@denx.de> Best regards, Stefano Babic
diff --git a/core/cpio_utils.c b/core/cpio_utils.c index 143474b..a464108 100644 --- a/core/cpio_utils.c +++ b/core/cpio_utils.c @@ -540,7 +540,7 @@ int extract_sw_description(int fd, const char *descfile, off_t *offs) { struct filehdr fdh; unsigned long offset = *offs; - char output_file[64]; + char output_file[MAX_IMAGE_FNAME]; uint32_t checksum; int fdout; const char* TMPDIR = get_tmpdir(); diff --git a/handlers/boot_handler.c b/handlers/boot_handler.c index 2a1b61a..4af8bda 100644 --- a/handlers/boot_handler.c +++ b/handlers/boot_handler.c @@ -30,7 +30,7 @@ static int install_boot_environment(struct img_type *img, int fdout; FILE *fp; char *buf; - char filename[64]; + char filename[MAX_IMAGE_FNAME]; struct stat statbuf; if (snprintf(filename, sizeof(filename), "%s%s", get_tmpdirscripts(),