libheif icon indicating copy to clipboard operation
libheif copied to clipboard

[Bug] StreamReader_istream fails on SMB/CIFS filesystems due to `tellg()` returning -1

Open LittleNewton opened this issue 1 month ago • 0 comments

Environment:

  • OS: Linux
  • Filesystem: SMB/CIFS (Windows Server share)
  • libheif version: 1.19.8

Problem: tellg() returns -1 on SMB mounted files, causing "No 'ftyp' box" error

Root cause: StreamReader_istream constructor in bitstream.cc uses seekg()/tellg() which is not reliable on CIFS filesystems

Suggested fix: Use stat() or pass file size from HeifFile::read_from_file()

LittleNewton avatar Nov 22 '25 17:11 LittleNewton