1
1

* man2hlp.c (main): Use fgets() return value in while loop instead of

feof() because end-of-file indicator can be false on error.
Этот коммит содержится в:
Andrew V. Samoilov 2003-01-15 16:27:17 +00:00
родитель 49b5356345
Коммит 1daab23a66
2 изменённых файлов: 6 добавлений и 7 удалений

Просмотреть файл

@ -1,12 +1,16 @@
2003-01-15 Andrew V. Samoilov <sav@bcs.zp.ua>
* man2hlp.c (main): Use fgets() return value in while loop
instead of feof() because end-of-file indicator can be false on
error.
* man2hlp.c (handle_command): Fix possible buffer overflow.
(handle_link): Likewise.
2002-12-27 Pavel Roskin <proski@gnu.org>
* layout.c (setup_panels): Revert unnecessary part of the
previous patch. Call load_hint regardless of message_visible.
previous patch. Call load_hint() regardless of message_visible.
Reported by Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
* key.c (correct_key_code): Don't call get_modifier() for normal

Просмотреть файл

@ -684,14 +684,9 @@ main (int argc, char **argv)
c_in = c_man;
/* Repeat for each input line */
while (!feof (f_man)) {
while (fgets (buffer, BUFFER_SIZE, f_man)) {
char *input_line; /* Input line without initial "\&" */
/* Read a line */
if (!fgets (buffer, BUFFER_SIZE, f_man)) {
break;
}
if (buffer[0] == '\\' && buffer[1] == '&')
input_line = buffer + 2;
else