diff options
author | scuri <scuri> | 2010-12-06 19:24:50 +0000 |
---|---|---|
committer | scuri <scuri> | 2010-12-06 19:24:50 +0000 |
commit | 5ea68c05f28050068fec17d82be7ebca97feeba7 (patch) | |
tree | 77fab9a36212409ca9045eae9f00906df2dee38e /src/x11 | |
parent | 38c6855890e912c9ff9ba64db53295df96d8f345 (diff) |
*** empty log message ***
Diffstat (limited to 'src/x11')
-rw-r--r-- | src/x11/cdxclp.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/x11/cdxclp.c b/src/x11/cdxclp.c index a2d1b6b..9363491 100644 --- a/src/x11/cdxclp.c +++ b/src/x11/cdxclp.c @@ -49,7 +49,7 @@ static void cdkillcanvas(cdCtxCanvas *ctxcanvas) static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void *data) { - char filename[1024]; + char filename[10240]; char* buffer; int dwSize; FILE* file; @@ -58,7 +58,9 @@ static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void if (!buffer) return CD_ERROR; - tmpnam(filename); + if (!cdStrTmpFileName(filename)) + return CD_ERROR; + file = fopen(filename, "w"); fwrite(buffer, dwSize, 1, file); fclose(file); @@ -74,7 +76,7 @@ static int cdplay(cdCanvas* canvas, int xmin, int xmax, int ymin, int ymax, void static void cdcreatecanvas(cdCanvas* canvas, void *data) { - char tmpPath[512]; + char tmpPath[10240]; char* str = (char*)data; Display* dpy = NULL; @@ -96,7 +98,8 @@ static void cdcreatecanvas(cdCanvas* canvas, void *data) return; str++; - tmpnam(tmpPath); + if (!cdStrTmpFileName(tmpPath)) + return; strcat(tmpPath, " "); strcat(tmpPath, str); |