ObjFW  Diff

Differences From Artifact [2d02abe498]:

To Artifact [949fef07b2]:


503
504
505
506
507
508
509




510
511

512
513
514
515
516
517
518
		} @catch (OFInvalidFormatException *e) {
			return [self sendErrorAndClose: 400];
		}

		if (contentLength > 0) {
			char *buffer;





			buffer = [self allocMemoryWithSize: BUFFER_SIZE];
			_body = [[OFMutableData alloc] init];


			[_socket asyncReadIntoBuffer: buffer
					      length: BUFFER_SIZE
					      target: self
					    selector: @selector(socket:
							  didReadIntoBuffer:
							  length:context:







>
>
>
>


>







503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
		} @catch (OFInvalidFormatException *e) {
			return [self sendErrorAndClose: 400];
		}

		if (contentLength > 0) {
			char *buffer;

			if (contentLength < 0 ||
			    (uintmax_t)contentLength > SIZE_MAX)
				@throw [OFOutOfRangeException exception];

			buffer = [self allocMemoryWithSize: BUFFER_SIZE];
			_body = [[OFMutableData alloc] init];
			_contentLength = contentLength;

			[_socket asyncReadIntoBuffer: buffer
					      length: BUFFER_SIZE
					      target: self
					    selector: @selector(socket:
							  didReadIntoBuffer:
							  length:context: