Bug 205174 - multimedia/webcamd: Segfault with RTL2832U/R820T-based DVB-T USB stick
Summary: multimedia/webcamd: Segfault with RTL2832U/R820T-based DVB-T USB stick
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-09 22:55 UTC by Florian Degner
Modified: 2015-12-11 12:34 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (hselasky)


Attachments
Added NULL check (396 bytes, patch)
2015-12-09 22:55 UTC, Florian Degner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Degner 2015-12-09 22:55:20 UTC
Created attachment 164029 [details]
Added NULL check

Webcamd segfaults when used with the following dvb-t usb stick:

# usbconfig -u 1 -a 5 dump_device_desc
ugen1.5: <RTL2832U Generic> ...
  ...
  idVendor = 0x0bda 
  idProduct = 0x2832 
  ...
#

Here is what gdb reports:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00000000007492df in rtl2832u_tuner_attach (adap=0x8024ab050)
    at media_tree/drivers/media/usb/dvb-usb-v2/rtl28xxu.c:1324
1324                    if (IS_ERR(pdev) || pdev->dev.driver == NULL)
...
(gdb) p pdev
$1 = (struct platform_device *) 0x0
(gdb)


Applying the attached patch to rtl28xxu.c fixed the problem.
Comment 1 Hans Petter Selasky freebsd_committer 2015-12-10 08:12:02 UTC
Hi,

Can you build webcamd from here instead:

svn --username anonsvn --password anonsvn \
      checkout svn://svn.turbocat.net/i4b/trunk/ports

--HPS
Comment 2 commit-hook freebsd_committer 2015-12-11 12:32:47 UTC
A commit references this bug:

Author: kwm
Date: Fri Dec 11 12:31:52 UTC 2015
New revision: 403522
URL: https://svnweb.freebsd.org/changeset/ports/403522

Log:
  Update webcamd to 4.2.0.8.

  Fix a segfault with a RTL2832U/R820T-based DVB-T USB stick

  PR:		205174
  Submitted by:	f.degner
  Approved by:	maintainer

Changes:
  head/multimedia/webcamd/Makefile
  head/multimedia/webcamd/distinfo
Comment 3 Hans Petter Selasky freebsd_committer 2015-12-11 12:34:03 UTC
Please report if it is still an issue. Thank you for your bugreport.