From: jsteube Date: Fri, 3 Jun 2016 12:18:56 +0000 (+0200) Subject: Fix of invalid use of free() X-Git-Tag: v3.00~91 X-Git-Url: https://www.flypig.org.uk/git/?a=commitdiff_plain;h=02dd1f20ab198b7ef77223d3d05e07cc0b2187d7;p=hashcat.git Fix of invalid use of free() --- diff --git a/src/ext_OpenCL.c b/src/ext_OpenCL.c index 79eb656..d6fa486 100644 --- a/src/ext_OpenCL.c +++ b/src/ext_OpenCL.c @@ -397,8 +397,7 @@ cl_int hc_clBuildProgram (OCL_PTR *ocl, cl_program program, cl_uint num_devices, char *options_update = (char *) mymalloc (len + 1); - options_update = strncat (options_update, options, len - 1 - 15); - options_update = strncat (options_update, " -cl-opt-disable", 1 + 15); + snprintf (options_update, len, "%s -cl-opt-disable", options); if (data.quiet == 0) log_error ("\n=== Build failed, retry with optimization disabled ===\n");