[glib-2-86] gbase64: Use gsize to prevent potential overflow
Both g_base64_encode_step() and g_base64_encode_close() return gsize values, but these are summed to an int value.
If the sum of these returned values is bigger than MAXINT, we overflow while doing the null byte write.
Spotted by treeplus. Thanks to the Sovereign Tech Resilience programme from the Sovereign Tech Agency.
ID: #YWH-PGM9867-168 Closes: #3870 (closed)
(cherry picked from commit 6845f777)
Co-authored-by: Marco Trevisan (Treviño) mail@3v1n0.net
Backport of !4978 (merged)
Edited by Marco Trevisan