mirror of https://github.com/aria2/aria2
SessionSerializer crash when filename length is less than 3
parent
910e40f128
commit
f4469b79aa
|
@ -72,7 +72,7 @@ bool SessionSerializer::save(const std::string& filename) const
|
|||
{
|
||||
SharedHandle<BufferedFile> fp;
|
||||
#if HAVE_ZLIB
|
||||
if (filename.compare(filename.length() - 3, 3, ".gz") == 0) {
|
||||
if (util::endsWith(filename, ".gz")) {
|
||||
fp.reset(new GZipFile(tempFilename.c_str(), BufferedFile::WRITE));
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue