~ubuntu-branches/ubuntu/lucid/python2.6/lucid

« back to all changes in this revision

Viewing changes to Modules/binascii.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-03-11 13:30:19 UTC
  • mto: (10.1.13 sid)
  • mto: This revision was merged to the branch mainline in revision 44.
  • Revision ID: james.westby@ubuntu.com-20100311133019-sblbooa3uqrkoe70
Tags: upstream-2.6.5~rc2
ImportĀ upstreamĀ versionĀ 2.6.5~rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
282
282
        }
283
283
 
284
284
        /* We're lazy and allocate to much (fixed up later) */
285
 
        if ( (rv=PyString_FromStringAndSize(NULL, bin_len*2+2)) == NULL )
 
285
        if ( (rv=PyString_FromStringAndSize(NULL, 2 + (bin_len+2)/3*4)) == NULL )
286
286
                return NULL;
287
287
        ascii_data = (unsigned char *)PyString_AsString(rv);
288
288