Explorar el Código

Ensure that there is null terminator at the end of entitydefs.

tags/v0.2
Ben Kurtovic hace 12 años
padre
commit
a1e6dfcef6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. +1
    -1
      mwparserfromhell/parser/tokenizer.c

+ 1
- 1
mwparserfromhell/parser/tokenizer.c Ver fichero

@@ -1452,7 +1452,7 @@ init_tokenizer(void)
Py_DECREF(htmlentitydefs);

unsigned numdefs = (unsigned) PyDict_Size(defmap);
entitydefs = malloc(numdefs * sizeof(char*));
entitydefs = calloc(numdefs + 1, sizeof(char*));
PyObject* deflist = PyDict_Keys(defmap);
if (!deflist) return;
Py_DECREF(defmap);


Cargando…
Cancelar
Guardar