eCryptfs: Fix data types (int/size_t)
Correct several format string data type specifiers. Correct filename size data types; they should be size_t rather than int when passed as parameters to some other functions (although note that the filenames will never be larger than int). Signed-off-by: Michael Halcrow <mhalcrow@us.ibm.com> Cc: Dustin Kirkland <dustin.kirkland@gmail.com> Cc: Eric Sandeen <sandeen@redhat.com> Cc: Tyler Hicks <tchicks@us.ibm.com> Cc: David Kleikamp <shaggy@us.ibm.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
df261c52ab
commit
a8f12864c5
@@ -2093,7 +2093,7 @@ int ecryptfs_encrypt_and_encode_filename(
|
||||
filename = kzalloc(sizeof(*filename), GFP_KERNEL);
|
||||
if (!filename) {
|
||||
printk(KERN_ERR "%s: Out of memory whilst attempting "
|
||||
"to kzalloc [%d] bytes\n", __func__,
|
||||
"to kzalloc [%zd] bytes\n", __func__,
|
||||
sizeof(*filename));
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
@@ -2127,7 +2127,7 @@ int ecryptfs_encrypt_and_encode_filename(
|
||||
(*encoded_name) = kmalloc((*encoded_name_size) + 1, GFP_KERNEL);
|
||||
if (!(*encoded_name)) {
|
||||
printk(KERN_ERR "%s: Out of memory whilst attempting "
|
||||
"to kzalloc [%d] bytes\n", __func__,
|
||||
"to kzalloc [%zd] bytes\n", __func__,
|
||||
(*encoded_name_size));
|
||||
rc = -ENOMEM;
|
||||
kfree(filename->encrypted_filename);
|
||||
|
Reference in New Issue
Block a user