bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #37939] NSNetService simple boolean logic bug


From: Marcus Müller
Subject: [bug #37939] NSNetService simple boolean logic bug
Date: Sun, 16 Dec 2012 20:51:55 +0000
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.17 (KHTML, like Gecko) Version/6.0.2 Safari/536.26.17

URL:
  <http://savannah.gnu.org/bugs/?37939>

                 Summary: NSNetService simple boolean logic bug
                 Project: GNUstep
            Submitted by: znek
            Submitted on: Sun 16 Dec 2012 08:51:54 PM GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

-[NSNetService getInputStream:outputStream] accidentaly fails if either
inputStream or outputStream pointer parameters are NULL (which is legal for
either one).

The fix is simple:


Index: Source/NSNetServices.m
===================================================================
--- Source/NSNetServices.m      (revision 35898)
+++ Source/NSNetServices.m      (working copy)
@@ -281,7 +281,7 @@
                  inputStream: inputStream
                 outputStream: outputStream];
   
-  return inputStream && outputStream;
+  return inputStream || outputStream;
 }
 
 /*





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?37939>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]