Overview
SHA1 Hash: | 091499ec1a4002f7e2860c5b10fb5628a3f8be39 |
---|---|
Date: | 2008-02-08 22:02:54 |
User: | stephan |
Comment: | minor buffer length fix for the previous change |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified src/zip.c from [59b74ad11d] to [cbdc2c703a].
@@ -304,23 +304,23 @@ ** buffer for the prefix + current file name. zHead keeps track ** of where we should write file names to this buffer. */ if( manifest_parse(&m, &mfile) ){ zip_set_timedate(m.rDate); - snprintf( zHead, bufsize, "manifest" ); + snprintf( zHead, bufsize-prxLen, "manifest" ); zip_add_file(aSBuf, &file); sha1sum_blob(&file, &hash); blob_reset(&file); blob_append(&hash, "\n", 1); - snprintf( zHead, bufsize, "manifest.uuid" ); + snprintf( zHead, bufsize-prxLen, "manifest.uuid" ); zip_add_file(aSBuf, &hash); blob_reset(&hash); for(i=0; i<m.nFile; i++){ int fid = uuid_to_rid(m.aFile[i].zUuid, 0); if( fid ){ content_get(fid, &file); - snprintf( zHead, bufsize, "%s", m.aFile[i].zName ); + snprintf( zHead, bufsize-prxLen, "%s", m.aFile[i].zName ); zip_add_file( aSBuf, &file); blob_reset(&file); } } manifest_clear(&m);