nsCRT::memcpy (data->token, token, i);
memcpy (data->token, token, i);
mime_decode_base64_buffer (MimeDecoderData *data,						   const char *buffer, PRInt32 length){  /* Warning, we are overwriting the buffer which was passed in.	 This is ok, because decoding these formats will never result	 in larger data than the input, only smaller. */  const char *in  = buffer;  char *out = (char *) buffer;  char token [4];  int i;  PRBool leftover = (data->token_size > 0);  PR_ASSERT(data->encoding == mime_Base64);  /* For the first pass, initialize the token from the unread-buffer. */  i = 0;  while (i < 4 && data->token_size > 0)	{	  token [i] = data->token[i];	  data->token_size--;	  i++;	}  while (length > 0)	{	  while (i < 4 && length > 0)		{		  if ((*in >= 'A' && *in <= 'Z') ||			  (*in >= 'a' && *in <= 'z') ||			  (*in >= '0' && *in <= '9') ||			  *in == '+' || *in == '/' || *in == '=')			token [i++] = *in;		  in++;		  length--;		}	  if (i < 4)		{		  /* Didn't get enough for a complete token. */		  nsCRT::memcpy (data->token, token, i);		  data->token_size = i;		  length = 0;		  break;		}	  i = 0;	  if (leftover)		{		  /* If there are characters left over from the last time around,			 we might not have space in the buffer to do our dirty work			 (if there were 2 or 3 left over, then there is only room for			 1 or 2 in the buffer right now, and we need 3.)  This is only			 a problem for the first chunk in each buffer, so in that			 case, just write prematurely. */		  int n;		  n = mime_decode_base64_token (token, token);		  n = data->write_buffer (token, n, data->closure);		  if (n < 0) /* abort */			return n;		  /* increment buffer so that we don't write the 1 or 2 unused			 characters now at the front. */		  buffer = in;		  out = (char *) buffer;		  leftover = PR_FALSE;		}	  else		{		  int n = mime_decode_base64_token (token, out);		  /* Advance "out" by the number of bytes just written to it. */		  out += n;		}	}  /* Now that we've altered the data in place, write it. */  if (out > buffer)	return data->write_buffer (buffer, (out - buffer), data->closure);  else	return 1;}