File: pyx/font/_t1code.c
Function: py_decoder
Error: returning (PyObject*)NULL without setting an exception
31 static PyObject *py_decoder(PyObject *self, PyObject *args)
32 {
33     unsigned char *code;
34     int lcode, pr, n;
35 
36     if (PyArg_ParseTuple(args, "s#ii", (char **) &code, &lcode, &pr, &n)) {
37       unsigned char *data;
when PyArg_ParseTuple() succeeds
taking True path
38       int i;
39       unsigned char x;
40       uint16_t r=pr;
41       PyObject *result;
42 
43       if (! (data = (unsigned char *) malloc(lcode)) )
44           return NULL;
when treating unknown void * from pyx/font/_t1code.c:44 as NULL
taking True path
45 
46       for (i=0; i<lcode; i++) {
47         x = code[i];
48         data[i] = x ^ ( r >> 8);
49         r = (x + r) * C1 + C2;
50       }
51 
52       /* convert result to string stripping first n chars */
53       result = PyString_FromStringAndSize((const char *)data + n, lcode - n);
54       free(data);
55       return result;
56     }
57     else return NULL;
58 
59 }
60 
returning (PyObject*)NULL without setting an exception