~ubuntu-branches/ubuntu/lucid/openssl/lucid-proposed

« back to all changes in this revision

Viewing changes to crypto/des/xcbc_enc.c

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Valcárcel Scerpella (Canonical)
  • Date: 2009-12-06 20:16:24 UTC
  • mfrom: (11.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20091206201624-u126qjpqm2n2uuhu
Tags: 0.9.8k-7ubuntu1
* Merge from debian unstable, remaining changes (LP: #493392):
  - Link using -Bsymbolic-functions
  - Add support for lpia
  - Disable SSLv2 during compile
  - Ship documentation in openssl-doc, suggested by the package.
  - Use a different priority for libssl0.9.8/restart-services
    depending on whether a desktop, or server dist-upgrade is being
    performed.
  - Display a system restart required notification bubble on libssl0.9.8
    upgrade.
  - Replace duplicate files in the doc directory with symlinks.
  - Move runtime libraries to /lib, for the benefit of wpasupplicant
* Strip the patches out of the source into quilt patches
* Disable CVE-2009-3555.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
 
61
61
/* RSA's DESX */
62
62
 
 
63
#if 0 /* broken code, preserved just in case anyone specifically looks for this */
63
64
static unsigned char desx_white_in2out[256]={
64
65
0xBD,0x56,0xEA,0xF2,0xA2,0xF1,0xAC,0x2A,0xB0,0x93,0xD1,0x9C,0x1B,0x33,0xFD,0xD0,
65
66
0x30,0x04,0xB6,0xDC,0x7D,0xDF,0x32,0x4B,0xF7,0xCB,0x45,0x9B,0x31,0xBB,0x21,0x5A,
98
99
                }
99
100
 
100
101
        out0=out[0];
101
 
        out1=out[i];
 
102
        out1=out[i]; /* BUG: out-of-bounds read */
102
103
        for (i=0; i<8; i++)
103
104
                {
104
105
                out[i]=in[i]^desx_white_in2out[out0^out1];
106
107
                out1=(int)out[i&0x07];
107
108
                }
108
109
        }
 
110
#endif
109
111
 
110
112
void DES_xcbc_encrypt(const unsigned char *in, unsigned char *out,
111
113
                      long length, DES_key_schedule *schedule,