Fix runaway smbd now receive_smb_raw() returns a ssize_t not a BOOL.
authorjra <jra@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Wed, 16 May 2007 01:13:25 +0000 (01:13 +0000)
committerjra <jra@0c0555d6-39d7-0310-84fc-f1cc0bd64818>
Wed, 16 May 2007 01:13:25 +0000 (01:13 +0000)
Jeremy.

git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_3_0@22923 0c0555d6-39d7-0310-84fc-f1cc0bd64818

source/lib/util_sock.c

index 8f32e47bb8ef064ee96a7bbb3d1cae10910e1d87..d491fe7e4cc16a4eaaf23738b515dffd184767a8 100644 (file)
@@ -738,7 +738,7 @@ ssize_t receive_smb_raw(int fd, char *buffer, unsigned int timeout, size_t maxle
 
 BOOL receive_smb(int fd, char *buffer, unsigned int timeout)
 {
-       if (!receive_smb_raw(fd, buffer, timeout, 0)) {
+       if (receive_smb_raw(fd, buffer, timeout, 0) <= 0) {
                return False;
        }