Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.251
 
1.252
 
MAIN:plunky:20120907093204
 
cc.c
_>13451345 char *
 13461346 gettmp(void)
 13471347 {
<>1348 -#define BUFFSIZE 1000
13491348         DWORD pathSize;
<>1350 -        char pathBuffer[BUFFSIZE];
  1349+        char pathBuffer[MAX_PATH + 1];
13511350         char tempFilename[MAX_PATH];
 13521351         UINT uniqueNum;
 13531352 
<>1354 -        pathSize = GetTempPath(BUFFSIZE, pathBuffer);
 1355 -        if (pathSize < BUFFSIZE)
 1356 -                pathBuffer[pathSize] = 0;
 1357 -        else
 1358 -                pathBuffer[0] = 0;
  1353+        pathSize = GetTempPath(sizeof(pathBuffer), pathBuffer);
  1354+        if (pathSize == 0 || pathSize > sizeof(pathBuffer))
  1355+                pathBuffer[0] = '\0';
13591356         uniqueNum = GetTempFileName(pathBuffer, "ctm", 0, tempFilename);
<>1360 -        if (uniqueNum == 0) {
 1361 -                fprintf(stderr, "%s:\n", pathBuffer);
 1362 -                exit(8);
 1363 -        }
  1357+        if (uniqueNum == 0)
  1358+                errorx(8, "GetTempFileName failed: path \"%s\"", pathBuffer);
  1359+
<_13641360         return xstrdup(tempFilename);
 13651361 }
 13661362 
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-11-01 11:57 +0100