Merge tag '5.1-rc-smb3-fixes' of git://git.samba.org/sfrench/cifs-2.6
[sfrench/cifs-2.6.git] / fs / cifs / link.c
index 2148b0f60e5e8def04fdcaa9d54ddd137c27bb0d..62216dc8f9f522fc041f2462c74a9d3feb094394 100644 (file)
@@ -103,9 +103,9 @@ parse_mf_symlink(const u8 *buf, unsigned int buf_len, unsigned int *_link_len,
                return rc;
        }
 
-       snprintf(md5_str2, sizeof(md5_str2),
-                CIFS_MF_SYMLINK_MD5_FORMAT,
-                CIFS_MF_SYMLINK_MD5_ARGS(md5_hash));
+       scnprintf(md5_str2, sizeof(md5_str2),
+                 CIFS_MF_SYMLINK_MD5_FORMAT,
+                 CIFS_MF_SYMLINK_MD5_ARGS(md5_hash));
 
        if (strncmp(md5_str1, md5_str2, 17) != 0)
                return -EINVAL;
@@ -142,10 +142,10 @@ format_mf_symlink(u8 *buf, unsigned int buf_len, const char *link_str)
                return rc;
        }
 
-       snprintf(buf, buf_len,
-                CIFS_MF_SYMLINK_LEN_FORMAT CIFS_MF_SYMLINK_MD5_FORMAT,
-                link_len,
-                CIFS_MF_SYMLINK_MD5_ARGS(md5_hash));
+       scnprintf(buf, buf_len,
+                 CIFS_MF_SYMLINK_LEN_FORMAT CIFS_MF_SYMLINK_MD5_FORMAT,
+                 link_len,
+                 CIFS_MF_SYMLINK_MD5_ARGS(md5_hash));
 
        ofs = CIFS_MF_SYMLINK_LINK_OFFSET;
        memcpy(buf + ofs, link_str, link_len);