fix gcc12 warning about malloc size

Signed-off-by: Thomas E. Dickey <dickey@invisible-island.net>
7 jobs for gcc12-warnings in 1 minute and 26 seconds (queued for 2 seconds)