From f1285b65d59119b71c7c4f98dddcf2d6969922be Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Tue, 11 May 2021 00:34:07 +0200 Subject: made docker setup more stable + small fixes --- service/src/stlfile.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'service/src/stlfile.c') 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 */ -- cgit v1.2.3-71-gd317