diff options
author | hasso <hasso> | 2005-01-02 18:51:01 +0000 |
---|---|---|
committer | hasso <hasso> | 2005-01-02 18:51:01 +0000 |
commit | 22cf33d5ffc0cc4eefef694a3f766d2dac516658 (patch) | |
tree | 2b8bd5325ea31110bc95f6065a4238a8aa8c9368 | |
parent | 0582bc3c9e4446a61d3507c32c1c2e11820f7723 (diff) | |
download | quagga-22cf33d5ffc0cc4eefef694a3f766d2dac516658.tar.bz2 quagga-22cf33d5ffc0cc4eefef694a3f766d2dac516658.tar.xz |
Reverting some int -> unsigned int fixes in command.c for now. Fixes crash
described in [quagga-dev 2292].
-rw-r--r-- | lib/ChangeLog | 6 | ||||
-rw-r--r-- | lib/command.c | 8 |
2 files changed, 10 insertions, 4 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index 3af0d0b2..d50b8590 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,9 @@ +2005-01-02 Hasso Tepper <hasso at quagga.net> + + * command.c: Revert int -> unsigned int fixes in + cmd_describe_command_real() and cmd_complete_command_real(). index can + be actually negative and it caused crash with "do<TAB>" in vty. + 2004-12-29 Greg Troxel <gdt@poblano.ir.bbn.com> * sockopt.c (getsockopt_ipv4_ifindex): Document calling diff --git a/lib/command.c b/lib/command.c index 33e9c914..9136900c 100644 --- a/lib/command.c +++ b/lib/command.c @@ -1565,12 +1565,12 @@ cmd_try_do_shortcut (enum node_type node, char* first_word) { static vector cmd_describe_command_real (vector vline, struct vty *vty, int *status) { - unsigned int i; + int i; vector cmd_vector; #define INIT_MATCHVEC_SIZE 10 vector matchvec; struct cmd_element *cmd_element; - unsigned int index; + int index; int ret; enum match_type match; char *command; @@ -1761,12 +1761,12 @@ cmd_lcd (char **matched) static char ** cmd_complete_command_real (vector vline, struct vty *vty, int *status) { - unsigned int i; + int i; vector cmd_vector = vector_copy (cmd_node_vector (cmdvec, vty->node)); #define INIT_MATCHVEC_SIZE 10 vector matchvec; struct cmd_element *cmd_element; - unsigned int index = vector_max (vline) - 1; + int index = vector_max (vline) - 1; char **match_str; struct desc *desc; vector descvec; |