Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@google.com>2016-07-26 18:57:24 +0300
committerCQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>2016-07-26 23:01:37 +0300
commitabaef2e869fefcb0fac237bdf1b96c16ce8e290b (patch)
tree351efe11938feb62fa797111159cac05ca7c3673 /crypto
parentee2aea0d9b35178fe8c1e77e2a6faf0cefce9979 (diff)
Fix omitted selector handling.
The selector field could be omitted because it has a DEFAULT value. In this case *sfld == NULL (sfld can never be NULL). This was not noticed because this was never used in existing ASN.1 modules. (Imported from upstream's c4210673313482edacede58d92e92c213d7a181a.) svaldez and I stared at this for a while and we believe this change is correct. It's also irrelevant because our only remaining ADB (ANY DEFINED BY) table is POLICYQUALINFO which does not allow its selector to be omitted. Also, if it did, it would be a slight change in behavior. We'd switch from using POLICYQUALINFO's default_tt (filling in an ASN1_ANY) to its null_tt (which doesn't exist, so error). Change-Id: If6a929e3dafca18431775b01958d0dae1c09f3b4 Reviewed-on: https://boringssl-review.googlesource.com/8943 Reviewed-by: Adam Langley <agl@google.com> Commit-Queue: Adam Langley <agl@google.com> CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Diffstat (limited to 'crypto')
-rw-r--r--crypto/asn1/tasn_utl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/asn1/tasn_utl.c b/crypto/asn1/tasn_utl.c
index 960cdbb7..55037a18 100644
--- a/crypto/asn1/tasn_utl.c
+++ b/crypto/asn1/tasn_utl.c
@@ -222,7 +222,7 @@ const ASN1_TEMPLATE *asn1_do_adb(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt,
sfld = offset2ptr(*pval, adb->offset);
/* Check if NULL */
- if (!sfld) {
+ if (*sfld == NULL) {
if (!adb->null_tt) {
goto err;
}