nsCRT::memset(workString, 0, obj->headers->all_headers_size + 1);
memset(workString, 0, obj->headers->all_headers_size + 1);
FindCharacterSet(MimeObject *obj){  char    *retCharSet = nsnull;  char    *tCharSet = nsnull;  char    *workString = nsnull;  if ( (!obj->headers) || (!obj->headers->all_headers) )    return nsnull;  workString = (char *)PR_Malloc(obj->headers->all_headers_size + 1);  if (!workString)    return nsnull;  nsCRT::memset(workString, 0, obj->headers->all_headers_size + 1);  memcpy(workString, obj->headers->all_headers, obj->headers->all_headers_size);  char *cTypePtr = (char *) PL_strcasestr(workString, HEADER_CONTENT_TYPE);  if (!cTypePtr)  {    PR_FREEIF(workString);    return nsnull;  }  while ( (*cTypePtr) && (*cTypePtr != nsCRT::CR) && (*cTypePtr != nsCRT::LF) )  {    tCharSet  = (char *) PL_strcasestr(cTypePtr, "charset=");    if (tCharSet )      break;    ++cTypePtr;  }  if (tCharSet)  {    if (nsCRT::strlen(tCharSet) > 8)    {      retCharSet = PL_strdup( (tCharSet + 8) );      char  *ptr = retCharSet;      while (*ptr)      {        if ( (*ptr == ' ') || (*ptr == ';') || (*ptr == nsCRT::CR) || (*ptr == nsCRT::LF) )         {          *ptr = '\0';          break;        }        ptr++;      }    }  }  PR_FREEIF(workString);  return retCharSet;}