mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-06 18:29:47 +00:00
Initialize the num variable to avoid uninitialized data.
This fixes the bug introduced by r238378. Reviewed by: pfg
This commit is contained in:
parent
b01bf72b6e
commit
09e1da2f6c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=240982
@ -426,7 +426,7 @@ el_gets(EditLine *el, int *nread)
|
||||
char *cp = el->el_line.buffer;
|
||||
size_t idx;
|
||||
|
||||
while ((*el->el_read.read_char)(el, cp) == 1) {
|
||||
while ((num = (*el->el_read.read_char)(el, cp)) == 1) {
|
||||
/* make sure there is space for next character */
|
||||
if (cp + 1 >= el->el_line.limit) {
|
||||
idx = (cp - el->el_line.buffer);
|
||||
@ -479,7 +479,7 @@ el_gets(EditLine *el, int *nread)
|
||||
|
||||
term__flush(el);
|
||||
|
||||
while ((*el->el_read.read_char)(el, cp) == 1) {
|
||||
while ((num = (*el->el_read.read_char)(el, cp)) == 1) {
|
||||
/* make sure there is space next character */
|
||||
if (cp + 1 >= el->el_line.limit) {
|
||||
idx = (cp - el->el_line.buffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user