aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-03-18 01:19:08 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-03-18 01:19:08 +0000
commitce2efb48d50474eba3548fb83731952c58b133b9 (patch)
treec3216eeb110735bd09fed323578eb8e85de18536
parentb1d50567c69d256beebe22c485920da2c484e014 (diff)
downloadmpd-ce2efb48d50474eba3548fb83731952c58b133b9.tar.gz
mpd-ce2efb48d50474eba3548fb83731952c58b133b9.tar.xz
mpd-ce2efb48d50474eba3548fb83731952c58b133b9.zip
This fixes a bug where a client sending just the right data could cause mpd
to segfault. This could be exploited by malicious users to crash other users' mpd. But more importantly, I believe clients are doing this unintentionally, and that this is what is causing mpd to segfault for many people after running for long periods of time. git-svn-id: https://svn.musicpd.org/mpd/trunk@5649 09075e82-0dd4-0310-85a5-a0d7c8717e4f
-rw-r--r--src/interface.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/interface.c b/src/interface.c
index 31f8666e0..18eab36d6 100644
--- a/src/interface.c
+++ b/src/interface.c
@@ -398,6 +398,7 @@ static int processBytesRead(Interface * interface, int bytesRead)
return 1;
}
if (interface->cmd_list_OK >= 0 &&
+ interface->cmd_list &&
!interface->cmd_list_dup)
cmd_list_clone(interface);
interface->bufferLength -= interface->bufferPos;