aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/ecryptfs_kernel.h2
-rw-r--r--fs/ecryptfs/keystore.c1
2 files changed, 2 insertions, 1 deletions
diff --git a/fs/ecryptfs/ecryptfs_kernel.h b/fs/ecryptfs/ecryptfs_kernel.h
index 6c6b8261092e..40c93fe41cc3 100644
--- a/fs/ecryptfs/ecryptfs_kernel.h
+++ b/fs/ecryptfs/ecryptfs_kernel.h
@@ -233,7 +233,7 @@ ecryptfs_get_key_payload_data(struct key *key)
233 233
234struct ecryptfs_key_sig { 234struct ecryptfs_key_sig {
235 struct list_head crypt_stat_list; 235 struct list_head crypt_stat_list;
236 char keysig[ECRYPTFS_SIG_SIZE_HEX]; 236 char keysig[ECRYPTFS_SIG_SIZE_HEX + 1];
237}; 237};
238 238
239struct ecryptfs_filename { 239struct ecryptfs_filename {
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 523e51dec66e..bd139dfad8e7 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -2425,6 +2425,7 @@ int ecryptfs_add_keysig(struct ecryptfs_crypt_stat *crypt_stat, char *sig)
2425 return -ENOMEM; 2425 return -ENOMEM;
2426 } 2426 }
2427 memcpy(new_key_sig->keysig, sig, ECRYPTFS_SIG_SIZE_HEX); 2427 memcpy(new_key_sig->keysig, sig, ECRYPTFS_SIG_SIZE_HEX);
2428 new_key_sig->keysig[ECRYPTFS_SIG_SIZE_HEX] = '\0';
2428 /* Caller must hold keysig_list_mutex */ 2429 /* Caller must hold keysig_list_mutex */
2429 list_add(&new_key_sig->crypt_stat_list, &crypt_stat->keysig_list); 2430 list_add(&new_key_sig->crypt_stat_list, &crypt_stat->keysig_list);
2430 2431