Skip to content

Commit

Permalink
eCryptfs: initialize payload_len in keystore.c
Browse files Browse the repository at this point in the history
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 <sque@chromium.org>
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
  • Loading branch information
Simon Que authored and Tyler Hicks committed Jan 17, 2013
1 parent dfdebc2 commit fa51996
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ecryptfs/keystore.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fa51996

Please sign in to comment.