Check for NULL character before calling strchr.

  http://sourceware.org/ml/gdb-patches/2013-07/msg00322.html

gdb/ChangeLog

        * common/format.c (parse_format_string): Add checks for NULL
        character before calling strchr.

gdb/testsuite/ChangeLog

        * gdb.base/printcmds.exp (test_printf): Add tests for format
        strings with missing format specifier.