moby--moby/daemon/graphdriver
Oscar Bonilla c923f6ac3b Fix off-by-one bug
This is a fix for https://github.com/docker/for-linux/issues/1012.

The code was not considering that C strings are NULL-terminated so
we need to leave one extra byte.

Without this fix, the testcase in https://github.com/docker/for-linux/issues/1012
fails with

```
Step 61/1001 : RUN echo 60 > 60
 ---> Running in dde85ac3b1e3
Removing intermediate container dde85ac3b1e3
 ---> 80a12a18a241
Step 62/1001 : RUN echo 61 > 61
error creating overlay mount to /23456789112345678921234/overlay2/d368abcc97d6c6ebcf23fa71225e2011d095295d5d8c9b31d6810bea748bdf07-init/merged: no such file or directory
```

with the output of `dmesg -T` as:

```
[Sat Dec 19 02:35:40 2020] overlayfs: failed to resolve '/23456789112345678921234/overlay2/89e435a1b24583c463abb73e8abfad8bf8a88312ef8253455390c5fa0a765517-init/wor': -2
```

with this fix, you get the expected:

```
Step 126/1001 : RUN echo 125 > 125
 ---> Running in 2f2e56da89e0
max depth exceeded
```

Signed-off-by: Oscar Bonilla <6f6231@gmail.com>
2020-12-20 16:23:25 -08:00
..
aufs replace pkg/locker with github.com/moby/locker 2020-09-10 22:15:40 +02:00
btrfs Really switch to moby/sys/mount* 2020-03-20 09:46:25 -07:00
copy [DEL] remove useless assert 2020-11-09 23:38:45 +08:00
devmapper replace pkg/locker with github.com/moby/locker 2020-09-10 22:15:40 +02:00
fuse-overlayfs fuse-overlayfs: fix godoc 2020-12-16 19:21:03 +09:00
graphtest quota: move quota package out of graphdriver 2020-10-05 13:28:25 +00:00
lcow Remove refs to jhowardmsft from .go code 2019-09-25 10:51:18 -07:00
overlay replace pkg/locker with github.com/moby/locker 2020-09-10 22:15:40 +02:00
overlay2 Fix off-by-one bug 2020-12-20 16:23:25 -08:00
overlayutils new storage driver: fuse-overlayfs 2020-02-10 23:48:52 +09:00
register new storage driver: fuse-overlayfs 2020-02-10 23:48:52 +09:00
vfs quota: move quota package out of graphdriver 2020-10-05 13:28:25 +00:00
windows Revendor Microsoft/go-winio for 8gB file fix 2020-09-19 23:13:44 +10:00
zfs vendor: moby/sys mountinfo/v0.4.0 2020-10-29 23:02:28 +01:00
counter.go graphdriver: Fix RefCounter memory leak 2018-02-09 10:26:06 +08:00
driver.go daemon/graphdriver: normalize comment formatting 2019-11-27 15:43:23 +01:00
driver_freebsd.go Add canonical import comment 2018-02-05 16:51:57 -05:00
driver_linux.go Really switch to moby/sys/mount* 2020-03-20 09:46:25 -07:00
driver_test.go bump gotest.tools v3.0.1 for compatibility with Go 1.14 2020-02-11 00:06:42 +01:00
driver_unsupported.go Add canonical import comment 2018-02-05 16:51:57 -05:00
driver_windows.go Add canonical import comment 2018-02-05 16:51:57 -05:00
errors.go Add canonical import comment 2018-02-05 16:51:57 -05:00
fsdiff.go Add layer id to NaiveDiffDriver untar timing log 2018-10-05 16:28:40 -07:00
plugin.go goimports: fix imports 2019-09-18 12:56:54 +02:00
proxy.go Move plugin client creation to the extension point 2018-05-25 15:18:53 -04:00