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