crypto/fipsmodule/service_indicator/service_indicator.c
void FIPS_service_indicator_lock_state(void) {
  struct fips_service_indicator_state *indicator = FIPS_service_indicator_get();
  if (indicator == NULL) {
    return;
  }

  if (indicator->lock_state + 1 > indicator->lock_state) {
    indicator->lock_state++;
  } else {
    OPENSSL_PUT_ERROR(CRYPTO, ERR_R_OVERFLOW);
  }
}
// |FIPS_service_indicator_lock_state| and |FIPS_service_indicator_unlock_state|
// should not under/overflow in normal operation. They are still checked and
// errors added to facilitate testing in service_indicator_test.cc This should
// only happen if lock/unlock are called in an incorrect order or multiple times
// in the same function.
|FIPS_service_indicator_lock_state| and |FIPS_service_indicator_unlock_state|
should not under/overflow in normal operation. They are still checked and
errors added to facilitate testing in service_indicator_test.cc This should
only happen if lock/unlock are called in an incorrect order or multiple times
in the same function.
|FIPS_service_indicator_lock_state| and |FIPS_service_indicator_unlock_state| should not under / overflow in normal operation . They are still checked and errors added to facilitate testing in service_indicator_test . cc This should only happen if lock / unlock are called in an incorrect order or multiple times in the same function .
void FIPS_service_indicator_lock_state(void) {
  struct fips_service_indicator_state *indicator = FIPS_service_indicator_get();
  if (indicator == NULL) {
    return;
  }
  if (indicator->lock_state + 1 > indicator->lock_state) {
    indicator->lock_state++;
  } else {
    OPENSSL_PUT_ERROR(CRYPTO, ERR_R_OVERFLOW);
  }
}
void FIPS_service_indicator_lock_state ( void ) { struct fips_service_indicator_state * indicator = FIPS_service_indicator_get ( ) ; if ( indicator == NULL ) { return ; } if ( indicator -> lock_state + 1 > indicator -> lock_state ) { indicator -> lock_state ++ ; } else { OPENSSL_PUT_ERROR ( CRYPTO , ERR_R_OVERFLOW ) ; } }
|FIPS_service_indicator_lock_state| and |FIPS_service_indicator_unlock_state|
should not under/overflow in normal operation.
|FIPS_service_indicator_lock_state| and |FIPS_service_indicator_unlock_state| should not under / overflow in normal operation .