projects
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4979108
)
Use memcmp() instead of CRYPTO_memcmp() when fuzzing
author
Kurt Roeckx
<kurt@roeckx.be>
Tue, 14 Feb 2017 23:36:46 +0000
(
00:36
+0100)
committer
Kurt Roeckx
<kurt@roeckx.be>
Sun, 19 Mar 2017 13:34:07 +0000
(14:34 +0100)
Reviewed-by: Andy Polyakov <appro@openssl.org>
GH: #2633
crypto/cryptlib.c
patch
|
blob
|
history
e_os.h
patch
|
blob
|
history
diff --git
a/crypto/cryptlib.c
b/crypto/cryptlib.c
index 71a5c35974e66add8ec9769fa588ee9ce16c76e7..3151e1a8844c313e0387338825c13311d1088f28 100644
(file)
--- a/
crypto/cryptlib.c
+++ b/
crypto/cryptlib.c
@@
-321,6
+321,7
@@
void OPENSSL_die(const char *message, const char *file, int line)
*
* There are also assembler versions of this function.
*/
+# undef CRYPTO_memcmp
int CRYPTO_memcmp(const void * in_a, const void * in_b, size_t len)
{
size_t i;
diff --git
a/e_os.h
b/e_os.h
index eafa8623aabe4ca009c254353636e0310d2add36..d2f4d3ff286a2655df5c4ba037f9727abab24468 100644
(file)
--- a/
e_os.h
+++ b/
e_os.h
@@
-513,6
+513,10
@@
struct servent *getservbyname(const char *name, const char *proto);
#define OSSL_NELEM(x) (sizeof(x)/sizeof(x[0]))
+#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
+# define CRYPTO_memcmp memcmp
+#endif
+
#ifdef __cplusplus
}
#endif