]> git.ipfire.org Git - thirdparty/lxc.git/commit
utils: defensive programming
author2xsec <dh48.jeong@samsung.com>
Tue, 4 Sep 2018 02:10:18 +0000 (11:10 +0900)
committer2xsec <dh48.jeong@samsung.com>
Tue, 4 Sep 2018 02:10:18 +0000 (11:10 +0900)
commit91d9cab6dea7bbe93bf3a990b225c8fc8a45c39b
tree27d1640569c90193a6e03e43bf1e4585fd718029
parent22b67bfa969b2d7f6f3f757e7401b1cc47302725
utils: defensive programming

If caller passed the size of array not string length, it is possible to be accessed out of bounds.

Reorder conditions can prevent access invalid index of array.

Signed-off-by: 2xsec <dh48.jeong@samsung.com>
src/lxc/utils.c