View Issue Details

IDProjectCategoryView StatusLast Update
0000685fileGeneralpublic2025-10-17 08:27
Reportertigrankhachikyan Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product Version5.46 
Summary0000685: ZIP detection from stdin still broken in HEAD (PR/622 fix incomplete)
DescriptionI tested the HEAD version (commit 5a089c72) which includes the fix from PR/622 (commit 08ab5f64), and stdin detection is still broken for ZIP files.
Steps To Reproduceecho "test" > test.txt
zip test.zip test.txt

# Test with built HEAD version
./file -b --mime-type test.zip # Returns: application/zip (correct)
cat test.zip | ./file -b --mime-type - # Returns: application/octet-stream (still broken!)
Additional InformationEnvironment:
- Built from HEAD (5a089c72)
- Includes fix: 08ab5f64 "Handle negative offsets in file_buffer(), when fd is not available"
- Platform: Debian Trixie (x86_64)

The fix from PR/622 appears to be incomplete. The issue persists when piping ZIP files through stdin.

For comparison, libmagic 5.44 (Debian Bookworm) correctly detects ZIP files from stdin:
```bash
# libmagic 5.44
cat test.zip | file -b --mime-type - # Returns: application/zip (correct)
```
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2025-10-17 08:27 tigrankhachikyan New Issue