File: | python-virtkey.c |
Function: | virtkey_layout_get_keys |
Error: | dereferencing NULL (MEM[(struct PyTupleObject *)keyTuple].ob_item) at python-virtkey.c:617 |
584 static PyObject * virtkey_layout_get_keys(PyObject * self,PyObject *args)
585 {
586 char * requestedSection;
587 if (PyArg_ParseTuple(args, "s", &requestedSection))
588 {
when PyArg_ParseTuple() succeeds
taking True path
589 XkbGeometryPtr geom;
590
591 virtkey * cvirt = (virtkey *)self;
592
593 int i, row, col;
594
595
596 geom = cvirt->kbd->geom;
597
when treating unknown struct _XkbDesc * from python-virtkey.c:597 as non-NULL
598 char * sectionString;
599
600 PyObject * rowTuple;
601
602 for (i = 0; i < geom->num_sections; ++i)
603 {
when treating unknown struct _XkbGeometry * from python-virtkey.c:597 as non-NULL
when considering range: 1 <= value <= 65535
taking True path
604 XkbSectionPtr section = &geom->sections[i];
605 sectionString = XGetAtomName (cvirt->display, section->name);
606 if (!strcmp(sectionString,requestedSection))
when treating unknown struct _XkbSection * from python-virtkey.c:605 as non-NULL
607 {
when considering value == (int)0 from python-virtkey.c:607
taking True path
608 rowTuple = PyTuple_New(section->num_rows);
609 for (row = 0; row < section->num_rows; ++row)
when PyTuple_New() succeeds
610 {
when considering range: 1 <= value <= 65535
taking True path
611 XkbRowPtr rowp = §ion->rows[row];
612 int x = rowp->left/10, y = rowp->top/10;
613
when treating unknown struct _XkbRow * from python-virtkey.c:612 as non-NULL
614 PyObject * keyTuple = PyTuple_New(rowp->num_keys);
615
when PyTuple_New() fails
616 for (col = 0; col < rowp->num_keys; ++col)
617 {
when considering range: 1 <= value <= 65535
taking True path
618 PyObject * key = report_key_info (cvirt,
619 &rowp->keys[col], col, &x, &y);
when report_key_info() succeeds
620 PyTuple_SET_ITEM(keyTuple,col,key);
621 }
dereferencing NULL (MEM[(struct PyTupleObject *)keyTuple].ob_item) at python-virtkey.c:617
found 3 similar trace(s) to this
622 PyTuple_SET_ITEM(rowTuple, row,keyTuple);
623 }
624 free(sectionString);
625 return rowTuple;
626 }
627 free(sectionString);
628 }
629 }
630
631 return PyTuple_New(0);
632 }
633
File: | python-virtkey.c |
Function: | virtkey_layout_get_keys |
Error: | dereferencing NULL (MEM[(struct PyTupleObject *)rowTuple].ob_item) at python-virtkey.c:610 |
584 static PyObject * virtkey_layout_get_keys(PyObject * self,PyObject *args)
585 {
586 char * requestedSection;
587 if (PyArg_ParseTuple(args, "s", &requestedSection))
588 {
when PyArg_ParseTuple() succeeds
taking True path
589 XkbGeometryPtr geom;
590
591 virtkey * cvirt = (virtkey *)self;
592
593 int i, row, col;
594
595
596 geom = cvirt->kbd->geom;
597
when treating unknown struct _XkbDesc * from python-virtkey.c:597 as non-NULL
598 char * sectionString;
599
600 PyObject * rowTuple;
601
602 for (i = 0; i < geom->num_sections; ++i)
603 {
when treating unknown struct _XkbGeometry * from python-virtkey.c:597 as non-NULL
when considering range: 1 <= value <= 65535
taking True path
604 XkbSectionPtr section = &geom->sections[i];
605 sectionString = XGetAtomName (cvirt->display, section->name);
606 if (!strcmp(sectionString,requestedSection))
when treating unknown struct _XkbSection * from python-virtkey.c:605 as non-NULL
607 {
when considering value == (int)0 from python-virtkey.c:607
taking True path
608 rowTuple = PyTuple_New(section->num_rows);
609 for (row = 0; row < section->num_rows; ++row)
when PyTuple_New() fails
610 {
when considering range: 1 <= value <= 65535
taking True path
611 XkbRowPtr rowp = §ion->rows[row];
612 int x = rowp->left/10, y = rowp->top/10;
613
when treating unknown struct _XkbRow * from python-virtkey.c:612 as non-NULL
614 PyObject * keyTuple = PyTuple_New(rowp->num_keys);
615
when PyTuple_New() succeeds
616 for (col = 0; col < rowp->num_keys; ++col)
617 {
when considering value == (short unsigned int)0 from python-virtkey.c:617
taking False path
618 PyObject * key = report_key_info (cvirt,
619 &rowp->keys[col], col, &x, &y);
620 PyTuple_SET_ITEM(keyTuple,col,key);
621 }
622 PyTuple_SET_ITEM(rowTuple, row,keyTuple);
623 }
dereferencing NULL (MEM[(struct PyTupleObject *)rowTuple].ob_item) at python-virtkey.c:610
found 3 similar trace(s) to this
624 free(sectionString);
625 return rowTuple;
626 }
627 free(sectionString);
628 }
629 }
630
631 return PyTuple_New(0);
632 }
633