Fossil SCM
In the Win32 server code, prevent fclose() from being called on an already closed FILE.
Commit
8d60cd571922d0f90b7b0b5fd3c155eba0d3e21dd99d6381452b8c8589b01a15
Parent
7ce35a048d450a7…
1 file changed
+1
+1
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -199,10 +199,11 @@ | ||
| 199 | 199 | } |
| 200 | 200 | out = fossil_fopen(zCmdFName, "wb"); |
| 201 | 201 | if( out==0 ) goto end_request; |
| 202 | 202 | fwrite(zCmd, 1, strlen(zCmd), out); |
| 203 | 203 | fclose(out); |
| 204 | + out = 0; | |
| 204 | 205 | |
| 205 | 206 | sqlite3_snprintf(sizeof(zCmd), zCmd, "\"%s\" http -args \"%s\" --nossl%s", |
| 206 | 207 | g.nameOfExe, zCmdFName, p->zOptions |
| 207 | 208 | ); |
| 208 | 209 | fossil_system(zCmd); |
| 209 | 210 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -199,10 +199,11 @@ | |
| 199 | } |
| 200 | out = fossil_fopen(zCmdFName, "wb"); |
| 201 | if( out==0 ) goto end_request; |
| 202 | fwrite(zCmd, 1, strlen(zCmd), out); |
| 203 | fclose(out); |
| 204 | |
| 205 | sqlite3_snprintf(sizeof(zCmd), zCmd, "\"%s\" http -args \"%s\" --nossl%s", |
| 206 | g.nameOfExe, zCmdFName, p->zOptions |
| 207 | ); |
| 208 | fossil_system(zCmd); |
| 209 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -199,10 +199,11 @@ | |
| 199 | } |
| 200 | out = fossil_fopen(zCmdFName, "wb"); |
| 201 | if( out==0 ) goto end_request; |
| 202 | fwrite(zCmd, 1, strlen(zCmd), out); |
| 203 | fclose(out); |
| 204 | out = 0; |
| 205 | |
| 206 | sqlite3_snprintf(sizeof(zCmd), zCmd, "\"%s\" http -args \"%s\" --nossl%s", |
| 207 | g.nameOfExe, zCmdFName, p->zOptions |
| 208 | ); |
| 209 | fossil_system(zCmd); |
| 210 |