diff options
author | Andy Polyakov <appro@openssl.org> | 2005-09-20 20:25:17 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-09-20 20:25:17 +0000 |
commit | ed1f716022be3c28cecc485ecb608178455e4f94 (patch) | |
tree | 3cb8a5792cfd9b834fc882a2c86228b2536ee445 /crypto/o_str.c | |
parent | d3205a48981a1f534d5d6ba8042733ef9238da90 (diff) |
"Overload" SunOS 4.x memcmp, which ruins ASN1_OBJECT table lookups [from HEAD].
PR: 1196
Submitted by: Russel Ruby
Diffstat (limited to 'crypto/o_str.c')
-rw-r--r-- | crypto/o_str.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/crypto/o_str.c b/crypto/o_str.c index da8860491d..2db099333a 100644 --- a/crypto/o_str.c +++ b/crypto/o_str.c @@ -94,3 +94,12 @@ int OPENSSL_strcasecmp(const char *str1, const char *str2) #endif } +int OPENSSL_memcmp(const void *v1,const void *v2,size_t n) + { + const unsigned char *c1=v1,*c2=v2; + int ret=0; + + while(n && (ret=*c1-*c2)==0) n--,c1++,c2++; + + return ret; + } |