File: | bibtexmodule.c |
Function: | fill_struct_dico |
Error: | dereferencing NULL (MEM[(struct PyBibtexField_Object *)tmp2].obj) at bibtexmodule.c:433 |
420 static void
421 fill_struct_dico (gpointer key, gpointer value, gpointer user)
422 {
423 PyObject * dico = (PyObject *) user;
424 PyObject * tmp1, * tmp2;
425
426 tmp1 = PyString_FromString ((char *) key);
when treating unknown void * from bibtexmodule.c:421 as non-NULL
when PyString_FromString() succeeds
427
428 tmp2 = (PyObject *) PyObject_NEW (PyBibtexField_Object, & PyBibtexField_Type);
when PyObject_Init() fails
429
430 ((PyBibtexField_Object *) tmp2)->obj = bibtex_struct_as_field
dereferencing NULL (MEM[(struct PyBibtexField_Object *)tmp2].obj) at bibtexmodule.c:433
found 1 similar trace(s) to this
431 (bibtex_struct_copy ((BibtexStruct *) value), BIBTEX_OTHER);
432
433 PyDict_SetItem (dico, tmp1, tmp2);
434
435 Py_DECREF (tmp1);
436 Py_DECREF (tmp2);
437 }
File: | bibtexmodule.c |
Function: | fill_struct_dico |
Error: | calling PyDict_SetItem with NULL as argument 2 (tmp1) at bibtexmodule.c:433 |
420 static void
421 fill_struct_dico (gpointer key, gpointer value, gpointer user)
422 {
423 PyObject * dico = (PyObject *) user;
424 PyObject * tmp1, * tmp2;
425
426 tmp1 = PyString_FromString ((char *) key);
when treating unknown void * from bibtexmodule.c:421 as non-NULL
when PyString_FromString() fails
427
428 tmp2 = (PyObject *) PyObject_NEW (PyBibtexField_Object, & PyBibtexField_Type);
when PyObject_Init() succeeds
429
430 ((PyBibtexField_Object *) tmp2)->obj = bibtex_struct_as_field
431 (bibtex_struct_copy ((BibtexStruct *) value), BIBTEX_OTHER);
432
433 PyDict_SetItem (dico, tmp1, tmp2);
when treating unknown void * from bibtexmodule.c:421 as non-NULL
calling PyDict_SetItem with NULL as argument 2 (tmp1) at bibtexmodule.c:433
PyDict_SetItem() invokes Py_TYPE() on the pointer via the PyString_CheckExact() macro, thus accessing (NULL)->ob_type
434
435 Py_DECREF (tmp1);
436 Py_DECREF (tmp2);
437 }