The Left variable should be a positive integer
The variable Left is supposed to hold only a positive quantity and was
being passed into functions that accept only size_t as input causing coverity
to throw a fit. Using a size_t type for Left works just fine.
Negative Returns, found by coverity.
diff --git a/skeletons/OCTET_STRING.c b/skeletons/OCTET_STRING.c
index a94f2d6..3e0f115 100644
--- a/skeletons/OCTET_STRING.c
+++ b/skeletons/OCTET_STRING.c
@@ -244,8 +244,8 @@
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,