summaryrefslogtreecommitdiffstats
path: root/asn1/asn1c/NativeEnumerated.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2016-07-25 05:20:06 -0400
committerMartin Basti <mbasti@redhat.com>2016-08-16 12:33:27 +0200
commit512aa90bec108a1d523ac5868342c68892f2c4cb (patch)
tree9730aeb851d682445ccd38b0986e484fb0000338 /asn1/asn1c/NativeEnumerated.c
parent58d28b741022d06d7050db66997fd5d527b99bc1 (diff)
downloadfreeipa-512aa90bec108a1d523ac5868342c68892f2c4cb.tar.gz
freeipa-512aa90bec108a1d523ac5868342c68892f2c4cb.tar.xz
freeipa-512aa90bec108a1d523ac5868342c68892f2c4cb.zip
Regenerate asn1 code
Regenerate the code with asn1c 0.9.27, this allows us to pick up a few fixes for problems identified by coverity as well as other general bugfixes. Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-By: Martin Basti <mbasti@redhat.com>
Diffstat (limited to 'asn1/asn1c/NativeEnumerated.c')
-rw-r--r--asn1/asn1c/NativeEnumerated.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/asn1/asn1c/NativeEnumerated.c b/asn1/asn1c/NativeEnumerated.c
index e3af1ca49..1554220f8 100644
--- a/asn1/asn1c/NativeEnumerated.c
+++ b/asn1/asn1c/NativeEnumerated.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2004 Lev Walkin <vlm@lionet.info>. All rights reserved.
+ * Copyright (c) 2004, 2007 Lev Walkin <vlm@lionet.info>. All rights reserved.
* Redistribution and modifications are permitted subject to BSD license.
*/
/*
@@ -177,9 +177,9 @@ NativeEnumerated_encode_uper(asn_TYPE_descriptor_t *td,
inext = 1;
}
if(ct->flags & APC_EXTENSIBLE) {
- if(per_put_few_bits(po, inext, 0))
+ if(per_put_few_bits(po, inext, 1))
_ASN_ENCODE_FAILED;
- ct = 0;
+ if(inext) ct = 0;
} else if(inext) {
_ASN_ENCODE_FAILED;
}
@@ -196,7 +196,10 @@ NativeEnumerated_encode_uper(asn_TYPE_descriptor_t *td,
/*
* X.691, #10.6: normally small non-negative whole number;
*/
- if(uper_put_nsnnwn(po, value - (specs->extension - 1)))
+ ASN_DEBUG("value = %ld, ext = %d, inext = %d, res = %ld",
+ value, specs->extension, inext,
+ value - (inext ? (specs->extension - 1) : 0));
+ if(uper_put_nsnnwn(po, value - (inext ? (specs->extension - 1) : 0)))
_ASN_ENCODE_FAILED;
_ASN_ENCODED_OK(er);