mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
dh-gex: Avoid reading the EOF stream
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <norbertpocs0@gmail.com>
This commit is contained in:
@@ -416,6 +416,9 @@ static int ssh_retrieve_dhgroup_file(FILE *moduli,
|
|||||||
do {
|
do {
|
||||||
firstbyte = getc(moduli);
|
firstbyte = getc(moduli);
|
||||||
} while(firstbyte != '\n' && firstbyte != EOF);
|
} while(firstbyte != '\n' && firstbyte != EOF);
|
||||||
|
if (firstbyte == EOF) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (firstbyte == EOF) {
|
if (firstbyte == EOF) {
|
||||||
@@ -439,6 +442,9 @@ static int ssh_retrieve_dhgroup_file(FILE *moduli,
|
|||||||
do {
|
do {
|
||||||
firstbyte = getc(moduli);
|
firstbyte = getc(moduli);
|
||||||
} while(firstbyte != '\n' && firstbyte != EOF);
|
} while(firstbyte != '\n' && firstbyte != EOF);
|
||||||
|
if (firstbyte == EOF) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user