Commit 6afb6e82 authored by Pau Espin Pedrol's avatar Pau Espin Pedrol Committed by Mouse

skeletons/aper_support: return proper value in aper_put_length->aper_put_nsnnwn path

aper_put_length is expected to return the length being written in other
code paths. In the nsnnwn path, it was returning only 0 or <0.
parent 2e6fdf62
...@@ -164,7 +164,7 @@ aper_put_length(asn_per_outp_t *po, int range, size_t length, int *need_eom) { ...@@ -164,7 +164,7 @@ aper_put_length(asn_per_outp_t *po, int range, size_t length, int *need_eom) {
/* 10.9 X.691 Note 2 */ /* 10.9 X.691 Note 2 */
if (range < 65536 && range >= 0) if (range < 65536 && range >= 0)
return aper_put_nsnnwn(po, range, length); return aper_put_nsnnwn(po, range, length) ? -1 : (ssize_t)length;
if (aper_put_align(po) < 0) if (aper_put_align(po) < 0)
return -1; return -1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment