diff options
-rw-r--r-- | fs/cifs/connect.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index 026d6464335b..9c288653e6d6 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -2142,14 +2142,14 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) | |||
2142 | 2142 | ||
2143 | len = delim - payload; | 2143 | len = delim - payload; |
2144 | if (len > MAX_USERNAME_SIZE || len <= 0) { | 2144 | if (len > MAX_USERNAME_SIZE || len <= 0) { |
2145 | cFYI(1, "Bad value from username search (len=%ld)", len); | 2145 | cFYI(1, "Bad value from username search (len=%zd)", len); |
2146 | rc = -EINVAL; | 2146 | rc = -EINVAL; |
2147 | goto out_key_put; | 2147 | goto out_key_put; |
2148 | } | 2148 | } |
2149 | 2149 | ||
2150 | vol->username = kstrndup(payload, len, GFP_KERNEL); | 2150 | vol->username = kstrndup(payload, len, GFP_KERNEL); |
2151 | if (!vol->username) { | 2151 | if (!vol->username) { |
2152 | cFYI(1, "Unable to allocate %ld bytes for username", len); | 2152 | cFYI(1, "Unable to allocate %zd bytes for username", len); |
2153 | rc = -ENOMEM; | 2153 | rc = -ENOMEM; |
2154 | goto out_key_put; | 2154 | goto out_key_put; |
2155 | } | 2155 | } |
@@ -2157,7 +2157,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) | |||
2157 | 2157 | ||
2158 | len = key->datalen - (len + 1); | 2158 | len = key->datalen - (len + 1); |
2159 | if (len > MAX_PASSWORD_SIZE || len <= 0) { | 2159 | if (len > MAX_PASSWORD_SIZE || len <= 0) { |
2160 | cFYI(1, "Bad len for password search (len=%ld)", len); | 2160 | cFYI(1, "Bad len for password search (len=%zd)", len); |
2161 | rc = -EINVAL; | 2161 | rc = -EINVAL; |
2162 | kfree(vol->username); | 2162 | kfree(vol->username); |
2163 | vol->username = NULL; | 2163 | vol->username = NULL; |
@@ -2167,7 +2167,7 @@ cifs_set_cifscreds(struct smb_vol *vol, struct cifs_ses *ses) | |||
2167 | ++delim; | 2167 | ++delim; |
2168 | vol->password = kstrndup(delim, len, GFP_KERNEL); | 2168 | vol->password = kstrndup(delim, len, GFP_KERNEL); |
2169 | if (!vol->password) { | 2169 | if (!vol->password) { |
2170 | cFYI(1, "Unable to allocate %ld bytes for password", len); | 2170 | cFYI(1, "Unable to allocate %zd bytes for password", len); |
2171 | rc = -ENOMEM; | 2171 | rc = -ENOMEM; |
2172 | kfree(vol->username); | 2172 | kfree(vol->username); |
2173 | vol->username = NULL; | 2173 | vol->username = NULL; |