possible memory corruption in cifs_parse_mount_options()
Vasily Averin [Mon, 6 Jun 2011 07:33:12 +0000 (11:33 +0400)]
error path after mountdata check frees uninitialized mountdata_copy

Signed-off-by: Vasily Averin <vvs@sw.ru>
Signed-off-by: Steve French <sfrench@us.ibm.com>

fs/cifs/connect.c

index 84c7307..fb31c2c 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;