SQLite Forum

Bug report: reachable assertion in zipfile module
Login

Bug report: reachable assertion in zipfile module

(1) By Zu-Ming Jiang (jiang446079653) on 2021-04-22 12:52:04 [link]

Hello,

I used my fuzzing tool to test sqlite of latest version, and found a reachable assertion in zipfile module.

Test command:

```c

rm test.db; ./sqlite3 test.db < fuzz.sql
````
Here is the output:

```c
sqlite3: ../shell.c:6660: zipfileMtimeToDos: Assertion `mUnixTime<315507600 || mUnixTime==zipfileMtime(pCds) || ((mUnixTime % 2) && mUnixTime-1==zipfileMtime(pCds))' failed.
Aborted
````
Here is the content of the simplified fuzz.sql, which can also trigger the assertion:

```c
select zipfile(0,0,9223372036854775808,0);
```

(2) By ThanksRyan on 2021-04-22 16:23:59 in reply to 1

Looks like it was fixed:

<https://www.sqlite.org/src/info/c8de5f061359c174>

(3) By Zu-Ming Jiang (jiang446079653) on 2021-04-23 11:38:16 in reply to 2 [link]

Thanks for your confirming