forked from TrueCloudLab/rclone
154e91bb23
The corruption was caused when the file was read to the end thus setting io.EOF and returning the buffers to the pool. Seek reset the EOF and carried on using the buffers that had been returned to the pool thus causing corruption when other goroutines claimed the buffers simultaneously. Fix by resetting the buffer pointers to nil when released and claiming new ones when seek resets EOF. Also added locking for Read and Seek which shouldn't be run concurrently. |
||
---|---|---|
.. | ||
pkcs7 | ||
cipher.go | ||
cipher_test.go | ||
crypt.go | ||
crypt2_test.go | ||
crypt_config_test.go | ||
crypt_test.go |