* man2hlp.c (main): Use fgets() return value in while loop instead of
feof() because end-of-file indicator can be false on error.
Этот коммит содержится в:
родитель
49b5356345
Коммит
1daab23a66
@ -1,12 +1,16 @@
|
|||||||
2003-01-15 Andrew V. Samoilov <sav@bcs.zp.ua>
|
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.
|
* man2hlp.c (handle_command): Fix possible buffer overflow.
|
||||||
(handle_link): Likewise.
|
(handle_link): Likewise.
|
||||||
|
|
||||||
2002-12-27 Pavel Roskin <proski@gnu.org>
|
2002-12-27 Pavel Roskin <proski@gnu.org>
|
||||||
|
|
||||||
* layout.c (setup_panels): Revert unnecessary part of the
|
* 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>
|
Reported by Dmitry Semyonov <Dmitry.Semyonov@oktet.ru>
|
||||||
|
|
||||||
* key.c (correct_key_code): Don't call get_modifier() for normal
|
* 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;
|
c_in = c_man;
|
||||||
|
|
||||||
/* Repeat for each input line */
|
/* Repeat for each input line */
|
||||||
while (!feof (f_man)) {
|
while (fgets (buffer, BUFFER_SIZE, f_man)) {
|
||||||
char *input_line; /* Input line without initial "\&" */
|
char *input_line; /* Input line without initial "\&" */
|
||||||
|
|
||||||
/* Read a line */
|
|
||||||
if (!fgets (buffer, BUFFER_SIZE, f_man)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buffer[0] == '\\' && buffer[1] == '&')
|
if (buffer[0] == '\\' && buffer[1] == '&')
|
||||||
input_line = buffer + 2;
|
input_line = buffer + 2;
|
||||||
else
|
else
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user