733
734
735
736
737
738
739
740
741
742
743
744
745
746
|
[data addItems: &tmp16 count: sizeof(tmp16)];
[data addItems: extension.items count: extension.count];
}
/* Zero-length extension to terminate */
[data increaseCountBy: 2];
headerSize = data.count;
if (headerSize > UINT16_MAX)
@throw [OFOutOfRangeException exception];
/* Now fill in the size and CRC16 for the entire header */
tmp16 = OFToLittleEndian16(headerSize);
|
>
>
>
>
>
>
>
>
|
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
|
[data addItems: &tmp16 count: sizeof(tmp16)];
[data addItems: extension.items count: extension.count];
}
/* Zero-length extension to terminate */
[data increaseCountBy: 2];
/*
* Some implementations only check the first byte to see if the end of
* the archive has been reached, which is 0 for every multiple of 256.
* Add one byte of padding to avoid this.
*/
if ((data.count & 0xFF) == 0)
[data increaseCountBy: 1];
headerSize = data.count;
if (headerSize > UINT16_MAX)
@throw [OFOutOfRangeException exception];
/* Now fill in the size and CRC16 for the entire header */
tmp16 = OFToLittleEndian16(headerSize);
|