Hi Jared,

On Mon, Jun 26, 2017 at 03:33:09PM -0500, Matt Weber wrote:
> From: Jared Bents <jared.be...@rockwellcollins.com>
> 
> Update to increase the pathname limit to the
> linux limit of 4096 characters.
> 
> Similar patch:
> https://patchwork.openembedded.org/patch/131475/
> 
> Signed-off-by: Jared Bents <jared.be...@rockwellcollins.com>
> Signed-off-by: Matt Weber <matthew.we...@rockwellcollins.com>
> ---
>  miscutils/makedevs.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/miscutils/makedevs.c b/miscutils/makedevs.c
> index 9e7ca34..0049edb 100644
> --- a/miscutils/makedevs.c
> +++ b/miscutils/makedevs.c
> @@ -208,7 +208,7 @@ int makedevs_main(int argc UNUSED_PARAM, char **argv)
>               unsigned count = 0;
>               unsigned increment = 0;
>               unsigned start = 0;
> -             char name[41];
> +             char name[4096];

Why not use PATH_MAX here?

>               char user[41];
>               char group[41];
>               char *full_name = name;
> @@ -217,7 +217,7 @@ int makedevs_main(int argc UNUSED_PARAM, char **argv)
>  
>               linenum = parser->lineno;
>  
> -             if ((2 > sscanf(line, "%40s %c %o %40s %40s %u %u %u %u %u",
> +             if ((2 > sscanf(line, "%4095s %c %o %40s %40s %u %u %u %u %u",
>                                       name, &type, &mode, user, group,
>                                       &major, &minor, &start, &increment, 
> &count))
>                || ((unsigned)(major | minor | start | count | increment) > 
> 255)

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - bar...@tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to