From 785cc6f3f3b5fe0deae4352dbbb2cfe76257f47d Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Mon, 10 Dec 2012 17:41:46 +0100 Subject: s3-rpcclient: Check return value of add_string_to_array(). Found by Coverity. Signed-off-by: Andreas Schneider Reviewed-by: Guenther Deschner --- source3/rpcclient/cmd_spoolss.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/rpcclient/cmd_spoolss.c b/source3/rpcclient/cmd_spoolss.c index c3ac21172e..52631849e0 100644 --- a/source3/rpcclient/cmd_spoolss.c +++ b/source3/rpcclient/cmd_spoolss.c @@ -1672,7 +1672,11 @@ static bool init_drv_info_3_members(TALLOC_CTX *mem_ctx, struct spoolss_AddDrive } while (str != NULL) { - add_string_to_array(deps, str, &file_array, &count); + bool ok; + ok = add_string_to_array(deps, str, &file_array, &count); + if (!ok) { + return false; + } str = strtok_r(NULL, ",", &saveptr); } -- cgit