From 8c81df9ec1f51922da6c26ac3207597661cb5e42 Mon Sep 17 00:00:00 2001 From: stephengold Date: Mon, 13 Jan 2025 18:16:22 -0800 Subject: [PATCH] bugfix: heap corruption in ConvexHullShapeSettings.createSettings() --- src/main/native/glue/co/ConvexHullShapeSettings.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/native/glue/co/ConvexHullShapeSettings.cpp b/src/main/native/glue/co/ConvexHullShapeSettings.cpp index a20721f9..60e1e3b2 100644 --- a/src/main/native/glue/co/ConvexHullShapeSettings.cpp +++ b/src/main/native/glue/co/ConvexHullShapeSettings.cpp @@ -1,5 +1,5 @@ /* -Copyright (c) 2024 Stephen Gold +Copyright (c) 2024-2025 Stephen Gold Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -78,7 +78,7 @@ JNIEXPORT jlong JNICALL Java_com_github_stephengold_joltjni_ConvexHullShapeSetti pPoints, numPoints, maxConvexRadius, pMaterial); TRACE_NEW("ConvexHullShapeSettings", pResult) TRACE_DELETE("Vec3[]", pPoints) - delete pPoints; + delete[] pPoints; return reinterpret_cast (pResult); }