openssl/crypto
Kurt Roeckx 1618679ac4 Cast to an unsigned type before negating
llvm's ubsan reported:
runtime error: negation of -9223372036854775808 cannot be represented in type
'long'; cast to an unsigned type to negate this value to itself

Found using afl

Reviewed-by: Rich Salz <rsalz@openssl.org>
GH: #1325
2016-07-20 19:25:16 +02:00
..
aes Fix a few if(, for(, while( inside code. 2016-07-20 07:21:53 -04:00
asn1 Cast to an unsigned type before negating 2016-07-20 19:25:16 +02:00
async Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
bf Remove/rename some old files. 2016-06-01 11:29:57 -04:00
bio Cast to an unsigned type before negating 2016-07-20 19:25:16 +02:00
blake2 Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
bn Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
buffer Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
camellia Missed some copyright merge 2016-06-13 16:05:25 -04:00
cast Remove/rename some old files. 2016-06-01 11:29:57 -04:00
chacha s390x assembly pack: improve portability. 2016-06-06 11:08:04 +02:00
cmac Copyright consolidation 06/10 2016-05-17 14:51:04 -04:00
cms Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
comp Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
conf Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
ct Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
des SPARC assembly pack: enforce V8+ ABI constraints. 2016-07-01 14:25:08 +02:00
dh Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
dsa Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
dso Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
ec Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
engine Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
err Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
evp Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
hmac Teach EVP_PKEY_HMAC keys how to EVP_PKEY_cmp() 2016-06-24 12:31:31 -04:00
idea Remove/rename some old files. 2016-06-01 11:29:57 -04:00
include/internal Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
kdf Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
lhash fix code formatting 2016-07-01 10:56:19 -04:00
md2 Convert memset calls to OPENSSL_cleanse 2016-06-30 15:51:57 +01:00
md4 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
md5 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
mdc2 Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
modes SPARC assembly pack: enforce V8+ ABI constraints. 2016-07-01 14:25:08 +02:00
objects Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
ocsp Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
pem Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
perlasm crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes. 2016-07-15 13:20:52 +02:00
pkcs7 Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
pkcs12 Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
poly1305 SPARC assembly pack: enforce V8+ ABI constraints. 2016-07-01 14:25:38 +02:00
rand Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
rc2 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
rc4 x86_64 assembly pack: tolerate spaces in source directory name. 2016-05-29 14:12:51 +02:00
rc5 Remove/rename some old files. 2016-06-01 11:29:57 -04:00
ripemd Copyright consolidation 08/10 2016-05-17 14:51:34 -04:00
rsa Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
seed Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
sha Remove/rename some old files. 2016-06-01 11:29:57 -04:00
srp check return values for EVP_Digest*() APIs 2016-07-15 14:09:05 +01:00
stack Constify a bit more OPENSSL_sk_ API 2016-06-30 12:58:21 -04:00
ts Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
txt_db Rename lh_xxx,sk_xxx tp OPENSSL_{LH,SK}_xxx 2016-05-20 10:48:29 -04:00
ui Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
whrlpool Convert memset calls to OPENSSL_cleanse 2016-06-30 15:51:57 +01:00
x509 Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
x509v3 Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
alphacpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
arm64cpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
arm_arch.h Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
armcap.c Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
armv4cpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
build.info Move OS-specific fopen quirks to o_fopen.c. 2016-06-22 21:51:53 +02:00
c64xpluscpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
cpt_err.c Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
cryptlib.c crypto/cryptlib.c: omit OPENSSL_ia32cap_loc(). 2016-06-22 20:20:37 +02:00
cversion.c Copyright consolidation 08/10 2016-05-17 14:51:34 -04:00
dllmain.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
ebcdic.c Copyright consolidation 05/10 2016-05-17 15:38:09 -04:00
ex_data.c Change all our uses of CRYPTO_THREAD_run_once to use RUN_ONCE instead 2016-07-19 23:49:54 +02:00
ia64cpuid.S Add final(?) set of copyrights. 2016-06-01 11:27:25 -04:00
init.c Check for errors allocating the error strings. 2016-07-20 19:20:53 +02:00
LPdir_nyi.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
LPdir_unix.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
LPdir_vms.c Copyright consolidation 05/10 2016-05-17 15:38:09 -04:00
LPdir_win.c Fix mingw build 2016-07-18 10:47:07 +01:00
LPdir_win32.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
LPdir_wince.c Remove the silly CVS markers from LPdir_*.c 2016-07-16 07:58:23 +02:00
mem.c Convert memset calls to OPENSSL_cleanse 2016-06-30 15:51:57 +01:00
mem_clr.c Copyright consolidation 06/10 2016-05-17 14:51:04 -04:00
mem_dbg.c fix crypto-mdebug build 2016-07-20 12:41:31 +01:00
mem_sec.c Copyright consolidation 06/10 2016-05-17 14:51:04 -04:00
o_dir.c Copyright consolidation 05/10 2016-05-17 15:38:09 -04:00
o_fips.c Copyright consolidation 04/10 2016-05-17 14:24:46 -04:00
o_fopen.c Fix a few if(, for(, while( inside code. 2016-07-20 07:21:53 -04:00
o_init.c Copyright consolidation 08/10 2016-05-17 14:51:34 -04:00
o_str.c buf2hexstr: properly deal with empty string 2016-06-21 20:55:54 +02:00
o_time.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
pariscid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
ppc_arch.h GH919: Fix wrappers for two headers 2016-05-24 11:04:38 -04:00
ppccap.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
ppccpuid.pl Add assembly CRYPTO_memcmp. 2016-05-19 22:33:00 +02:00
s390xcap.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
s390xcpuid.S s390x assembly pack: improve portability. 2016-06-06 11:08:04 +02:00
sparc_arch.h Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
sparccpuid.S Add final(?) set of copyrights. 2016-06-01 11:27:25 -04:00
sparcv9cap.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
threads_none.c Copyright consolidation 04/10 2016-05-17 14:24:46 -04:00
threads_pthread.c Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
threads_win.c include/openssl: don't include <windows.h> in public headers. 2016-07-08 11:49:44 +02:00
uid.c Copyright consolidation 07/10 2016-05-17 14:51:26 -04:00
vms_rms.h Copyright consolidation 09/10 2016-05-17 14:53:16 -04:00
x86_64cpuid.pl crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes. 2016-07-15 13:20:52 +02:00
x86cpuid.pl crypto/x86[_64]cpuid.pl: add OPENSSL_ia32_rd[rand|seed]_bytes. 2016-07-15 13:20:52 +02:00