summaryrefslogtreecommitdiff
path: root/source3/rpc_parse
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-06-19 23:21:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:18:50 -0500
commit0f256c31c0cc906218d06eb9bdda4e937fd5587e (patch)
tree30ec75ed2eedb49e0d9f2f162dc5d058df00d999 /source3/rpc_parse
parent0c88eedbeba3da627e712021a2811b01f323c16e (diff)
downloadsamba-0f256c31c0cc906218d06eb9bdda4e937fd5587e.tar.gz
samba-0f256c31c0cc906218d06eb9bdda4e937fd5587e.tar.bz2
samba-0f256c31c0cc906218d06eb9bdda4e937fd5587e.zip
r16377: Klocwork #1077.
Jeremy. (This used to be commit 72709a8465caf5b7d95911250234f203b0ff4675)
Diffstat (limited to 'source3/rpc_parse')
-rw-r--r--source3/rpc_parse/parse_spoolss.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_spoolss.c b/source3/rpc_parse/parse_spoolss.c
index ec2d6b8430..692a8c6ddf 100644
--- a/source3/rpc_parse/parse_spoolss.c
+++ b/source3/rpc_parse/parse_spoolss.c
@@ -5005,11 +5005,16 @@ static BOOL uniarray_2_dosarray(BUFFER5 *buf5, fstring **ar)
rpcstr_pull(f, src, sizeof(f)-1, -1, STR_TERMINATE);
src = skip_unibuf(src, 2*buf5->buf_len - PTR_DIFF(src,buf5->buffer));
*ar = SMB_REALLOC_ARRAY(*ar, fstring, n+2);
- if (!*ar)
+ if (!*ar) {
return False;
+ }
fstrcpy((*ar)[n], f);
n++;
}
+ if (!*ar) {
+ return False;
+ }
+
fstrcpy((*ar)[n], "");
return True;