libarchive/libarchive-test — Issue #7: 8 - archive_compression_name returns NULL 
Author: amejia1
Created: 2012-01-20 19:22:51+00:00
State: open

What steps will reproduce the problem?

int main(){
archive* a = archive_read_new();
archive_read_support_compression_all(a);
archive_read_support_format_all(a);
archive_read_open_filename(a, "D:\\desktop\\desktop.tar", 512);
const char* name = archive_compression_name(a);
puts(name ? name : "NULL");
return 0;
}

What is the expected output? What do you see instead?
Actual Results:
"NULL"
Expected Results:
"none"

What version of the product are you using? On what operating system?
libarchive trunk r656
Visual C++ 2008
Windows XP SP3

Please provide any additional information below.
build_stream overwrites a->archive.compression_name and
a->archive.compression_code in line 346-347 in archive_read.c.
libarchive 2.6.1 doesn't have this issue.

Original link: http://code.google.com/p/libarchive/issues/detail?id=8