* [PATCH v2] fs: ecryptfs: initialize payload_len in keystore.c
@ 2013-01-17 19:18 Simon Que
2013-01-17 21:39 ` Tyler Hicks
0 siblings, 1 reply; 2+ messages in thread
From: Simon Que @ 2013-01-17 19:18 UTC (permalink / raw)
To: ecryptfs, tyhicks, dustin.kirkland; +Cc: msb, Simon Que
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>
---
fs/ecryptfs/keystore.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
index 2333203..6154cde 100644
--- a/fs/ecryptfs/keystore.c
+++ b/fs/ecryptfs/keystore.c
@@ -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);
--
1.7.8.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v2] fs: ecryptfs: initialize payload_len in keystore.c
2013-01-17 19:18 [PATCH v2] fs: ecryptfs: initialize payload_len in keystore.c Simon Que
@ 2013-01-17 21:39 ` Tyler Hicks
0 siblings, 0 replies; 2+ messages in thread
From: Tyler Hicks @ 2013-01-17 21:39 UTC (permalink / raw)
To: Simon Que; +Cc: ecryptfs, dustin.kirkland, msb
[-- Attachment #1: Type: text/plain, Size: 1335 bytes --]
On 2013-01-17 11:18:20, Simon Que wrote:
> 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>
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
> ---
> fs/ecryptfs/keystore.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/ecryptfs/keystore.c b/fs/ecryptfs/keystore.c
> index 2333203..6154cde 100644
> --- a/fs/ecryptfs/keystore.c
> +++ b/fs/ecryptfs/keystore.c
> @@ -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);
> --
> 1.7.8.6
>
> --
> To unsubscribe from this list: send the line "unsubscribe ecryptfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-17 21:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-17 19:18 [PATCH v2] fs: ecryptfs: initialize payload_len in keystore.c Simon Que
2013-01-17 21:39 ` Tyler Hicks
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.