Ignore:
Timestamp:
Dec 20, 2016, 4:07:32 PM (7 years ago)
Author:
Bruno Cornec
Message:

New 3?3 banch for incorporation of latest busybox 1.25. Changing minor version to handle potential incompatibilities.

Location:
branches/3.3
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/3.3/mindi-busybox/archival/libarchive/get_header_cpio.c

    r3232 r3621  
    3838    archive_handle->offset += 110;
    3939
    40     if (strncmp(&cpio_header[0], "07070", 5) != 0
     40    if (!is_prefixed_with(&cpio_header[0], "07070")
    4141     || (cpio_header[5] != '1' && cpio_header[5] != '2')
    4242    ) {
     
    5353        bb_error_msg_and_die("damaged cpio file");
    5454    file_header->mode = mode;
     55    /* "cpio -R USER:GRP" support: */
     56    if (archive_handle->cpio__owner.uid != (uid_t)-1L)
     57        uid = archive_handle->cpio__owner.uid;
     58    if (archive_handle->cpio__owner.gid != (gid_t)-1L)
     59        gid = archive_handle->cpio__owner.gid;
    5560    file_header->uid = uid;
    5661    file_header->gid = gid;
     
    7681    data_align(archive_handle, 4);
    7782
    78     if (strcmp(file_header->name, "TRAILER!!!") == 0) {
     83    if (strcmp(file_header->name, cpio_TRAILER) == 0) {
    7984        /* Always round up. ">> 9" divides by 512 */
    8085        archive_handle->cpio__blocks = (uoff_t)(archive_handle->offset + 511) >> 9;
Note: See TracChangeset for help on using the changeset viewer.