I just ran the static analyser "cppcheck" over the
source code of libdbus-c++-0.9.0
It said many things, including
[xml.cpp:300]: (style) Array index 'x' is used before limits check.
Source code is
while (isspace(chars[x]) && x < y) ++x;
Maybe
while (z < y && isspace(chars[x])) ++x;
might be better code.