Fix calling conventions for external libraries (mingw doesn't handle it alone); Fix...
[hashcat.git] / src / ext_OpenCL.c
index 79eb656..becf484 100644 (file)
@@ -129,7 +129,7 @@ int ocl_init (OCL_PTR *ocl)
   HC_LOAD_FUNC(ocl, clSetKernelArg, OCL_CLSETKERNELARG, OpenCL, 1)
   HC_LOAD_FUNC(ocl, clWaitForEvents, OCL_CLWAITFOREVENTS, OpenCL, 1)
   HC_LOAD_FUNC(ocl, clGetEventProfilingInfo, OCL_CLGETEVENTPROFILINGINFO, OpenCL, 1)
-  HC_LOAD_FUNC(ocl, clReleaseEvent, CLRELEASEEVENT, OpenCL, 1)
+  HC_LOAD_FUNC(ocl, clReleaseEvent, OCL_CLRELEASEEVENT, OpenCL, 1)
 
   return 0;
 }
@@ -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");