examples: Avoid overflow using calloc
examples: Avoid overflow using calloc

Instead of multiplying size of pointer per players, what
could lead to an overflow, use calloc passing the players
count.

Also check for result of atoi before cast.

Signed-off-by: Bruno Dilly <ea4fb6320c1221b6a559089d8ab97ffc53fc6586@intel.com>

solettaproject/soletta-machine-learning,anselmolsm/soletta-machine-learning,anselmolsm/soletta-machine-learning,anselmolsm/soletta-machine-learning,solettaproject/soletta-machine-learning,solettaproject/soletta-machine-learning