ObjFW  Diff

Differences From Artifact [321e6d1503]:

To Artifact [471313a18b]:

  • File src/OFZIPArchive.h — 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: 2461) [annotate] [blame] [check-ins using]


60
61
62
63
64
65
66
67
68
69

70
71
72
73
74
75
76
 */
- initWithPath: (OFString*)path;

/*!
 * @brief Returns the entries of the central directory of the archive as an
 * 	  array of objects of class @ref OFZIPArchiveEntry.
 *
 * The array is sorted by the offset of the local file header, smallest offset
 * to largest offset. This way, hard disk seeks are minimized when the array is
 * enumerated to extract all files of the archive.

 *
 * @return The entries of the central directory of the archive as an array
 */
- (OFArray*)entries;

/*!
 * @brief Returns the archive comment.







<
|
|
>







60
61
62
63
64
65
66

67
68
69
70
71
72
73
74
75
76
 */
- initWithPath: (OFString*)path;

/*!
 * @brief Returns the entries of the central directory of the archive as an
 * 	  array of objects of class @ref OFZIPArchiveEntry.
 *

 * The objects of the array have the same order as the entries in the central
 * directory, which does not need to be the order in which the actual files are
 * stored.
 *
 * @return The entries of the central directory of the archive as an array
 */
- (OFArray*)entries;

/*!
 * @brief Returns the archive comment.