# Cryptcheck: panic: runtime error: slice bounds out of range

**URL:** <https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977>\
**Category:** Suspected Bug\
**Created:** [September 23, 2023, 8:03pm UTC](https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977 "2023-09-23T20:03:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dansorod](https://forum.rclone.org/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@dansorod](https://forum.rclone.org/u/dansorod)\
**Post date:** [September 23, 2023, 8:03pm UTC](https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977/1 "2023-09-23T20:03:24Z")

</div>

#### What is the problem you are having with rclone?

I tried to run `rclone cryptcheck`, but a runtime error was thrown.

#### Run the command 'rclone version' and share the full output of the command.

```
rclone v1.64.0
- os/version: opensuse-tumbleweed (64 bit)
- os/kernel: 6.5.3-1-default (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.1
- go/linking: static
- go/tags: none

```

#### Which cloud storage system are you using? (eg Google Drive)

IDrive e2 (S3)

#### The command you were trying to run (eg `rclone copy /tmp remote:tmp`)

```auto
rclone cryptcheck "/run/media/.../dir1/dir2" idrivec:dir1/dir2

```

Previously, files were uploaded from and to the same path by using the following command, and it was done without errors:  
`rclone copy -P --server-side-across-configs --modify-window 1ms --multi-thread-streams 8 --no-traverse --transfers 8 --rc /run/media/.../dir1/dir2 idrivec:dir1/dir2`

(I know `--server-side-across-configs` is useless here, I just use it by default for when its suitable, I guess the same also applies to `--multi-thread-streams`)

#### The rclone config contents with secrets removed.

```auto
[idrive]
type = s3
provider = IDrive
access_key_id = *
secret_access_key = *
endpoint = *
no_check_bucket = true
chunk_size = 10Mi
upload_concurrency = 8
directory_markers = true

[idrivec]
type = crypt
remote = idrive:idrivec
password = *
password2 = *
filename_encoding = base32768

```

#### A log from the command with the `-vv` flag

```auto
2023/09/23 16:52:02 INFO : Using md5 for hash comparisons
panic: runtime error: slice bounds out of range [56:55]

goroutine 28 [running]:
github.com/rclone/rclone/backend/s3.(*Fs).list(0xc0008fc2c0, {0x27602a8?, 0x39741c0}, {{0xc00005e377, 0x7}, {0xc001cab880, 0x35}, {0xc00005e37f, 0x37}, 0x0, ...}, ...)
	github.com/rclone/rclone/backend/s3/s3.go:3807 +0x1650
github.com/rclone/rclone/backend/s3.(*Fs).listDir(0xc0008fc2c0, {0x27602a8?, 0x39741c0?}, {0xc00005e377, 0x7}, {0xc001cab880?, 0x0?}, {0xc00005e37f?, 0x1?}, 0x0)
	github.com/rclone/rclone/backend/s3/s3.go:3864 +0x1a5
github.com/rclone/rclone/backend/s3.(*Fs).List(0xc0008fc2c0, {0x27602a8, 0x39741c0}, {0x0?, 0xc0006ac050?})
	github.com/rclone/rclone/backend/s3/s3.go:3926 +0xad
github.com/rclone/rclone/backend/crypt.(*Fs).List(0xc000000e40, {0x27602a8, 0x39741c0}, {0x0?, 0xc000b87560?})
	github.com/rclone/rclone/backend/crypt/crypt.go:377 +0x70
github.com/rclone/rclone/fs/list.DirSorted({0x27602a8, 0x39741c0}, {0x27724b8?, 0xc000000e40}, 0x0, {0x0, 0x0})
	github.com/rclone/rclone/fs/list/list.go:24 +0x72
github.com/rclone/rclone/fs/march.(*March).makeListDir.func1({0x0, 0x0})
	github.com/rclone/rclone/fs/march/march.go:87 +0x8b
github.com/rclone/rclone/fs/march.(*March).processJob.func2()
	github.com/rclone/rclone/fs/march/march.go:403 +0x72
created by github.com/rclone/rclone/fs/march.(*March).processJob in goroutine 66
	github.com/rclone/rclone/fs/march/march.go:401 +0x319

```

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [September 24, 2023, 3:55pm UTC](https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977/2 "2023-09-24T15:55:15Z")

</div>

> [@dansorod](#):
>
> `panic: runtime error: slice bounds out of range [56:55]`

I can see the problem here. Annoyingly I can't replicate it so I'm going to need you to test it.

Can you give this a go please?

[v1.65.0-beta.7390.8e0ea44f6.fix-s3-list-crash](https://beta.rclone.org/branch/fix-s3-list-crash/v1.65.0-beta.7390.8e0ea44f6.fix-s3-list-crash/) on branch [fix-s3-list-crash](https://github.com/rclone/rclone/tree/fix-s3-list-crash) (uploaded in 15-30 mins)

---

<div class="post-metadata">

**Author:** ![dansorod](https://forum.rclone.org/letter_avatar_proxy/v4/letter/d/858c86/32.png) [@dansorod](https://forum.rclone.org/u/dansorod)\
**Post date:** [September 24, 2023, 5:18pm UTC](https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977/3 "2023-09-24T17:18:58Z")

</div>

Thank you, seems to have been fixed, the reported runtime error that affects v1.64.0 doesn't happen in this test build.

---

<div class="post-metadata">

**Author:** ![ncw](https://forum.rclone.org/user_avatar/forum.rclone.org/ncw/32/18_2.png) [@ncw](https://forum.rclone.org/u/ncw)\
**Post date:** [September 25, 2023, 10:52am UTC](https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977/4 "2023-09-25T10:52:55Z")

</div>

Thanks for testing.

I've merged this to master now which means it will be in [the latest beta](https://beta.rclone.org/) in 15-30 minutes and released in v1.64.1

---

<div class="post-metadata">

**Author:** ![system](https://forum.rclone.org/uploads/default/original/2X/3/39ad3235f6ffec76ccd0c81616bd55697b4c300d.png) [@system](https://forum.rclone.org/u/system)\
**Post date:** [September 28, 2023, 10:53am UTC](https://forum.rclone.org/t/cryptcheck-panic-runtime-error-slice-bounds-out-of-range/41977/5 "2023-09-28T10:53:10Z")

</div>

Closed on September 28, 2023, 10:53am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
