mirror of
https://github.com/syncthing/syncthing.git
synced 2024-11-16 18:41:59 -07: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. |
||
---|---|---|
.. | ||
auto | ||
beacon | ||
config | ||
discover | ||
events | ||
files | ||
fnmatch | ||
ignore | ||
lamport | ||
logger | ||
luhn | ||
model | ||
osutil | ||
protocol | ||
scanner | ||
stats | ||
upgrade | ||
upnp | ||
versioner |