Files
moby/daemon
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
..
2020-12-15 14:45:05 -06:00
2020-11-05 16:18:23 +01:00
2020-12-20 16:23:25 -08:00
2018-04-23 13:52:44 -07:00
2019-10-17 23:49:43 +02:00
2019-10-17 23:49:43 +02:00
2019-06-07 11:54:45 +01:00
2019-08-29 07:44:39 +08:00
2020-04-21 16:29:27 +02:00
2020-07-24 20:44:29 +09:00
2019-06-07 11:54:45 +01:00
2019-09-18 12:56:54 +02:00
2019-09-18 12:56:54 +02:00
2020-07-28 12:41:14 +02:00
2018-09-21 09:43:06 +08:00
2020-09-09 18:23:27 +01:00
2019-09-18 12:56:54 +02:00
2019-09-18 12:56:54 +02:00
2019-09-18 12:56:54 +02:00
2018-04-23 13:52:44 -07:00