You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the issue tracker for open issues that relate to the same problem, before opening a new one.
This issue only relates to a single bug. I will open new issues for any other problems.
Describe the bug
We used the Fuzz engine to modify some Test(TestInMemoryRepositoryListing) data, and then the following crash appeared. Although Test does not handle the error returned by (storage.ParseURI, storage.CanList(foo)), such a crash occurs when corrupt data is passed into the storage.List()
How to reproduce
The simplified test code is in Example code
Screenshots
CrashLog
panic: runtime error: index out of range [-1] [recovered]
panic: runtime error: index out of range [-1]
goroutine 19 [running]:
testing.tRunner.func1.2({0x6f8480, 0xc0001643d8})
/home/zjx/.local/go/src/testing/testing.go:1211 +0x24e
testing.tRunner.func1()
/home/zjx/.local/go/src/testing/testing.go:1214 +0x218
panic({0x6f8480, 0xc0001643d8})
/home/zjx/.local/go/src/runtime/panic.go:1038 +0x215
fyne.io/fyne/v2/internal/repository.(*InMemoryRepository).List(0xc000140180, {0x789360, 0xc00012c360})
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/internal/repository/memory.go:281 +0x330
fyne.io/fyne/v2/storage.List({0x789360, 0xc00012c360})
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/storage/uri.go:481 +0x58
fyne.io/fyne/v2/internal/repository.TestInMemoryRepositoryListing(0x0)
/home/zjx/workspace/gowork/src/purelib/crashConfirm/fyne/internal/repository/memory_test.go:334 +0x309
Example code
//part of the Test Codem:=NewInMemoryRepository("000")
repository.Register("dht", m)
m.Data["/foo"] = []byte{1, 2, 3}
m.Data["/foo/bar"] = []byte{1, 2, 3}
m.Data["/foo/baz/"] = []byte{1, 2, 3}
m.Data["/foo/baz/quux"] = []byte{1, 2, 3}
foo, _:=storage.ParseURI("dht:?00000")
canList, err:=storage.CanList(foo)
listing, err:=storage.List(foo)
Checklist
Describe the bug
We used the Fuzz engine to modify some Test(TestInMemoryRepositoryListing) data, and then the following crash appeared. Although Test does not handle the error returned by (storage.ParseURI, storage.CanList(foo)), such a crash occurs when corrupt data is passed into the storage.List()
How to reproduce
The simplified test code is in Example code
Screenshots
CrashLog
Example code
Fyne version
commit 638ae24 (HEAD -> master, origin/master, origin/HEAD)
Go compiler version
1.17.8
Operating system
Linux
Operating system version
OS: Linux r920 4.15.0-159-generic #167-Ubuntu
Additional Information
No response
The text was updated successfully, but these errors were encountered: