ObjFW  Diff

Differences From Artifact [20c9faa50f]:

  • File src/OFZIPArchive.m — part of check-in [be628bbb84] at 2013-11-06 20:58:10 on branch trunk — OFZIPArchive: Do not sort -[entries].

    While sorting -[entries] reduces hard disk seeks, it allows a denial of
    service by creating an archive with a huge central directory without
    actual files. As usually the order in the central directory matches the
    order of the actual files, this minor speed increase is not worth the
    attack vector. (user: js, size: 13808) [annotate] [blame] [check-ins using]

To Artifact [6bc862255c]:


176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
+ (instancetype)archiveWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}

- init
{
	@try {
		[self doesNotRecognizeSelector: _cmd];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	abort();
}

- initWithPath: (OFString*)path
{
	self = [super init];

	@try {







<
<
<
<
<
<
|
<







176
177
178
179
180
181
182






183

184
185
186
187
188
189
190
+ (instancetype)archiveWithPath: (OFString*)path
{
	return [[[self alloc] initWithPath: path] autorelease];
}

- init
{






	OF_INVALID_INIT_METHOD

}

- initWithPath: (OFString*)path
{
	self = [super init];

	@try {