Skip to content

raw_device.device_entry() is crashing with segmentation fault for libtmp UNKNOWN device #6

@hejnm1am

Description

@hejnm1am

If you call raw.device_entry() and your device is not in music-players.h then

libtmp reports:
Device 0 (VID=091e and PID=51de) is UNKNOWN in libmtp v1.1.22.
Please report this VID/PID and the device model to the libmtp development team

in libtmp_rs:

self.inner.device_entry.vendor is null
self.inner.device_entry is not null, it's valid struct

vendor = CStr::from_ptr(self.inner.device_entry.vendor); will crash (segmentation fault)
raw.rs: line 76

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions