fs: ecryptfs: initialize payload_len in keystore.c
PATCH v2 1/1 fs: ecryptfs: initialize payload_len in keystore.c
This is meant to remove a compiler warning. It should not make any functional change.
payload_len should be initialized when it is passed to write_tag_64_packet() as a pointer. If that call fails, this function should return early, and payload_len won't be used.
Signed-off-by Simon Que <[email protected]>
--- fs/ecryptfs/keystore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
fs/ecryptfs/keystore.c +1 -1
@@ -1150,7 +1150,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,struct ecryptfs_message *msg =NULL ;char *auth_tok_sig;char *payload; -size_t payload_len; +size_t payload_len =0 ;int rc; rc =ecryptfs_get_auth_tok_sig (&auth_tok_sig, auth_tok);
Signature · 1 line
1.7.8.6
Quoted 8 lines · Simon Que
This is meant to remove a compiler warning. It should not make any functional change.
payload_lenshould be initialized when it is passed towrite_tag_64_packet()as a pointer. If that call fails, this function should return early, andpayload_lenwon't be used.Signed-off-by Simon Que <[email protected]>
Thanks for resubmitting. I've pushed it to the next branch at:
http://git.kernel.org/?p=linux/kernel/git/tyhicks/ecryptfs.git;a=summary
Tyler
Quoted 24 lines
--- fs/ecryptfs/keystore.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)fs/ecryptfs/keystore.c +1
-1@@ -1150,7 +1150,7 @@ decrypt_pki_encrypted_session_key(struct ecryptfs_auth_tok *auth_tok,struct ecryptfs_message *msg =NULL ;char *auth_tok_sig;char *payload; -size_t payload_len; +size_t payload_len =0 ;int rc; rc =ecryptfs_get_auth_tok_sig (&auth_tok_sig, auth_tok);Signature · 6 lines
1.7.8.6 -- To unsubscribe from this list: send the line "unsubscribe ecryptfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html