Fix a segfault in the CGI script, reported by Denis.

* src/tgbaalgos/emptiness.cc
(emptiness_check_instantiator::construct): Set *err = 0
on success.  This avoids problem with the python bindings
always converting *err to a string and sometimes failing
to do so when err was not initialized.
This commit is contained in:
Alexandre Duret-Lutz 2012-03-09 08:38:55 +01:00
parent 187997fe5d
commit a01034e5f9
2 changed files with 16 additions and 3 deletions

View file

@ -1,3 +1,13 @@
2012-03-09 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Fix a segfault in the CGI script, reported by Denis.
* src/tgbaalgos/emptiness.cc
(emptiness_check_instantiator::construct): Set *err = 0
on success. This avoids problem with the python bindings
always converting *err to a string and sometimes failing
to do so when err was not initialized.
2012-03-08 Alexandre Duret-Lutz <adl@lrde.epita.fr>
ltl2tgba.html: Fix initialization of unset options on reload.

View file

@ -1,5 +1,5 @@
// Copyright (C) 2009, 2011 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2009, 2011, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
@ -273,7 +273,10 @@ namespace spot
ec_algo* info = ec_algos;
for (unsigned i = 0; i < sizeof(ec_algos)/sizeof(*ec_algos); ++i, ++info)
if (n == info->name)
return new emptiness_check_instantiator(o, info);
{
*err = 0;
return new emptiness_check_instantiator(o, info);
}
*err = name;
return 0;
}