After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 719495 - segfault for wrong host
segfault for wrong host
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: mtp backend
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Philip Langdale
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-11-28 15:42 UTC by Ondrej Holy
Modified: 2013-11-29 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mtp: fix segfault when device not found (969 bytes, patch)
2013-11-28 15:43 UTC, Ondrej Holy
accepted-commit_now Details | Review

Description Ondrej Holy 2013-11-28 15:42:17 UTC
Segfault when wrong host is specified.

$ /usr/libexec/gvfsd-mtp host=[usb:001,003]
(I) g_vfs_backend_mtp_init
(I) g_vfs_backend_mtp_init done.
(I) do_mount
(I) do_mount: host=[usb:001,003]
(II) get_dev_path_from_host: Parsed '[usb:001,003]' into device name /dev/bus/usb/001/003
(II) get_device: [usb:001,003]
Device 0 (VID=12d1 and PID=1051) is a Huawei Honor U8860.
(II) get_device done.
(I) do_mount done.
Segmentation fault (core dumped)
Comment 1 Ondrej Holy 2013-11-28 15:43:40 UTC
Created attachment 263034 [details] [review]
mtp: fix segfault when device not found
Comment 2 Philip Langdale 2013-11-28 23:50:23 UTC
Review of attachment 263034 [details] [review]:

Makes sense, except the error message should be "Device not found".
Comment 3 Ondrej Holy 2013-11-29 12:29:45 UTC
(In reply to comment #2)
> Review of attachment 263034 [details] [review]:
> 
> Makes sense, except the error message should be "Device not found".

Thanks, fixed and pushed as commit 6b54d05ea00a363e570101e355917cc12d650ae9.