Skip to content

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

@LittleNewton

Description

@LittleNewton

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions