Skip to content

gvariant: Optimise g_variant_print() for nested maybes

As with commit 9ae59bd6, deeply nested maybes in an array can be exploited by a malicious caller to cause a geometric increase in processing time and number of GVariant instances handled by the g_variant_print() code.

Optimise this by skipping recursing through most of the chain of maybes, thus avoiding all the setup checks in each recursive call.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

oss-fuzz#54577 Fixes: #2862 (closed)

Closes #2862 (closed)

Merge request reports