diff options
author | Simo Sorce <simo@redhat.com> | 2016-07-25 05:39:44 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2016-07-25 05:39:44 -0400 |
commit | bcb35bc4d7b592c577367e2c0fc7a3286a732e44 (patch) | |
tree | a65b55f95b8da7b9d405d69f7bfa3d456645f299 /asn1/asn1c/OCTET_STRING.c | |
parent | 826ee6a3fecab88b3d9cd95b4ce52f7befbe3914 (diff) | |
download | freeipa-coverity.tar.gz freeipa-coverity.tar.xz freeipa-coverity.zip |
Additional coverity fixes.coverity
This are manual fixes for patches submitted upstream, and should be
picked up once a new asn1c is available.
They will be overridden if the code is regenerated before then.
Signed-off-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'asn1/asn1c/OCTET_STRING.c')
-rw-r--r-- | asn1/asn1c/OCTET_STRING.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/asn1/asn1c/OCTET_STRING.c b/asn1/asn1c/OCTET_STRING.c index f2eec13aa..17bfa8e97 100644 --- a/asn1/asn1c/OCTET_STRING.c +++ b/asn1/asn1c/OCTET_STRING.c @@ -244,8 +244,8 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx, ber_tlv_tag_t expected_tag; ssize_t tl, ll, tlvl; /* This one works even if (sel->left == -1) */ - ssize_t Left = ((!sel||(size_t)sel->left >= size) - ?(ssize_t)size:sel->left); + size_t Left = ((!sel||(size_t)sel->left >= size) + ?size:(size_t)sel->left); ASN_DEBUG("%p, s->l=%ld, s->wn=%ld, s->g=%ld\n", sel, @@ -483,15 +483,6 @@ OCTET_STRING_decode_ber(asn_codec_ctx_t *opt_codec_ctx, break; } - if(sel) { - ASN_DEBUG("3sel p=%p, wn=%d, l=%ld, g=%ld, size=%ld", - sel->prev, sel->want_nulls, - (long)sel->left, (long)sel->got, (long)size); - if(sel->prev || sel->want_nulls > 1 || sel->left > 0) { - RETURN(RC_WMORE); - } - } - /* * BIT STRING-specific processing. */ |