BACKPORT: _asn1_decode_simple_ber: restrict the levels of recursion to 3 05/179705/1
authorNikos Mavrogiannopoulos <nmav@redhat.com>
Thu, 4 Jan 2018 09:52:05 +0000 (10:52 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Mon, 21 May 2018 08:21:12 +0000 (10:21 +0200)
commit1701584f7841a79ae4e97699a8c4ac9f0a09c38f
tree1dc5c8ca01f36c5392de07468397f6388c456fdd
parent52e10d8471cd9e6572d85b4bf15e599bc60b3ce5
BACKPORT: _asn1_decode_simple_ber: restrict the levels of recursion to 3

On indefinite string decoding, setting a maximum level of recursions
protects the BER decoder from a stack exhaustion due to large amounts
of recursion.

Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
(cherry-picked from upstream c593ae84cfcde8fea45787e53950e0ac71e9ca97)

Change-Id: If3eb039487979b9639b42b314c3b0c89f18737fa
Signed-off-by: Tomasz Swierczek <t.swierczek@samsung.com>
lib/decoding.c