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:
Jakub Jelen
2025-04-16 17:08:11 +02:00
parent bd10ec1162
commit 0bcd7d12d8

View File

@@ -416,6 +416,9 @@ static int ssh_retrieve_dhgroup_file(FILE *moduli,
do {
firstbyte = getc(moduli);
} while(firstbyte != '\n' && firstbyte != EOF);
if (firstbyte == EOF) {
break;
}
continue;
}
if (firstbyte == EOF) {
@@ -439,6 +442,9 @@ static int ssh_retrieve_dhgroup_file(FILE *moduli,
do {
firstbyte = getc(moduli);
} while(firstbyte != '\n' && firstbyte != EOF);
if (firstbyte == EOF) {
break;
}
continue;
}