wpa_cli: fix readline history cleaning
authorEygene Ryabinkin <rea-fbsd@codelabs.ru>
Mon, 5 Jan 2009 18:48:45 +0000 (20:48 +0200)
committerJouni Malinen <j@w1.fi>
Mon, 5 Jan 2009 18:48:45 +0000 (20:48 +0200)
commit413653e839dcd9f51e9a900943acb135eec79f20
tree6495736dab2a62bd2de5fac01b4c3ca9ef889938
parent7ee6258f7c1fd5a92fa1f60ad5605640aac28c45
wpa_cli: fix readline history cleaning

First of all, the history had not been written to the disk, since almost
all commands were cleaned up due to the error in the history cleaning:
the return value of the last os_strncasecmp() call was not compared to
zero, but was rather used as is.  So the condition was almost always
true and most commands were removed from the history.

The second problem was that the evaluation of the potentially sensitive
commands was started at the entry number 1, instead of very first entry.
wpa_supplicant/wpa_cli.c