1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-12-27 03:10:26 +00:00

Fixed buffer overflow in notify callback.

Occurs only if multiple clients are connected.
This commit is contained in:
jcorporation 2018-06-18 22:24:35 +01:00
parent df91c33705
commit bd00810072

View File

@ -372,7 +372,7 @@ static int mympd_notify_callback(struct mg_connection *c, const char *param) {
#ifdef DEBUG
fprintf(stdout,"Notify: %s\n",mpd.buf);
#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)
{