SuccessChanges

Summary

  1. nolibxml/import: make sure there's a \0 at the end of the buffer (details)
  2. libxml/export_xmlbuffer: include the ending \0 in the returned length (details)
  3. libxml/export_xmlbuffer: detect and handle libxml dump errors (details)
  4. tests/xmlbuffer: really check nolibxml/libxml import/export (details)
  5. tests/xmlbuffer: check that the ending \0 is inside the returned length (details)
  6. nolibxml/import: don't duplicate the input buffer (details)
Commit a675609eda1121e13ea2c9abca66a24a352c8a45 by brice.goglin
nolibxml/import: make sure there's a \0 at the end of the buffer
If the user gives a non-NULL terminated buffer to set_xmlbuffer(), the
nolibxml() backend could go crazy. At least sscanf() and strchr() could
pass the end of the buffer.
Refs open-mpi/ompi#6181
Thanks to Gilles Gouaillardet for the patch.
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedhwloc/topology-xml-nolibxml.c (diff)
Commit c73a780f4455f2db5fd4dda70503cbb8f20c9c62 by brice.goglin
libxml/export_xmlbuffer: include the ending \0 in the returned length
It was omitted in the libxml case, even if that \0 actually exits.
And document things.
Refs open-mpi/ompi#6181
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedhwloc/topology-xml-libxml.c (diff)
The file was modifiedinclude/hwloc/export.h (diff)
The file was modifiedhwloc/topology-xml-nolibxml.c (diff)
The file was modifiedinclude/hwloc/diff.h (diff)
Commit 49f01d958e942890155c204c63aa69a32ce5f7ad by brice.goglin
libxml/export_xmlbuffer: detect and handle libxml dump errors
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedhwloc/topology-xml-libxml.c (diff)
Commit 827140a9fbbbd5c973094c97455be7bbf3eedc80 by brice.goglin
tests/xmlbuffer: really check nolibxml/libxml import/export
LIBXML env vars are parsed only once per process, we cannot change them
between imports/exports.
wrapper.sh now runs xmlbuffer once per combination of env vars.
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedtests/hwloc/wrapper.sh.in (diff)
The file was modifiedtests/hwloc/xmlbuffer.c (diff)
Commit 75f97b4ff2dc3c4fe41c11219ed2167b9862d18d by brice.goglin
tests/xmlbuffer: check that the ending \0 is inside the returned length
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedtests/hwloc/xmlbuffer.c (diff)
Commit 342e1b75e73b4b01bc157554512c875988b528e2 by brice.goglin
nolibxml/import: don't duplicate the input buffer
Not needed since we don't support multiple loads/reloads anymore.
Signed-off-by: Brice Goglin <Brice.Goglin@inria.fr>
The file was modifiedhwloc/topology-xml-nolibxml.c (diff)