file contains a stack based buffer overflow when parsing a
specially crafted input file.
The issue lets an attacker overwrite a fixed 20 bytes stack buffer
with a specially crafted .notes section in an ELF binary file.
- Always reset state in {file,buffer}_apprentice
- pickier parsing of numeric values in magic files.
- PR/615 add magic_getflags()
Signed-off-by: Pierre-Yves <pyu@riseup.net>