From 2a8416eaa85af6348fe34859859a7fb39db2003d Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Mon, 10 May 2021 15:05:25 +0200 Subject: save scan info and model, added vuln in load info, small tweaks create result directory with serialized info struct and model file after successful scan, dont modify the stl file contents during parsing, EOF getc vuln to truncate loaded hash added in load_info --- service/src/stlfile.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'service/src/stlfile.h') diff --git a/service/src/stlfile.h b/service/src/stlfile.h index e31a8c9..8a52ea9 100644 --- a/service/src/stlfile.h +++ b/service/src/stlfile.h @@ -38,15 +38,14 @@ struct stack { }; struct parseinfo { - char extra[80], hash[MHASHLEN+1]; + char header[80], *hash, *modelname; unsigned int loopcount; float bbmin[3], bbmax[3]; int type, valid; - char *infopath, *stlpath; }; int parse_file(struct parseinfo *info, char *buf, size_t len); -int save_info(struct parseinfo *info, const char *resultdir); +int save_info(struct parseinfo *info, FILE *f); void print_info(struct parseinfo *info); void free_info(struct parseinfo *info); -- cgit v1.2.3-71-gd317