summaryrefslogtreecommitdiffstats
path: root/source3/smbd/srvstr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2014-08-25 16:21:24 -0700
committerDavid Disseldorp <ddiss@samba.org>2014-09-16 01:56:54 +0200
commit5c7e272190a3aeaab40c6810826043f66a9c792b (patch)
treed1e00db0c6e161a2f951a214435eac20c4a52b27 /source3/smbd/srvstr.c
parent6bce3d81e146bc6adeb7cff124a78f818aa6fbe0 (diff)
downloadsamba-5c7e272190a3aeaab40c6810826043f66a9c792b.tar.gz
samba-5c7e272190a3aeaab40c6810826043f66a9c792b.tar.xz
samba-5c7e272190a3aeaab40c6810826043f66a9c792b.zip
s3: smbd: srvstr_push() was changed to never return -1, so don't check for that as an error.
Bug 10775 - smbd crashes when accessing garbage filenames https://bugzilla.samba.org/show_bug.cgi?id=10775 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
Diffstat (limited to 'source3/smbd/srvstr.c')
-rw-r--r--source3/smbd/srvstr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/srvstr.c b/source3/smbd/srvstr.c
index c069dd4a5e..648c69fbb7 100644
--- a/source3/smbd/srvstr.c
+++ b/source3/smbd/srvstr.c
@@ -65,7 +65,7 @@ ssize_t message_push_string(uint8 **outbuf, const char *str, int flags)
result = srvstr_push((char *)tmp, SVAL(tmp, smb_flg2),
tmp + buf_size, str, grow_size, flags);
- if (result == (size_t)-1) {
+ if (result == 0) {
DEBUG(0, ("srvstr_push failed\n"));
return -1;
}