About firstheader error
typedef struct
{
int flags; // FH_FLAGS_*
int siginfo; // FH_SIG
int nsinst[3]; // FH_INT1,FH_INT2,FH_INT3
// these point to the header+sections+entries+stringtable in the datablock
int length_of_header;
// this specifies the length of all the data (including the firstheader and CRC)
int length_of_all_following_data;
} firstheader;
Look at this struct,the firstheader->length_of_all_following_data's value is the length of data.Suppose headerPosition's value is the offset that firstheader in the file and filesize's value is the installer file's size, usually we can get "filesize - headerPosition >= firstheader->length_of_all_following_data".In fact,more often like this "filesize - headerPosition = firstheader->length_of_all_following_data".But I get some installer is not like this,"filesize - headerPosition < firstheader->length_of_all_following_data",when this condition occur,we can't extract files us 7z.exe.
1.Who can give me a *.nsi file which can generate a installer and the installer generate condition like "filesize - headerPosition < firstheader->length_of_all_following_data" ?
2.Why this condition(filesize - headerPosition > firstheader->length_of_all_following_data) can occur? If it's a error or someone change the installer data when this condition occur?
3.If the installer does not check this condition?Even if this condition occur,the installer can work correct?
4.When I extract file from installer,if I can ignore this condition?In fact I can extract some file use 7z.exe when I ignore this condition(7z.exe will return S_FALSE when "filesize - headerPosition < firstheader->length_of_all_following_data",yes,it's abort).