Skip to content
Browse files

Fixed issue #2: Ensure errno is zero after a successful call to strto…

…ull()
  • Loading branch information...
1 parent 0661700 commit 1bb0dd56c269623e45985827db82f6bfe27b97ea @swisspol swisspol committed Feb 20, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 Core/HTTPConnection.m
View
1 Core/HTTPConnection.m
@@ -2220,6 +2220,7 @@ - (void)socket:(GCDAsyncSocket *)sock didReadData:(NSData*)data withTag:(long)ta
NSString *sizeLine = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
+ errno = 0; // Reset errno before calling strtoull() to ensure it is always zero on success
requestChunkSize = (UInt64)strtoull([sizeLine UTF8String], NULL, 16);
requestChunkSizeReceived = 0;

0 comments on commit 1bb0dd5

Please sign in to comment.
Something went wrong with that request. Please try again.