From 5c7e272190a3aeaab40c6810826043f66a9c792b Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 25 Aug 2014 16:21:24 -0700 Subject: 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 Reviewed-by: David Disseldorp --- source3/smbd/srvstr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/smbd/srvstr.c') 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; } -- cgit