]> git.saurik.com Git - apt.git/commit
fix SHA2* cleanups to zero-out the complete context
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 24 Jun 2013 10:51:29 +0000 (12:51 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 24 Jun 2013 12:07:49 +0000 (14:07 +0200)
commitf58a9890e345faa04b5fcb2a01cae39f986a42db
tree2fc06243335c8843b8bc87e989293651d04cba66
parent6420c00e30cd9512e045a5370bf391321691ca78
fix SHA2* cleanups to zero-out the complete context

GCC 4.8 is now clever enough to warn about:

contrib/sha2_internal.cc: In function ‘char* SHA256_End(SHA256_CTX*, char*)’:
contrib/sha2_internal.cc:656:31: warning: argument to ‘sizeof’ in ‘void*
memset(void*, int, size_t)’ call is the same expression as the destination;
did you mean to dereference it? [-Wsizeof-pointer-memaccess]
   MEMSET_BZERO(context, sizeof(context));

So fix it as suggested. Its interesting though that the SHA2*
calculation as far as we need it works even without zeroing out.

Git-Dch: Ignore
apt-pkg/contrib/sha2_internal.cc