Fixes segfault due to sscanf not size limited (redmine #2912)