projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix 0 -> NULL, indentation
[oweals/openssl.git]
/
crypto
/
asn1
/
a_int.c
diff --git
a/crypto/asn1/a_int.c
b/crypto/asn1/a_int.c
index 36248df92d8a8301f5286dd086ac07385022ab3e..c40c7faed2cf8f6c2d727d83cf2301f9b0f29a07 100644
(file)
--- a/
crypto/asn1/a_int.c
+++ b/
crypto/asn1/a_int.c
@@
-289,7
+289,7
@@
static int asn1_get_int64(int64_t *pr, const unsigned char *b, size_t blen,
ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL);
return 0;
}
ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_SMALL);
return 0;
}
- *pr =
-(
int64_t)r;
+ *pr =
0 - (u
int64_t)r;
} else {
if (r > INT64_MAX) {
ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_LARGE);
} else {
if (r > INT64_MAX) {
ASN1err(ASN1_F_ASN1_GET_INT64, ASN1_R_TOO_LARGE);
@@
-522,7
+522,7
@@
static BIGNUM *asn1_string_to_bn(const ASN1_INTEGER *ai, BIGNUM *bn,
}
ret = BN_bin2bn(ai->data, ai->length, bn);
}
ret = BN_bin2bn(ai->data, ai->length, bn);
- if (ret ==
0
) {
+ if (ret ==
NULL
) {
ASN1err(ASN1_F_ASN1_STRING_TO_BN, ASN1_R_BN_LIB);
return NULL;
}
ASN1err(ASN1_F_ASN1_STRING_TO_BN, ASN1_R_BN_LIB);
return NULL;
}