misc: Validate the value on the use of strtol.
* g10/misc.c (string_to_cipher_algo): Use "long"-type variable to catch the result of strtol and validate the value. (string_to_aead_algo, string_to_digest_algo): Likewise.
- Reported-by: 8b79fe4dd0581c1cd000e1fbecba9f39e16a396a
- Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>