Bug 266676

Summary: [PATCH] Amaroks fails to parse bad DAAP data
Product: [Applications] amarok Reporter: Lukas Sandström <luksan>
Component: Collections/DAAPAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.4-GIT   
Target Milestone: 2.4.1   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.2
Attachments: Make the DAAP protocol parsing in Amarok more robust.
Use protocol interspection in DAAP rather than hard coding all response types.

Description Lukas Sandström 2011-02-19 18:13:33 UTC
Created attachment 57379 [details]
Make the DAAP protocol parsing in Amarok more robust.

Version:           2.4-GIT (using KDE 4.4.5) 
OS:                Linux

The Firefly version installed on my Readynas Duo (Radiator 4.1.7) sends the aeMK (mediakind) field as an 32 bit int instead of a 8 bit char.

Amarok currently only consumes one byte instead of four, despite the fact that the field length is correctly reported as four bytes by the server. The attached patch reworks the DAAP protocol parsing to be more robust.

Using the protocol introspection feature in DAAP (/content-codes) wouldn't help in this case, since the server claims that aeMK is only one byte, but sends four bytes.

Reproducible: Always
Comment 1 Lukas Sandström 2011-02-19 20:17:56 UTC
Created attachment 57382 [details]
Use protocol interspection in DAAP rather than hard coding all response types.
Comment 2 Myriam Schweingruber 2011-02-20 22:22:12 UTC
Thank you for the patch. Please submit it to http://git.reviewboard.kde.org (you might need to get an identity first at http://identity.kde.org)

Also please add a new line to your git comment with the following git hook

BUG: 266676

to make sure the cmomit will close the bug automatically.
Comment 3 Lukas Sandström 2011-03-05 15:02:28 UTC
The patch is posted at https://git.reviewboard.kde.org/r/100710/
Comment 4 Lukas Sandström 2011-05-24 22:27:57 UTC
The patch was committed with d2caddd7b43710f3bcc5d728d95674e06720d1da.

My commit message (and authorship) didn't survive the reviewboard mangling unfortunately so the "BUG: xx" line wasn't included in the commit message.

Closing as fixed.