possible memory corruption in cifs_parse_mount_options()
authorVasily Averin <[email protected]>
Mon, 6 Jun 2011 07:33:12 +0000 (11:33 +0400)
committerSteve French <[email protected]>
Mon, 6 Jun 2011 15:31:29 +0000 (15:31 +0000)
error path after mountdata check frees uninitialized mountdata_copy

Signed-off-by: Vasily Averin <[email protected]>
Signed-off-by: Steve French <[email protected]>
fs/cifs/connect.c

index 84c730701c099fc5fc7958c5a184d057ac2ad040..fb31c2c1bb1779d9891c446bc7d0bb94fe22fdd4 100644 (file)
@@ -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;