Code Review
/
o-du
/
l2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "[Epic-ID: ODUHIGH-462][Task-ID: ODUHIGH-482] G release documentation"
[o-du/l2.git]
/
src
/
codec_utils
/
common
/
OCTET_STRING.c
diff --git
a/src/codec_utils/common/OCTET_STRING.c
b/src/codec_utils/common/OCTET_STRING.c
old mode 100755
(executable)
new mode 100644
(file)
index
432ce5a
..
628a5d6
--- a/
src/codec_utils/common/OCTET_STRING.c
+++ b/
src/codec_utils/common/OCTET_STRING.c
@@
-157,7
+157,7
@@
OS__add_stack_el(struct _stack *st) {
nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el));
if(nel == NULL)
return NULL;
nel = (struct _stack_el *)CALLOC(1, sizeof(struct _stack_el));
if(nel == NULL)
return NULL;
-
+
if(st->tail) {
/* Increase a subcontainment depth */
nel->cont_level = st->tail->cont_level + 1;
if(st->tail) {
/* Increase a subcontainment depth */
nel->cont_level = st->tail->cont_level + 1;
@@
-745,7
+745,7
@@
OCTET_STRING__handle_control_chars(void *struct_ptr, const void *chunk_buf, size
return 0;
}
}
return 0;
}
}
-
+
return -1; /* No, it's not */
}
return -1; /* No, it's not */
}
@@
-1802,7
+1802,7
@@
OCTET_STRING_decode_aper(const asn_codec_ctx_t *opt_codec_ctx,
(long)csiz->effective_bits, (long)raw_len,
repeat ? "repeat" : "once", td->name);
(long)csiz->effective_bits, (long)raw_len,
repeat ? "repeat" : "once", td->name);
- if (
raw_len > 2) { /* X.691 #16 NOTE
1 */
+ if (
(st->size > 2) || (csiz->lower_bound != csiz->upper_bound)) { /* X.691 #16.1
1 */
if (aper_get_align(pd) < 0)
RETURN(RC_FAIL);
}
if (aper_get_align(pd) < 0)
RETURN(RC_FAIL);
}
@@
-1956,7
+1956,9
@@
OCTET_STRING_encode_aper(const asn_TYPE_descriptor_t *td,
ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound);
if(ret) ASN__ENCODE_FAILED;
}
ret = aper_put_length(po, csiz->upper_bound - csiz->lower_bound + 1, sizeinunits - csiz->lower_bound);
if(ret) ASN__ENCODE_FAILED;
}
- if (st->size > 2) { /* X.691 #16 NOTE 1 */
+ /* EB MOD
+ AFAIU if lb != ub it is aligned whatever the number of bits */
+ if ((st->size > 2) || (csiz->lower_bound != csiz->upper_bound)) { /* X.691 #16.11 */
if (aper_put_align(po) < 0)
ASN__ENCODE_FAILED;
}
if (aper_put_align(po) < 0)
ASN__ENCODE_FAILED;
}