~ubuntu-branches/ubuntu/natty/python3.1/natty-security

« back to all changes in this revision

Viewing changes to Modules/_pickle.c

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-07-06 16:52:42 UTC
  • mfrom: (1.2.1 upstream) (2.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20100706165242-2xv4i019r3et6c0j
Tags: 3.1.2+20100706-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.
  - Add debian/patches/overwrite-semaphore-check for Lucid buildds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1227
1227
    if (self->bin) {
1228
1228
        char pdata[5];
1229
1229
 
1230
 
        encoded = PyUnicode_AsUTF8String(obj);
 
1230
        encoded = PyUnicode_EncodeUTF8(PyUnicode_AS_UNICODE(obj),
 
1231
                                    PyUnicode_GET_SIZE(obj),
 
1232
                                    "surrogatepass");
1231
1233
        if (encoded == NULL)
1232
1234
            goto error;
1233
1235
 
3352
3354
    if (unpickler_read(self, &s, size) < 0)
3353
3355
        return -1;
3354
3356
 
3355
 
    str = PyUnicode_DecodeUTF8(s, size, NULL);
 
3357
    str = PyUnicode_DecodeUTF8(s, size, "surrogatepass");
3356
3358
    if (str == NULL)
3357
3359
        return -1;
3358
3360