summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Robert C. Helling <helling@atdotde.de>2019-11-15 11:14:34 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-11-16 12:34:30 -0800
commitc2d5de207d5bc840087da8fd72fcb8a83493148c (patch)
tree0ea7f78cd65266d04cd774436d8738707c02b26b
parent08cb521cf26d2a0140ea3ad9b4dbd97dc4884347 (diff)
downloadsubsurface-c2d5de207d5bc840087da8fd72fcb8a83493148c.tar.gz
Check if all required bytes were read
Fixes CID 350077 Signed-off-by: Robert C. Helling <helling@atdotde.de>
-rw-r--r--core/uemis-downloader.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/uemis-downloader.c b/core/uemis-downloader.c
index 18aa2451b..2d208087e 100644
--- a/core/uemis-downloader.c
+++ b/core/uemis-downloader.c
@@ -603,7 +603,7 @@ static bool uemis_get_answer(const char *path, char *request, int n_param_in,
free(ans_path);
return false;
}
- if (read(ans_file, tmp, 100) < 0) {
+ if (read(ans_file, tmp, 100) < 3) {
free(ans_path);
close(ans_file);
return false;