Bug 205174

Summary: multimedia/webcamd: Segfault with RTL2832U/R820T-based DVB-T USB stick
Product: Ports & Packages Reporter: Florian Degner <f.degner>
Component: Individual Port(s)Assignee: Hans Petter Selasky <hselasky>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (hselasky)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Added NULL check none

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 freebsd_triage 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 freebsd_triage 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 freebsd_triage 2015-12-11 12:34:03 UTC
Please report if it is still an issue. Thank you for your bugreport.