cvs commit: src/lib/libarchive archive_read_support_format_ar.c src/lib/libarchive/test test_read_format_ar.c test_write_format_ar.c

Kai Wang kaiw at
Wed Mar 12 21:10:26 UTC 2008

kaiw        2008-03-12 21:10:26 UTC

  FreeBSD src repository

  Modified files:
    lib/libarchive       archive_read_support_format_ar.c 
    lib/libarchive/test  test_read_format_ar.c 
  Current 'ar' read support in libarchive can only handle a GNU/SVR4
  filename table whose size is less than 65536 bytes.
  The original intention was to not consume the filename table, so the
  client will have a chance to look at it. To achieve that, the library
  call decompressor->read_ahead to read(look ahead) but do not call
  decompressor->consume to consume the data, thus a limit was raised
  since read_ahead call can only look ahead at most BUFFER_SIZE(65536)
  bytes at the moment, and you can not "look any further" before you
  consume what you already "saw".
  This commit will turn GNU/SVR4 filename table into "archive format
  data", i.e., filename table will be consumed by libarchive, so the
  65536-bytes limit will be gone, but client can no longer have access
  to the content of filename table.
  'ar' support test suite is changed accordingly. BSD ar(1) is not
  affected by this change since it doesn't look at the filename table.
  Reported by:    erwin
  Discussed with: jkoshy, kientzle
  Reviewed by:    jkoshy, kientzle
  Approved by:    jkoshy(mentor), kientzle
  Revision  Changes    Path
  1.9       +39 -36    src/lib/libarchive/archive_read_support_format_ar.c
  1.5       +1 -3      src/lib/libarchive/test/test_read_format_ar.c
  1.6       +1 -3      src/lib/libarchive/test/test_write_format_ar.c

More information about the cvs-src mailing list