diff mbox

[CIFS] possible memory corruption in cifs_parse_mount_options()

Message ID 4DEC82B8.7000701@parallels.com (mailing list archive)
State New, archived
Headers show

Commit Message

Vasily Averin June 6, 2011, 7:33 a.m. UTC
error path after mountdata check frees uninitialized mountdata_copy

Signed-off-by: Vasily Averin <vvs@sw.ru>
---
 fs/cifs/connect.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

 	short int override_uid = -1;

Comments

Steve French June 6, 2011, 3:34 p.m. UTC | #1
Merged, after fixing patch corruption (line wrap due to emailer?)

On Mon, Jun 6, 2011 at 2:33 AM, Vasily Averin <vvs@parallels.com> wrote:
> error path after mountdata check frees uninitialized mountdata_copy
>
> Signed-off-by: Vasily Averin <vvs@sw.ru>
> ---
>  fs/cifs/connect.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 6d88b82..dd5e33e 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -784,7 +784,7 @@ cifs_parse_mount_options(const char *mountdata, const char
> *devname,
>                         struct smb_vol *vol)
>  {
>        char *value, *data, *end;
> -       char *mountdata_copy, *options;
> +       char *mountdata_copy = NULL, *options;
>        unsigned int  temp_len, i, j;
>        char separator[2];
>        short int override_uid = -1;
> --
> 1.7.4.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
diff mbox

Patch

diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 6d88b82..dd5e33e 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -784,7 +784,7 @@  cifs_parse_mount_options(const char *mountdata, const char
*devname,
 			 struct smb_vol *vol)
 {
 	char *value, *data, *end;
-	char *mountdata_copy, *options;
+	char *mountdata_copy = NULL, *options;
 	unsigned int  temp_len, i, j;
 	char separator[2];