]> git.ipfire.org Git - thirdparty/lxc.git/commit
fix integer overflow in setproctitle
authorTycho Andersen <tycho.andersen@canonical.com>
Mon, 13 Apr 2015 20:35:03 +0000 (14:35 -0600)
committerStéphane Graber <stgraber@ubuntu.com>
Mon, 13 Apr 2015 21:51:12 +0000 (16:51 -0500)
commit70642c33073faa6e44e34278633e5f00f4aaf618
treee54498f5d3d6e4a82ba4e350991aa37f7f5f9b54
parent62e041610609c8913c3d397a521716819a91f850
fix integer overflow in setproctitle

1. don't cast to long
2. check overflow before addition

v2: just remove the cast, don't change the type of the variables

Reported-by: Coverity
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/utils.c