goto out_free;
}
if (unlikely(body_size < (ECRYPTFS_SIG_SIZE + 2))) {
- printk(KERN_WARNING "Invalid body size ([%d])\n", body_size);
+ printk(KERN_WARNING "Invalid body size ([%td])\n", body_size);
rc = -EINVAL;
goto out_free;
}
goto out_free;
}
if (unlikely(body_size < (ECRYPTFS_SALT_SIZE + 5))) {
- printk(KERN_WARNING "Invalid body size ([%d])\n", body_size);
+ printk(KERN_WARNING "Invalid body size ([%td])\n", body_size);
rc = -EINVAL;
goto out_free;
}
goto out;
}
if (body_size < 14) {
- printk(KERN_WARNING "Invalid body size ([%d])\n", body_size);
+ printk(KERN_WARNING "Invalid body size ([%td])\n", body_size);
rc = -EINVAL;
goto out;
}
+ key_rec->enc_key_size); /* Encrypted key size */
if (max_packet_size > (*remaining_bytes)) {
printk(KERN_ERR "Packet length larger than maximum allowable; "
- "need up to [%d] bytes, but there are only [%d] "
+ "need up to [%td] bytes, but there are only [%td] "
"available\n", max_packet_size, (*remaining_bytes));
rc = -EINVAL;
goto out;
* Returns zero on success; non-zero on error.
*/
static int
-write_tag_11_packet(char *dest, int *remaining_bytes, char *contents,
+write_tag_11_packet(char *dest, size_t *remaining_bytes, char *contents,
size_t contents_length, size_t *packet_length)
{
size_t packet_size_length;
+ contents_length); /* Literal data */
if (max_packet_size > (*remaining_bytes)) {
printk(KERN_ERR "Packet length larger than maximum allowable; "
- "need up to [%d] bytes, but there are only [%d] "
+ "need up to [%td] bytes, but there are only [%td] "
"available\n", max_packet_size, (*remaining_bytes));
rc = -EINVAL;
goto out;
+ 1 /* Hash iterations */
+ key_rec->enc_key_size); /* Encrypted key size */
if (max_packet_size > (*remaining_bytes)) {
- printk(KERN_ERR "Packet too large; need up to [%d] bytes, but "
- "there are only [%d] available\n", max_packet_size,
+ printk(KERN_ERR "Packet too large; need up to [%td] bytes, but "
+ "there are only [%td] available\n", max_packet_size,
(*remaining_bytes));
rc = -EINVAL;
goto out;
NULL, mount_crypt_stat->global_default_cipher_name,
mount_crypt_stat->global_default_cipher_key_size))) {
printk(KERN_ERR "Error attempting to initialize cipher with "
- "name = [%s] and key size = [%d]; rc = [%d]\n",
+ "name = [%s] and key size = [%td]; rc = [%d]\n",
mount_crypt_stat->global_default_cipher_name,
mount_crypt_stat->global_default_cipher_key_size, rc);
rc = -EINVAL;