landave
Joined 9 years ago
Joined 9 years ago
I wonder how hard it would be to take legal action (in particular to stop them from doing this altogether, as opposed to just taking down a single article). The site appears to be hosted in Russia[5]. From a quick glance over the Wikipedia page[6], it seems to me that Russian copyright law is quite similar to copyright law in most developed countries.
[1]: https://movaxbx.**/2018/06/05/f-secure-anti-virus-remote-cod...
[2]: https://movaxbx.**/2018/05/04/7-zip-from-uninitialized-memor...
[3]: https://movaxbx.**/2018/05/04/7-zip-multiple-memory-corrupti...
[4]: https://movaxbx.**/2018/05/04/bitdefender-heap-buffer-overfl...
However, F-Secure applies several patches to harden 7-Zip and to fix bugs that are not yet fixed in the public 7-Zip version. So it is not clear whether it is always such a good idea to do this.
If I recall correctly, Igor once said that he tested the new VS compiler and it produced neither smaller nor faster executables. I believe there was almost no difference.
[0]: https://landave.io/2018/01/7-zip-multiple-memory-corruptions...
Byte marker[NHeader::kMarkerSize];
RINOK(ReadStream_FALSE(stream, marker, NHeader::kMarkerSize));
if (memcmp(marker, kMarker, NHeader::kMarkerSize) == 0)
m_Position += NHeader::kMarkerSize;
else
{
if (searchHeaderSizeLimit && *searchHeaderSizeLimit == 0)
return S_FALSE;
RINOK(stream->Seek(m_StreamStartPosition, STREAM_SEEK_SET, NULL));
RINOK(FindSignatureInStream(stream, kMarker, NHeader::kMarkerSize,
searchHeaderSizeLimit, arcStartPos));
m_Position = arcStartPos + NHeader::kMarkerSize;
RINOK(stream->Seek(m_Position, STREAM_SEEK_SET, NULL));
}
7-Zip finds the magic number if it appears within some searchHeaderSizeLimit, i.e., the file does not need to start (at offset 0) with the magic number. For example, 7-Zip will extract a RAR file which begins with [00 52 61 72 21 1A 07 00] (instead of [52 61 72 21 1A 07 00]) just fine.If you really cannot avoid implementing something like this, you should inspect the 7-Zip code in order to be 100% sure that the magic number detection in your filter is identical (or matches a superset) to the one from 7-Zip.
But honestly, I don't think we will ever see a 7-Zip with /GS or CFG. Not only would this cost about 1% in binary size, it would cost an additional 1% in runtime performance loss. Additionally, it would require compiling 7-Zip with a modern compiler like VS2017. You're just asking for too much.
Feel free to send me an email to (λx. 'blog' x 'landave.io') '@'.
Please use this PGP key: https://pgp.mit.edu/pks/lookup?op=get&search=0x64632671BE1379F0
[ my public key: https://keybase.io/landave; my proof: https://keybase.io/landave/sigs/lDfwKttEOgywk1ebY0CnNqlXoEDKl9cYcfKYyh8VpGo ]