diff --git a/jtag/ChangeLog b/jtag/ChangeLog index d655f935..f0ac4d49 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,8 @@ +2008-04-19 Kolja Waschk + + * src/cmd/frequency.c: ensure that cable is initialized. Fixes + [ 1933736 ] "frequency" command segfaults without args + 2008-04-19 Arnim Laeuger * src/bsdl/Makefile.am, src/svf/Makefile.am: ensure that diff --git a/jtag/src/cmd/frequency.c b/jtag/src/cmd/frequency.c index 23e9d7ee..e0a857c5 100644 --- a/jtag/src/cmd/frequency.c +++ b/jtag/src/cmd/frequency.c @@ -36,6 +36,9 @@ cmd_frequency_run( chain_t *chain, char *params[] ) { unsigned int freq; + if (!cmd_test_cable( chain )) + return 1; + if (cmd_params( params ) == 1) { printf( _("Current TCK frequency is %u Hz\n"), cable_get_frequency(chain->cable) ); return 1;