Browse Source

possible memory corruption in cifs_parse_mount_options()

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>
Vasily Averin 14 years ago
parent
commit
957df4535d
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/cifs/connect.c

+ 1 - 1
fs/cifs/connect.c

@@ -784,7 +784,7 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
 			 struct smb_vol *vol)
 			 struct smb_vol *vol)
 {
 {
 	char *value, *data, *end;
 	char *value, *data, *end;
-	char *mountdata_copy, *options;
+	char *mountdata_copy = NULL, *options;
 	unsigned int  temp_len, i, j;
 	unsigned int  temp_len, i, j;
 	char separator[2];
 	char separator[2];
 	short int override_uid = -1;
 	short int override_uid = -1;