Kir Kolyshkin
f655d600ba
container.BaseFS: check for nil before deref
...
Commit 7a7357dae1bccc ("LCOW: Implemented support for docker cp + build")
changed `container.BaseFS` from being a string (that could be empty but
can't lead to nil pointer dereference) to containerfs.ContainerFS,
which could be be `nil` and so nil dereference is at least theoretically
possible, which leads to panic (i.e. engine crashes).
Such a panic can be avoided by carefully analysing the source code in all
the places that dereference a variable, to make the variable can't be nil.
Practically, this analisys are impossible as code is constantly
evolving.
Still, we need to avoid panics and crashes. A good way to do so is to
explicitly check that a variable is non-nil, returning an error
otherwise. Even in case such a check looks absolutely redundant,
further changes to the code might make it useful, and having an
extra check is not a big price to pay to avoid a panic.
This commit adds such checks for all the places where it is not obvious
that container.BaseFS is not nil (which in this case means we do not
call daemon.Mount() a few lines earlier).
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com >
Upstream-commit: d6ea46cedaca0098c15843c5254a337d087f5cd6
Component: engine
2018-03-13 21:24:48 -07:00
..
2018-02-05 16:51:57 -05:00
2018-03-05 19:10:39 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-03-07 12:57:21 -08:00
2018-03-13 11:58:05 -04:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-03-07 15:18:51 -08:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-03-09 14:34:45 -08:00
2017-09-06 12:05:19 -04:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-09 11:24:09 -08:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:48:29 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-16 11:25:14 -05:00
2018-02-05 16:51:57 -05:00
2018-02-16 11:25:14 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-18 13:28:44 +00:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:48:29 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-15 15:58:20 -05:00
2018-02-15 15:58:20 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-14 11:59:18 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-14 11:59:18 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:48:29 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-21 18:26:16 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-03-13 21:24:43 -07:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-09 11:24:09 -08:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:48:29 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-19 11:19:19 +01:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-15 11:53:11 -05:00
2018-02-21 12:28:13 +01:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-27 08:48:31 -08:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-03-12 15:19:08 -04:00
2018-03-08 14:04:03 -08:00
2018-03-13 21:24:48 -07:00
2018-03-13 21:24:48 -07:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:48:29 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-26 16:49:37 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-07 14:27:09 -05:00
2018-02-07 14:27:09 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00
2018-02-15 12:57:25 +01:00
2018-02-15 12:57:25 +01:00
2018-02-05 16:51:57 -05:00
2018-02-05 16:51:57 -05:00