[Xfce4-commits] [panel-plugins/xfce4-mpc-plugin] 02/04: Ignore extra lines with attribute: entries (bug #15415)

noreply at xfce.org noreply at xfce.org
Tue Aug 13 12:16:49 CEST 2019


This is an automated email from the git hooks/post-receive script.

l   a   n   d   r   y       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-mpc-plugin.

commit 9a21bf63df679ef22bc775d7fbfd971a0b423875
Author: Landry Breuil <landry at xfce.org>
Date:   Tue Aug 13 11:51:15 2019 +0200

    Ignore extra lines with attribute: entries (bug #15415)
    
    Fixes crashes when parsing mpd 0.21 output in some corner cases.
---
 panel-plugin/simple-libmpd.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/panel-plugin/simple-libmpd.c b/panel-plugin/simple-libmpd.c
index bceea95..9c997d3 100644
--- a/panel-plugin/simple-libmpd.c
+++ b/panel-plugin/simple-libmpd.c
@@ -468,6 +468,9 @@ void parse_outputs_answer(MpdObj *mo, void *param)
          g_strfreev(tokens);
       }
       md->nb++;
+      /* ignore extra lines with 'attribute:' */
+      while (lines[i] != NULL && strcmp(lines[i],"OK") && 0 == strncmp(lines[i], "attribute:", 10))
+         i++;
       if (strcmp(lines[i],"OK")) {
          /* make room for the next output ptr */
          md->alloutputs = g_renew(mpd_Output*, md->alloutputs, md->nb + 1);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list