bugGNUstep - Bugs: bug #24995, NSURLProtocol uses wrong alloc...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #24995: NSURLProtocol uses wrong alloc prototype

Submitted by:  Fred Kiefer <FredKiefer>
Submitted on:  Wed 03 Dec 2008 07:45:52 AM UTC  
 
Category: Base/FoundationSeverity: 3 - Normal
Item Group: BugStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Thu 04 Dec 2008 10:42:34 AM UTC, comment #1:

Unused code ... development in progress...

Richard Frith-Macdonald <CaS>
Project Member
Wed 03 Dec 2008 07:45:52 AM UTC, original submission:

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.

Fred Kiefer <FredKiefer>
Project Member

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by CaS (Posted a comment)
  • -unavailable- added by FredKiefer (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 04 Dec 2008 10:42:34 AM UTCCaSStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1