~ubuntu-branches/ubuntu/vivid/openssl/vivid-updates

« back to all changes in this revision

Viewing changes to crypto/cryptlib.c

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2013-03-19 14:33:14 UTC
  • Revision ID: package-import@ubuntu.com-20130319143314-b3hsxjjcin3ebyy0
Tags: 1.0.1c-4ubuntu8
* SECURITY UPDATE: "Lucky Thirteen" timing side-channel TLS attack
  - debian/patches/CVE-2013-0169.patch: re-enabled patch and added extra
    commit from upstream to fix regression.
  - CVE-2013-0169

Show diffs side-by-side

added added

removed removed

Lines of Context:
924
924
        }
925
925
 
926
926
void *OPENSSL_stderr(void)      { return stderr; }
 
927
 
 
928
int CRYPTO_memcmp(const void *in_a, const void *in_b, size_t len)
 
929
        {
 
930
        size_t i;
 
931
        const unsigned char *a = in_a;
 
932
        const unsigned char *b = in_b;
 
933
        unsigned char x = 0;
 
934
 
 
935
        for (i = 0; i < len; i++)
 
936
                x |= a[i] ^ b[i];
 
937
 
 
938
        return x;
 
939
        }