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));
|
headlen = fp.read(header, sizeof(header));
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
if(headlen &&
|
if(headlen == 16 && memcmp(header, "SQLite format 3\0", 16) == 0) {
|
||||||
std::string(&header[0], &header[headlen-1]) == "SQLite format 3") {
|
|
||||||
#ifdef HAVE_SQLITE3
|
#ifdef HAVE_SQLITE3
|
||||||
std::vector<Cookie> cookies;
|
std::vector<Cookie> cookies;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue