1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-03 11:12:13 +00:00
freebsd-ports/games/race/files/patch-textures.c
Ying-Chieh Liao 3bb20e0eac fix buffer overflow problem
PR:		40832
Submitted by:	Edwin Groothuis <edwin@mavetju.org>
2002-07-21 16:48:56 +00:00

15 lines
484 B
C

--- src/textures.c.orig Fri Mar 8 01:44:46 2002
+++ src/textures.c Sun Jul 21 21:14:50 2002
@@ -33,9 +33,9 @@
int loadtexture(char *dir, char *file, int filter, int repeat, int id){
SDL_Surface *image;
- char location[6+strlen(dir)+strlen(file)];
+ char location[60+strlen(dir)+strlen(file)];
- sprintf(location,"data/%s/%s",dir,file);
+ sprintf(location,"%%DATADIR%%/data/%s/%s",dir,file);
if((image = IMG_Load(location))){
glGenTextures(1, &texture[id]);