[fix] Do not use strtol on unterminated strings