BACKPORT: asn1_find_node: added safety check on asn1_find_node() 18/134418/1 accepted/tizen/4.0/unified/20170816.011243 accepted/tizen/4.0/unified/20170828.222817 accepted/tizen/unified/20170620.174035 submit/tizen/20170616.143116 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100006
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 18 May 2017 16:03:34 +0000 (18:03 +0200)
committerRafal Krypa <r.krypa@samsung.com>
Fri, 16 Jun 2017 09:13:16 +0000 (11:13 +0200)
commitf81309a9a722c484b97ce32042f428d54c6d035b
treec3070edbea59aa65ce86ffe4fd695131a278f068
parente5c912938e2958fbeb7ee01183f0bc4e33143ead
BACKPORT: asn1_find_node: added safety check on asn1_find_node()

This prevents a stack overflow in asn1_find_node() which
is triggered by too long variable names in the definitions
files. That means that applications have to deliberately
pass a too long 'name' constant to asn1_write_value()
and friends.  Reported by Jakub Jirasek.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Signed-off-by: Rafal Krypa <r.krypa@samsung.com>
(cherry-picked from upstream 5520704d075802df25ce4ffccc010ba1641bd484)

Change-Id: I893834c68ede90cd5953289a2c207c79e2971b51
lib/parser_aux.c