s3-utils: Correctly handle getenv() for the later system() call.
commitf670cae69d85a8bfc14ab7d9cd38ab0e568e6929
authorAndreas Schneider <asn@samba.org>
Mon, 10 Dec 2012 13:06:32 +0000 (10 14:06 +0100)
committerGünther Deschner <gd@samba.org>
Wed, 12 Dec 2012 14:00:02 +0000 (12 15:00 +0100)
treee6c84ab48043c9d53ae11e69b096fa016a1e9ad3
parent34a18865d6d2acd05e93fc728510896e69449d79
s3-utils: Correctly handle getenv() for the later system() call.

The returned string of getenv() has an unknown size. You need to store
the result always in a char array with a certain size to make sure we
don't feed tainted data to the next function call.

Found by Coverity.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Günther Deschner <gd@samba.org>
source3/utils/interact.c