yowcow / goromdb

Yet another single process KVS server implemented over file-based database
The Unlicense
12 stars 5 forks source link

Clone read []byte after retrieving from boltdb #84

Closed yowcow closed 6 years ago

yowcow commented 6 years ago

During file switching, []byte read from boltdb gets corrupted at the time of use.

To avoid this issue, clone read bytes into new []byte slice just after retrieving from boltdb.

yowcow commented 6 years ago

confirmed no recurrence