diff --git a/jtag/ChangeLog b/jtag/ChangeLog index 64647463..365c5890 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,7 @@ +2003-02-17 Marcel Telka + + * src/jtag.c (jtag_parse_line): Fixed segfault for 'set' command. + 2003-02-17 Marcel Telka * src/jtag.c (jtag_parse_line): Added new 'get signal' command. diff --git a/jtag/src/jtag.c b/jtag/src/jtag.c index ee7ca882..637f7f14 100644 --- a/jtag/src/jtag.c +++ b/jtag/src/jtag.c @@ -637,6 +637,10 @@ jtag_parse_line( char *line ) dir = (strcmp( t, "in" ) == 0) ? 0 : 1; if (dir) { t = get_token( NULL ); + if (!t) { + printf( "set: syntax error\n" ); + return 1; + } data = strtol( t, &t, 10 ); if (t && *t) { printf( "set: syntax error\n" );