From 7b32e09e2b3dd952f92f70170da35722d012ce16 Mon Sep 17 00:00:00 2001 From: orbisai0security Date: Tue, 26 May 2026 09:45:58 +0000 Subject: [PATCH] fix: V-003 security vulnerability Automated security fix generated by OrbisAI Security --- dxt_compress/dxt_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dxt_compress/dxt_encoder.c b/dxt_compress/dxt_encoder.c index 54b60e0f7..e5b234932 100644 --- a/dxt_compress/dxt_encoder.c +++ b/dxt_compress/dxt_encoder.c @@ -676,7 +676,7 @@ dxt_encoder_compress_texture(struct dxt_encoder* encoder, int texture, unsigned GL_READ_ONLY_ARB); if(ptr) { - memcpy(image_compressed, ptr, ((encoder->width + 3) / 4 * 4) * ((encoder->height + 3) / 4 * 4) / (encoder->type == DXT_TYPE_DXT5_YCOCG ? 1 : 2)); + memcpy(image_compressed, ptr, (size_t)((encoder->width + 3) / 4 * 4) * ((encoder->height + 3) / 4 * 4) / (encoder->type == DXT_TYPE_DXT5_YCOCG ? 1 : 2)); glUnmapBufferARB(GL_PIXEL_PACK_BUFFER_ARB); }