Open MPI logo

Hardware Locality Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Hardware Locality Development mailing list

Subject: [hwloc-devel] XML string filtering
From: Brice Goglin (Brice.Goglin_at_[hidden])
Date: 2012-07-06 08:49:51


I am looking at filtering special characters out of strings to make XML
export/reimport safer when the BIOS contains ugly DMI infos or when the
user sets crazy custom object info strings.

We don't want to waste time with encoding, supporting ascii is enough in
the vast majority of cases. Others invalid chars will be removed from
the XML-exported strings. But libxml doesn't like most characters
between 0 and 31. I could just use isprint() to check every character
before export and only keep those between 32 and 127. But what about \n,
\t, \r, \f which are before ? Do we want to allow them?

Brice