ObjFW  Diff

Differences From Artifact [fa73f4a2f7]:

To Artifact [515019e2e6]:


57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
		id object;
		size_t objectLength;

		objectLength = parseObject(contents, &object, depthLimit);

		count -= objectLength;
		contents = [contents subdataWithRange:
		    OFRangeMake(objectLength, count)];

		[ret addObject: object];
	}

	[ret makeImmutable];

	return ret;







|







57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
		id object;
		size_t objectLength;

		objectLength = parseObject(contents, &object, depthLimit);

		count -= objectLength;
		contents = [contents subdataWithRange:
		    OFMakeRange(objectLength, count)];

		[ret addObject: object];
	}

	[ret makeImmutable];

	return ret;
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
	while (count > 0) {
		id object;
		size_t objectLength;
		OFData *objectData;

		objectLength = parseObject(contents, &object, depthLimit);
		objectData = [contents subdataWithRange:
		    OFRangeMake(0, objectLength)];

		if (previousObjectData != nil &&
		    [objectData compare: previousObjectData] !=
		    OFOrderedDescending)
			@throw [OFInvalidFormatException exception];

		count -= objectLength;
		contents = [contents subdataWithRange:
		    OFRangeMake(objectLength, count)];

		[ret addObject: object];

		previousObjectData = objectData;
	}

	[ret makeImmutable];







|








|







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
	while (count > 0) {
		id object;
		size_t objectLength;
		OFData *objectData;

		objectLength = parseObject(contents, &object, depthLimit);
		objectData = [contents subdataWithRange:
		    OFMakeRange(0, objectLength)];

		if (previousObjectData != nil &&
		    [objectData compare: previousObjectData] !=
		    OFOrderedDescending)
			@throw [OFInvalidFormatException exception];

		count -= objectLength;
		contents = [contents subdataWithRange:
		    OFMakeRange(objectLength, count)];

		[ret addObject: object];

		previousObjectData = objectData;
	}

	[ret makeImmutable];
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
			@throw [OFInvalidFormatException exception];
	}

	if (count - bytesConsumed < contentsLength)
		@throw [OFTruncatedDataException exception];

	contents = [self subdataWithRange:
	    OFRangeMake(bytesConsumed, contentsLength)];
	bytesConsumed += contentsLength;

	switch (tag & ~tagConstructedMask) {
	case OFASN1TagNumberBoolean:
		valueClass = [OFASN1Boolean class];
		break;
	case OFASN1TagNumberInteger:







|







151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
			@throw [OFInvalidFormatException exception];
	}

	if (count - bytesConsumed < contentsLength)
		@throw [OFTruncatedDataException exception];

	contents = [self subdataWithRange:
	    OFMakeRange(bytesConsumed, contentsLength)];
	bytesConsumed += contentsLength;

	switch (tag & ~tagConstructedMask) {
	case OFASN1TagNumberBoolean:
		valueClass = [OFASN1Boolean class];
		break;
	case OFASN1TagNumberInteger: