summaryrefslogtreecommitdiff
path: root/lib/element.c
diff options
context:
space:
mode:
authorDariusz Michaluk <d.michaluk@samsung.com>2018-06-15 11:13:40 +0200
committerDariusz Michaluk <d.michaluk@samsung.com>2018-06-15 11:13:40 +0200
commit6bbf67947844bb4a21fe68481c541c197086336f (patch)
tree39c54b827a0329234436d4c7a3651e82c6ed681e /lib/element.c
parent9ec7943e548cce0a73bdd3805933248fcb0ee67c (diff)
downloadlibtasn1-6bbf67947844bb4a21fe68481c541c197086336f.tar.gz
libtasn1-6bbf67947844bb4a21fe68481c541c197086336f.tar.bz2
libtasn1-6bbf67947844bb4a21fe68481c541c197086336f.zip
Imported Upstream version 4.10upstream/4.10
Diffstat (limited to 'lib/element.c')
-rw-r--r--lib/element.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/element.c b/lib/element.c
index b7a0905..756e41a 100644
--- a/lib/element.c
+++ b/lib/element.c
@@ -753,7 +753,8 @@ asn1_write_value (asn1_node node_root, const char *name,
* %ASN1_VALUE_NOT_FOUND if there isn't any value for the element
* selected, and %ASN1_MEM_ERROR if The value vector isn't big enough
* to store the result, and in this case @len will contain the number of
- * bytes needed.
+ * bytes needed. On the occasion that the stored data are of zero-length
+ * this function may return %ASN1_SUCCESS even if the provided @len is zero.
**/
int
asn1_read_value (asn1_node root, const char *name, void *ivalue, int *len)
@@ -826,7 +827,8 @@ asn1_read_value (asn1_node root, const char *name, void *ivalue, int *len)
* %ASN1_VALUE_NOT_FOUND if there isn't any value for the element
* selected, and %ASN1_MEM_ERROR if The value vector isn't big enough
* to store the result, and in this case @len will contain the number of
- * bytes needed.
+ * bytes needed. On the occasion that the stored data are of zero-length
+ * this function may return %ASN1_SUCCESS even if the provided @len is zero.
**/
int
asn1_read_value_type (asn1_node root, const char *name, void *ivalue,
@@ -932,7 +934,7 @@ asn1_read_value_type (asn1_node root, const char *name, void *ivalue,
{
*len = 0;
if (value)
- value[0] = 0;
+ value[0] = 0;
p = node->down;
while (p)
{