summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-19 17:43:28 -0800
committerJeremy Allison <jra@samba.org>2007-11-19 17:43:28 -0800
commitcae4c742a896c6adb02b3e7a3c091d02aebb7339 (patch)
tree18c7367a32cb1f011d1b7694a00f8624907d6dbf /source3/smbd
parent428e663100fa2c009b16941e2a390587fdfc00b5 (diff)
downloadsamba-cae4c742a896c6adb02b3e7a3c091d02aebb7339.tar.gz
samba-cae4c742a896c6adb02b3e7a3c091d02aebb7339.tar.bz2
samba-cae4c742a896c6adb02b3e7a3c091d02aebb7339.zip
Always check return from push_ascii.
Jeremy. (This used to be commit 9c3d10521e691169cfbb8b728f123911c3c970ae)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/lanman.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 4bd59a7aa6..b2e435e97f 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -112,6 +112,9 @@ static int CopyExpanded(connection_struct *conn,
return 0;
}
l = push_ascii(*dst,buf,*p_space_remaining, STR_TERMINATE);
+ if (l == -1) {
+ return 0;
+ }
(*dst) += l;
(*p_space_remaining) -= l;
return l;
@@ -124,6 +127,9 @@ static int CopyAndAdvance(char **dst, char *src, int *n)
return 0;
}
l = push_ascii(*dst,src,*n, STR_TERMINATE);
+ if (l == -1) {
+ return 0;
+ }
(*dst) += l;
(*n) -= l;
return l;