schiff

Estimate the radiative properties of soft particless
git clone git://git.meso-star.com/schiff.git
Log | Files | Refs | README | LICENSE

commit 900a99d42cbd78861a10a3698aac0de8c08a5296
parent 045f481d02b694fc64747d4aea61628ddfa946b2
Author: Vincent Forest <vincent.forest@meso-star.com>
Date:   Tue, 24 Nov 2015 11:13:41 +0100

Fix an issue in the parsing of the supershape distribution

An empty supershape description leads to memory corruptions.

Diffstat:
Msrc/schiff_args.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/schiff_args.c b/src/schiff_args.c @@ -390,13 +390,14 @@ parse_super_formula(const char* str, struct schiff_param formula[6]) char* tk_ctx = NULL; int i; res_T res = RES_OK; - ASSERT(str && formula); + ASSERT(formula); str_init(&mem_default_allocator, &buf); if(!str) { fprintf(stderr, "Missing super formula.\n"); res = RES_BAD_ARG; + goto error; } res = str_set(&buf, str);