Bug 266676 - [PATCH] Amaroks fails to parse bad DAAP data
Summary: [PATCH] Amaroks fails to parse bad DAAP data
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collections/DAAP (show other bugs)
Version: 2.4-GIT
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: 2.4.1
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-19 18:13 UTC by Lukas Sandström
Modified: 2011-05-26 09:25 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 2.4.2


Attachments
Make the DAAP protocol parsing in Amarok more robust. (16.65 KB, patch)
2011-02-19 18:13 UTC, Lukas Sandström
Details
Use protocol interspection in DAAP rather than hard coding all response types. (14.71 KB, patch)
2011-02-19 20:17 UTC, Lukas Sandström
Details

Note You need to log in before you can comment on or make changes to this bug.
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.