if (punycode_success != status)
if (punycode_success != status || encodedLength >= kEncodedBufSize)
static nsresult punycode(const char* prefix, const nsAString& in, nsACString& out){  PRUint32 ucs4Buf[kMaxDNSNodeLen + 1];  PRUint32 ucs4Len;  utf16ToUcs4(in, ucs4Buf, kMaxDNSNodeLen, &ucs4Len);  // need maximum 20 bits to encode 16 bit Unicode character  // (include null terminator)  const PRUint32 kEncodedBufSize = kMaxDNSNodeLen * 20 / 8 + 1 + 1;    char encodedBuf[kEncodedBufSize];  punycode_uint encodedLength;  enum punycode_status status = punycode_encode(ucs4Len,                                                ucs4Buf,                                                nsnull,                                                &encodedLength,                                                encodedBuf);  if (punycode_success != status)    return NS_ERROR_FAILURE;  out.Assign(nsDependentCString(prefix) + nsDependentCString(encodedBuf));  return NS_OK;}