lint: limit maximum length of input via scanf

This PR limits the maximum length of input via `scanf`-related functions to get rid of `cppcheck` warnings.
Rationale for the actual lengths is:
20 characters for `double` and `float` (double has about 15-17 decimal digits with full precision).
11 characters for `int` (10 digits for 32 Bit ints + for sign).
6 characters for `short` (5 digits + sign).