Explorar o código

Tweak to minimize buffer overflow possibility

raysan5 %!s(int64=3) %!d(string=hai) anos
pai
achega
7755cd0019
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/rcore.c

+ 1 - 1
src/rcore.c

@@ -2664,7 +2664,7 @@ void TakeScreenshot(const char *fileName)
     unsigned char *imgData = rlReadScreenPixels(CORE.Window.render.width, CORE.Window.render.height);
     Image image = { imgData, CORE.Window.render.width, CORE.Window.render.height, 1, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8 };
 
-    char path[512] = { 0 };
+    char path[2048] = { 0 };
     strcpy(path, TextFormat("%s/%s", CORE.Storage.basePath, fileName));
 
     ExportImage(image, path);