ObjFW  Diff

Differences From Artifact [d67222c86c]:

To Artifact [a71d96fcc8]:


107
108
109
110
111
112
113
114






115
116
117
118
119
120
121
107
108
109
110
111
112
113

114
115
116
117
118
119
120
121
122
123
124
125
126







-
+
+
+
+
+
+







	contentLength = [headers objectForKey: @"Content-Length"];
	if (contentLength != nil) {
		_hasContentLength = true;

		@try {
			intmax_t toRead = [contentLength decimalValue];

			if (toRead > SIZE_MAX)
			if (toRead < 0)
				@throw [OFInvalidServerReplyException
				    exception];

			if (sizeof(intmax_t) > sizeof(size_t) &&
			    toRead > (intmax_t)SIZE_MAX)
				@throw [OFOutOfRangeException exception];

			_toRead = (size_t)toRead;
		} @catch (OFInvalidFormatException *e) {
			@throw [OFInvalidServerReplyException exception];
		}
	}