Skip to content

Commit

Permalink
* device-src/s3-util.c: Fix memory allocation issue.
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/amanda/code/amanda/trunk@6096 a8d146d6-cc15-0410-8900-af154a0219e0
  • Loading branch information
Jean-Louis Martineau committed Feb 3, 2015
1 parent 22699e8 commit 9a84173
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog
@@ -1,3 +1,6 @@
2015-02-03 Jean-Louis Martineau <martineau@zmanda.com>
* device-src/s3-util.c: Fix memory allocation issue.

2015-02-03 Jean-Louis Martineau <martineau@zmanda.com>
* application-src/amstar.c: Support include in backup mode.

Expand Down
2 changes: 1 addition & 1 deletion device-src/s3-util.c
Expand Up @@ -235,14 +235,14 @@ EncodeHMACSHA256(
{
unsigned char *hmachash = malloc(32);
const unsigned char *datatohash = (unsigned char *)data;
unsigned char tk[SHA256_DIGEST_LENGTH];

// Initialise HMACh
HMAC_CTX HMAC;
unsigned int hmaclength = 32;
memset(hmachash, 0, hmaclength);

if (keylen > 64 ) {
unsigned char tk[SHA256_DIGEST_LENGTH];
SHA256(key, keylen, tk);
key = tk;
keylen = SHA256_DIGEST_LENGTH;
Expand Down

0 comments on commit 9a84173

Please sign in to comment.