mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 23:00:58 +00:00
d297f9e032
When extracting a folder name from the byte slices used as database keys, bytes.IndexByte() is used to find and remove trailing 0 bytes. In case the folder name is 64 bytes long, bytes.IndexByte() returns -1. Before this change, syncthing crashed in this case with an out-of-bounds slice access. The commit fixes the problem and also introduces a test case which checks for the presence of the bug. |
||
---|---|---|
.. | ||
testdata | ||
debug.go | ||
filenames_darwin.go | ||
filenames_unix.go | ||
filenames_windows.go | ||
leveldb_test.go | ||
leveldb_xdr.go | ||
leveldb.go | ||
set_test.go | ||
set.go |