lkml.org 
[lkml]   [2008]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH 2/6] autofs4 - remove string terminator check
On Thu, 23 Oct 2008 10:35:22 +0800
Ian Kent <raven@themaw.net> wrote:

> Remove unnecessary string terminator check.

Why is it unnecessary?

Does this change alter behaviour in any way?

Does it fix a bug?

Better changelogs, please....

> --- a/fs/autofs4/dev-ioctl.c
> +++ b/fs/autofs4/dev-ioctl.c
> @@ -51,18 +51,6 @@ static int check_name(const char *name)
> }
>
> /*
> - * Check a string doesn't overrun the chunk of
> - * memory we copied from user land.
> - */
> -static int invalid_str(char *str, void *end)
> -{
> - while ((void *) str <= end)
> - if (!*str++)
> - return 0;
> - return -EINVAL;
> -}
> -
> -/*
> * Check that the user compiled against correct version of autofs
> * misc device code.
> *
> @@ -143,14 +131,6 @@ static int validate_dev_ioctl(int cmd, struct autofs_dev_ioctl *param)
> cmd);
> goto out;
> }
> -
> - err = invalid_str(param->path,
> - (void *) ((size_t) param + param->size));
> - if (err) {
> - AUTOFS_WARN("invalid path supplied for cmd(0x%08x)",
> - cmd);
> - goto out;
> - }
> }
>
> err = 0;


\
 
 \ /
  Last update: 2008-10-27 21:35    [W:0.265 / U:2.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site