Re: [xml] test/reader6.py crashes...



!     msg[1000] = 0;
--- 1991,1997 ----
!     msg[1000-1] = 0;

I find it better to write things like this
   msg[sizeof msg - 1] = '\0';
That way if you change the definition of msg, the right thing still
happens.  I saw that there's lots of
   snprintf(msg, 1000, ....)
I suggest using "sizeof msg" there, too.
        /r$

--
Rich Salz                     Chief Security Architect
DataPower Technology          http://www.datapower.com
XS40 XML Security Gateway     http://www.datapower.com/products/xs40.html




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]