~ubuntu-branches/ubuntu/saucy/python2.7/saucy-proposed

« back to all changes in this revision

Viewing changes to Python/compile.c

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-05-15 19:15:16 UTC
  • mto: (36.1.23 sid)
  • mto: This revision was merged to the branch mainline in revision 87.
  • Revision ID: package-import@ubuntu.com-20130515191516-zmv6to904wemey7s
Tags: upstream-2.7.5
ImportĀ upstreamĀ versionĀ 2.7.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
221
221
    }
222
222
    plen = strlen(p);
223
223
 
224
 
    assert(1 <= PY_SSIZE_T_MAX - nlen);
225
 
    assert(1 + nlen <= PY_SSIZE_T_MAX - plen);
 
224
    if (plen + nlen >= PY_SSIZE_T_MAX - 1) {
 
225
        PyErr_SetString(PyExc_OverflowError,
 
226
                        "private identifier too large to be mangled");
 
227
        return NULL;
 
228
    }
226
229
 
227
230
    ident = PyString_FromStringAndSize(NULL, 1 + nlen + plen);
228
231
    if (!ident)