summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-12-10 17:41:46 +0100
committerGünther Deschner <gd@samba.org>2012-12-12 09:42:32 +0100
commit785cc6f3f3b5fe0deae4352dbbb2cfe76257f47d (patch)
treeb72057c3eed58d63c713bfa20afae67277c50d19
parentff32391808322029a8d6caa9fdf1a4d253d9b1ff (diff)
downloadsamba-785cc6f3f3b5fe0deae4352dbbb2cfe76257f47d.tar.gz
samba-785cc6f3f3b5fe0deae4352dbbb2cfe76257f47d.tar.bz2
samba-785cc6f3f3b5fe0deae4352dbbb2cfe76257f47d.zip
s3-rpcclient: Check return value of add_string_to_array().
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
-rw-r--r--source3/rpcclient/cmd_spoolss.c6
1 files changed, 5 insertions, 1 deletions
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);
}