Changeset a2ab20a for python


Ignore:
Timestamp:
May 14, 2016, 5:25:34 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
2f4d9b7
Parents:
3865924
Message:

python/ext/py-source.c: check seek is not negative

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/ext/py-source.c

    r3865924 ra2ab20a  
    252252  uint_t err = 0;
    253253
    254   uint_t position;
     254  int position;
    255255  if (!PyArg_ParseTuple (args, "I", &position)) {
     256    return NULL;
     257  }
     258
     259  if (position < 0) {
     260    PyErr_Format(PyExc_ValueError,
     261        "error when seeking in source: can not seek to negative value %d",
     262        position);
    256263    return NULL;
    257264  }
Note: See TracChangeset for help on using the changeset viewer.