Bug 538940: the error message buffer should be one byte larger than the length returned by PR_GetErrorTextLength so that there is room for the terminating null byte.  Ensure the buffer is null-terminated when the error text length is 0 because PR_GetErrorText does not copy anything to the buffer in that case.  The patch is contributed by Mike Hommey <mh+mozilla@glandium.org>.  r=wtc.
Bug 538940: the error message buffer should be one byte larger than the
length returned by PR_GetErrorTextLength so that there is room for the
terminating null byte.  Ensure the buffer is null-terminated when the
error text length is 0 because PR_GetErrorText does not copy anything to
the buffer in that case.  The patch is contributed by Mike Hommey
<mh+mozilla@glandium.org>.  r=wtc.

makotokato/nsprpub,makotokato/nsprpub,makotokato/nsprpub,makotokato/nsprpub,makotokato/nsprpub