diff options
| author | Louis Burda <quent.burda@gmail.com> | 2021-05-11 00:34:07 +0200 |
|---|---|---|
| committer | Louis Burda <quent.burda@gmail.com> | 2021-05-11 00:34:07 +0200 |
| commit | f1285b65d59119b71c7c4f98dddcf2d6969922be (patch) | |
| tree | 9cc6bc37cfcb188ce9b22b21b5a45f641d9f1bd6 /service/src/stlfile.c | |
| parent | 15340585cb82677623c6b680c7b6f26040e044cd (diff) | |
| download | enowars5-service-stldoctor-f1285b65d59119b71c7c4f98dddcf2d6969922be.tar.gz enowars5-service-stldoctor-f1285b65d59119b71c7c4f98dddcf2d6969922be.zip | |
made docker setup more stable + small fixes
Diffstat (limited to 'service/src/stlfile.c')
| -rw-r--r-- | service/src/stlfile.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/service/src/stlfile.c b/service/src/stlfile.c index 95d3a07..72868f8 100644 --- a/service/src/stlfile.c +++ b/service/src/stlfile.c @@ -254,10 +254,13 @@ parse_file(struct parseinfo *info, char *buf, size_t len) const char *tmp; char *bp; - if (len < 7) return FAIL; - if (info->valid) free_info(info); + if (len < 7) { + fprintf(stderr, "File too small!\n"); + return FAIL; + } + for (bp = buf; strchr(wsset, *bp); bp++); /* check bin vs ascii with first keyword */ |
