MusicPlayerDaemon / libmpdclient

C library to implement a MPD client
77 stars 25 forks source link

MPD_ERROR_MALFORMED on response lines longer than 4KiB #69

Open joshkunz opened 3 years ago

joshkunz commented 3 years ago

Howdy, I develop an MPD client called ashuffle that uses libmpdclient. A user filed an issue where a long comment on a track caused an mpd_recv_song as part of an mpd_list_all_meta command to fail with the error message Response line too large, which I presume is an MPD_ERROR_MALFORMED. It looks like this is caused by libmpdclient's fixed 4KiB buffer size. The user was able to confirm that a line in the raw response from MPD was over the 4KiB limit (4.4KiB). I have not directly confirmed this at HEAD but the issue appears to be in the code.

It looks like this has come up before in issue #51, and PR #53 has a proposed fix, but there hasn't been any activity on it in almost 10mo. Would the libmpdclient maintainers be open to moving forward with that, or another, fix?

jcorporation commented 3 years ago

A problem with the 4kB buffer limit poped up also in myMPD. A file was tagged with a comment longer than this limit.