have to worry about overflowing a buffer; thanks to Stefan Esser for catching that one. (It also means we handle it if there's no '\0' at the end.) svn path=/trunk/; revision=10341
svn path=/trunk/; revision=9345