mirror of https://github.com/aria2/aria2
Compare 16bytes of header text.
parent
8f93855bbd
commit
f6472abae8
|
@ -348,8 +348,7 @@ bool CookieStorage::load(const std::string& filename, time_t now)
|
|||
headlen = fp.read(header, sizeof(header));
|
||||
}
|
||||
try {
|
||||
if(headlen &&
|
||||
std::string(&header[0], &header[headlen-1]) == "SQLite format 3") {
|
||||
if(headlen == 16 && memcmp(header, "SQLite format 3\0", 16) == 0) {
|
||||
#ifdef HAVE_SQLITE3
|
||||
std::vector<Cookie> cookies;
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue