aboutsummaryrefslogtreecommitdiffstats
path: root/service/src/stlfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'service/src/stlfile.c')
-rw-r--r--service/src/stlfile.c7
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 */