summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d313b6)
raw | patch | inline | side by side (parent: 4d313b6)
author | Florian Forster <octo@noris.net> | |
Wed, 7 Apr 2010 09:53:32 +0000 (11:53 +0200) | ||
committer | Florian Forster <octo@noris.net> | |
Wed, 7 Apr 2010 09:53:32 +0000 (11:53 +0200) |
A couple of bytes were leaked with every encrypted packet received.
src/network.c | patch | blob | history |
diff --git a/src/network.c b/src/network.c
index a530505628803262c8d1e40ae3789557f72feae5..c34eb38e32670c03530da22d689bdab315e47523 100644 (file)
--- a/src/network.c
+++ b/src/network.c
cypher = network_get_aes256_cypher (se, pea.iv, sizeof (pea.iv),
pea.username);
if (cypher == NULL)
+ {
+ sfree (pea.username);
return (-1);
+ }
payload_len = part_size - (PART_ENCRYPTION_AES256_SIZE + username_len);
assert (payload_len > 0);
/* in = */ NULL, /* in len = */ 0);
if (err != 0)
{
+ sfree (pea.username);
ERROR ("network plugin: gcry_cipher_decrypt returned: %s",
gcry_strerror (err));
return (-1);
buffer + buffer_offset, payload_len);
if (memcmp (hash, pea.hash, sizeof (hash)) != 0)
{
+ sfree (pea.username);
ERROR ("network plugin: Decryption failed: Checksum mismatch.");
return (-1);
}
*ret_buffer = buffer + part_size;
*ret_buffer_len = buffer_len - part_size;
+ sfree (pea.username);
+
return (0);
} /* }}} int parse_part_encr_aes256 */
/* #endif HAVE_LIBGCRYPT */