equal
deleted
inserted
replaced
1 --- xdebug-2.1.3/usefulstuff.c_orig Thu Jan 26 01:48:14 2012 |
|
2 +++ xdebug-2.1.3/usefulstuff.c Thu Feb 9 15:33:34 2012 |
|
3 @@ -429,7 +429,6 @@ |
|
4 FILE *fh; |
|
5 struct stat buf; |
|
6 char *tmp_fname = NULL; |
|
7 - int filename_len = 0; |
|
8 |
|
9 /* We're not doing any tricks for append mode... as that has atomic writes |
|
10 * anyway. And we ignore read mode as well. */ |
|
11 @@ -437,14 +436,6 @@ |
|
12 return xdebug_open_file(fname, mode, extension, new_fname); |
|
13 } |
|
14 |
|
15 - /* Make sure we don't open a file with a path that's too long */ |
|
16 - filename_len += (fname ? strlen(fname) : 0); /* filename */ |
|
17 - filename_len += (extension ? strlen(extension) : 0) + 1; /* extension (+ ".") */ |
|
18 - filename_len += 8; /* possible random extension (+ ".") */ |
|
19 - if (filename_len > NAME_MAX) { |
|
20 - fname[NAME_MAX - (extension ? strlen(extension) : 0 )] = '\0'; |
|
21 - } |
|
22 - |
|
23 /* In write mode however we do have to do some stuff. */ |
|
24 /* 1. Check if the file exists */ |
|
25 if (extension) { |
|