~pythonregexp2.7/python/issue2636-01+09-02

« back to all changes in this revision

Viewing changes to Modules/_json.c

  • Committer: Jeffrey C. "The TimeHorse" Jacobs
  • Date: 2008-09-22 00:16:16 UTC
  • mfrom: (39022.1.34 Regexp-2.7)
  • Revision ID: darklord@timehorse.com-20080922001616-p1wdip9lfp0zl5cu
Merged in changes from the Atomic Grouping / Possessive Qualifiers branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
235
235
    if (chunks == NULL) {
236
236
        goto bail;
237
237
    }
 
238
    if (end < 0 || len <= end) {
 
239
        PyErr_SetString(PyExc_ValueError, "end is out of bounds");
 
240
        goto bail;
 
241
    }
238
242
    while (1) {
239
243
        /* Find the end of the string or the next escape */
240
244
        Py_UNICODE c = 0;
245
249
                break;
246
250
            }
247
251
            else if (strict && c <= 0x1f) {
248
 
                raise_errmsg("Invalid control character at", pystr, begin);
 
252
                raise_errmsg("Invalid control character at", pystr, next);
249
253
                goto bail;
250
254
            }
251
255
        }
396
400
    if (chunks == NULL) {
397
401
        goto bail;
398
402
    }
 
403
    if (end < 0 || len <= end) {
 
404
        PyErr_SetString(PyExc_ValueError, "end is out of bounds");
 
405
        goto bail;
 
406
    }
399
407
    while (1) {
400
408
        /* Find the end of the string or the next escape */
401
409
        Py_UNICODE c = 0;
406
414
                break;
407
415
            }
408
416
            else if (strict && c <= 0x1f) {
409
 
                raise_errmsg("Invalid control character at", pystr, begin);
 
417
                raise_errmsg("Invalid control character at", pystr, next);
410
418
                goto bail;
411
419
            }
412
420
        }