/* If the requested operation results in an overflow or an underflow condition, then Result is set to CHAR8_ERROR and RETURN_BUFFER_TOO_SMALL is returned. */
RETURN_STATUS EFIAPI SafeChar8Mult(IN CHAR8 Multiplicand, IN CHAR8 Multiplier, OUT CHAR8 *Result)
/* If the requested operation results in an overflow or an underflow condition, then Result is set to CHAR8_ERROR and RETURN_BUFFER_TOO_SMALL is returned. */
RETURN_STATUS EFIAPI SafeChar8Mult(IN CHAR8 Multiplicand, IN CHAR8 Multiplier, OUT CHAR8 *Result)
{
  INT32  Multiplicand32;
  INT32  Multiplier32;
  if (Result == NULL) {
    return RETURN_INVALID_PARAMETER;
  }
  Multiplicand32 = (INT32)Multiplicand;
  Multiplier32   = (INT32)Multiplier;
  if ((Multiplicand32 < 0) || (Multiplicand32 > MAX_INT8)) {
    *Result = CHAR8_ERROR;
    return RETURN_BUFFER_TOO_SMALL;
  }
  if ((Multiplier32 < 0) || (Multiplier32 > MAX_INT8)) {
    *Result = CHAR8_ERROR;
    return RETURN_BUFFER_TOO_SMALL;
  }
  return SafeInt32ToChar8 (Multiplicand32 * Multiplier32, Result);
}