bug-gnustep
[Top][All Lists]
Advanced

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

[bug #24995] NSURLProtocol uses wrong alloc prototype


From: Fred Kiefer
Subject: [bug #24995] NSURLProtocol uses wrong alloc prototype
Date: Wed, 03 Dec 2008 07:45:54 +0000
User-agent: Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.9 (like Gecko) SUSE

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

                 Summary: NSURLProtocol uses wrong alloc prototype
                 Project: GNUstep
            Submitted by: FredKiefer
            Submitted on: Mi 03 Dez 2008 07:45:52 GMT
                Category: Base/Foundation
                Severity: 3 - Normal
              Item Group: Bug
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

When compiling base I get this warning:

NSURLProtocol.m: In function ‘-[_NSHTTPURLProtocol _got:]’:
NSURLProtocol.m:740: warning: assignment from incompatible pointer type


Looking into the code I see that this line asigns the zalloc function for the
libz. in libz.h (version 1.2.3, July 18th, 2005) the prototype for this
function looks like this:

typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));


and the function we declare to be used is
static void*
zalloc(void *opaque, size_t size)


Clearly there is a mismatch and even a dangerous one, as we might allocate
the wrong amount of data due to this mismatch.




    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.gnu.org/





reply via email to

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