Differences From:
File
src/zip.c
part of check-in
[90048e0b30]
- Add an "extended timestamp" field to generated ZIP archives. The extended
timestamp is in UTC so it does not mangle the time when the server and
client are in different timezones.
Ticket 28044ab5a42b75
by
drh on
2009-08-15 02:17:27.
[view]
To:
File
src/zip.c
part of check-in
[7a2c37063a]
- merge trunk into creole branch
by
bob on
2009-09-22 07:49:39.
Also file
src/zip.c
part of check-in
[5b91887495]
- Fix a memory allocation bug in the ZIP archive generator.
Ticket 8d6efe4f927
by
drh on
2009-08-15 13:21:45.
[view]
@@ -109,10 +109,10 @@
if( strcmp(zName, azDir[j])==0 ) break;
}
if( j>=nDir ){
nDir++;
- azDir = realloc(azDir, nDir);
- azDir[j] = sqlite3_mprintf("%s", zName);
+ azDir = realloc(azDir, sizeof(azDir[0])*nDir);
+ azDir[j] = mprintf("%s", zName);
zip_add_file(zName, 0);
}
zName[i+1] = c;
}
@@ -287,9 +287,9 @@
*pZip = body;
blob_zero(&body);
nEntry = 0;
for(i=0; i<nDir; i++){
- sqlite3_free(azDir[i]);
+ free(azDir[i]);
}
free(azDir);
nDir = 0;
azDir = 0;