Heap corruption during channel scanning

Bug #505454 reported by Andrzej Mialkowski
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Me TV
Fix Released
High
Unassigned

Bug Description

For certain initial tunning files channel scan option "Scan using an initial scan file" may crash application due to heap corruption. Example of the file is /usr/share/dvb/atsc/us-Cable-Standard-center-frequencies-QAM256 (issue is not ATSC specific). System is Ubuntu 9.10 amd64, Me TV 1.1.2 and 1.1.3

Initiation of scanning with mentioned file produces:
01/10/2010 03:53:23: Initial tuning file: '/usr/share/dvb/atsc/us-Cable-Standard-center-frequencies-QAM256'
01/10/2010 03:53:23: Thread 'Scan' created
01/10/2010 03:53:23: Thread 'Scan' started
01/10/2010 03:53:23: Processing line: 'A 57000000 QAM256'
*** glibc detected *** me-tv: double free or corruption (fasttop): 0x00007f12c4016070 ***
======= Backtrace: =========

Issue is caused by whitespace squeeze implementation in StringSplitter::StringSplitter (in processed line there are two spaces between "A" and "57000000". Elimination of excessive separators from tunning file workarounds the problem.

Complete log attached.

Revision history for this message
Andrzej Mialkowski (andrzej-mialkowski) wrote :
Revision history for this message
Michael Lamothe (lamothe-deactivatedaccount-deactivatedaccount) wrote :

Yeah, that's a really nasty implementation. I don't think that I need a class either, could just be a function that returns a std::vector<Glib::ustring>. I'll reimplement that for the next release.

Changed in me-tv:
assignee: nobody → Michael Lamothe (lamothe)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Michael Lamothe (lamothe-deactivatedaccount-deactivatedaccount) wrote :

Thanks for testing the ATSC scanning feature, does it work? You'll note that the dialog tells you that it's unsupported because no one is testing it. Maybe, with your help we can make this a supported feature.

Revision history for this message
Andrzej Mialkowski (andrzej-mialkowski) wrote :

Basically scanning works. There are few caveats but scanning for SD/HD channels works (tested only cable). Channel names are correctly identified.

Issues:
 Me-TV is not adding "unnamed" channels. I believe that it is related to missing information from PSIP. I see few transponders with unencrypted channels with no data sent over PID 0x1ffb. Workaround is to scan for channels with scan/w_scan and import channels.conf.

 Comcast (my provider) apparently still uses QAM64 so it would be convenient to use auto-detection of modulation. Since AUTO currently does not work for me and I'm not sure if there is any chance to get it working (even if this would work, I think that channel switching is already slow enough).

 As a workaround for above I was using initial tunning file containing lines for both QAM64 and QAM256 like following:
A 663000000 QAM256
A 663000000 QAM64
A 669000000 QAM256
A 669000000 QAM64
The problem is that Transponder::operator== compares only transponder frequency. This causes scanner to ignore QAM64 lines. I think that at least modulation shall be included in comparison(current behavior may be also wrong for Satellite systems).

Revision history for this message
Michael Lamothe (lamothe-deactivatedaccount-deactivatedaccount) wrote :

The heap corruption is issue is being fixed now and I'll talk to you about the the other stuff over email.

Changed in me-tv:
status: Confirmed → In Progress
Revision history for this message
Michael Lamothe (lamothe-deactivatedaccount-deactivatedaccount) wrote :

My new implementation has been pushed to the stable branch.

Changed in me-tv:
status: In Progress → Fix Committed
Changed in me-tv:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.