Commit d82c2758 authored by Emilia Kasper's avatar Emilia Kasper
Browse files

Appease ubsan



ERR_LIB_USER has value 128, and shifting into the sign bit upsets the
shift sanitizer.

Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 6302bbd2
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -235,7 +235,7 @@ typedef struct err_state_st {
# define KDFerr(f,r) ERR_PUT_error(ERR_LIB_KDF,(f),(r),OPENSSL_FILE,OPENSSL_LINE)

# define ERR_PACK(l,f,r) \
    ( (((l) & 0x0FF) << 24L) | (((f) & 0xFFF) << 12L) | ((r) & 0xFFF) )
  ( ((unsigned int)((l) & 0x0FF) << 24L) | (((f) & 0xFFF) << 12L) | ((r) & 0xFFF) )
# define ERR_GET_LIB(l)          (int)((((unsigned long)l)>>24L)&0xffL)
# define ERR_GET_FUNC(l)         (int)((((unsigned long)l)>>12L)&0xfffL)
# define ERR_GET_REASON(l)       (int)((l)&0xfffL)