mirror of
https://github.com/SuperBFG7/ympd
synced 2025-01-15 03:35:48 +00:00
Fixed buffer overflow in notify callback.
Occurs only if multiple clients are connected.
This commit is contained in:
parent
df91c33705
commit
bd00810072
@ -372,7 +372,7 @@ static int mympd_notify_callback(struct mg_connection *c, const char *param) {
|
|||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
fprintf(stdout,"Notify: %s\n",mpd.buf);
|
fprintf(stdout,"Notify: %s\n",mpd.buf);
|
||||||
#endif
|
#endif
|
||||||
mg_send_websocket_frame(c, WEBSOCKET_OP_TEXT, mpd.buf, mpd.buf_size);
|
mg_send_websocket_frame(c, WEBSOCKET_OP_TEXT, mpd.buf, strlen(mpd.buf));
|
||||||
|
|
||||||
if(s->song_id != mpd.song_id)
|
if(s->song_id != mpd.song_id)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user