basic/hexdecoct: be more careful in overflow check
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Feb 2019 19:34:57 +0000 (20:34 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 16 Feb 2019 22:19:10 +0000 (23:19 +0100)
commit7321d504e61eb14cb951a0e493d327130499f9d3
treef0eb70fefc83b717b4b9397d6e632deaeabc5b9b
parent63eb09569aa90721be4accbea4b78421f3c1ba7c
basic/hexdecoct: be more careful in overflow check

CID #139583: plen + 1 is evaluated as int, and could in principle overflow.
So cast to ssize_t and add an additional check that our overflow calculation
doesn't overflow itself.
src/basic/hexdecoct.c