Ignore:
Timestamp:
07/28/11 21:51:30 (13 years ago)
Author:
r2d
Message:

Security fixes by DEATH (and some changes by myself)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libmpc/trunk/libmpcdec/internal.h

    r436 r473  
    8787 * checks if a block key is valid
    8888 * @param key the two caracters key to check
    89  * @return MPC_STATUS_INVALIDSV if the key is invalid, MPC_STATUS_OK else
     89 * @return MPC_STATUS_FAIL if the key is invalid, MPC_STATUS_OK else
    9090 */
    9191static mpc_inline mpc_status mpc_check_key(char * key)
    9292{
    9393        if (key[0] < 65 || key[0] > 90 || key[1] < 65 || key[1] > 90)
    94                 return MPC_STATUS_INVALIDSV;
     94                return MPC_STATUS_FAIL;
    9595        return MPC_STATUS_OK;
    9696}
     
    101101void mpc_decoder_synthese_filter_float(mpc_decoder *d, MPC_SAMPLE_FORMAT* OutData, mpc_int_t channels);
    102102
     103#define MPC_IS_FAILURE(X) ((int)(X) < (int)MPC_STATUS_OK)
     104#define MPC_AUTO_FAIL(X) { mpc_status s = (X); if (MPC_IS_FAILURE(s)) return s; }
     105
     106
    103107#ifdef __cplusplus
    104108}
Note: See TracChangeset for help on using the changeset viewer.