From ce2efb48d50474eba3548fb83731952c58b133b9 Mon Sep 17 00:00:00 2001
From: "J. Alexander Treuman" <jat@spatialrift.net>
Date: Sun, 18 Mar 2007 01:19:08 +0000
Subject: 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
---
 src/interface.c | 1 +
 1 file changed, 1 insertion(+)

(limited to 'src')

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;
-- 
cgit v1.2.3