1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-07-14 17:47:33 -05:00

Fixes spotted by Coverity.

A lenof() being applied to a non-array, a couple of missing frees on
an error path, and a case in pfd_receive() where we could have gone
round a loop again after freeing the port forwarding structure it was
working on.
This commit is contained in:
Simon Tatham
2017-06-20 21:17:43 +01:00
parent 4696f4a40b
commit d61897414c
3 changed files with 4 additions and 1 deletions

View File

@ -1005,7 +1005,7 @@ static void ttymodes_handler(union control *ctrl, void *dlg,
char type;
{
const char *types = "ANV";
const char types[] = {'A', 'N', 'V'};
int button = dlg_radiobutton_get(td->valradio, dlg);
assert(button >= 0 && button < lenof(types));
type = types[button];