aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmpdclient.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-18 01:05:16 +0200
committerMax Kellermann <max@duempel.org>2008-09-18 01:05:16 +0200
commit96683ca4d3611e7c25364a1dbf326435727757d2 (patch)
treeccffe99ad0ff5113ed19d93f8fb68dfe56d7df7e /src/libmpdclient.h
parentbf8da42199fe351c844338ac6c09d715b25d34ed (diff)
downloadmpd-96683ca4d3611e7c25364a1dbf326435727757d2.tar.gz
mpd-96683ca4d3611e7c25364a1dbf326435727757d2.tar.xz
mpd-96683ca4d3611e7c25364a1dbf326435727757d2.zip
libmpdclient: smaller error buffer
512 characters should be well enough for error messages which are actually being displayed somewhere. Use sizeof(errorStr) instead of MPD_BUFFER_MAX_LENGTH everywhere. Do proper length checking when copying the output buffer to errorStr.
Diffstat (limited to 'src/libmpdclient.h')
-rw-r--r--src/libmpdclient.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmpdclient.h b/src/libmpdclient.h
index e91013b9c..c4a22b2d8 100644
--- a/src/libmpdclient.h
+++ b/src/libmpdclient.h
@@ -110,7 +110,7 @@ typedef struct _mpd_Connection {
/* use this to check the version of mpd */
int version[3];
/* IMPORTANT, you want to get the error messages from here */
- char errorStr[MPD_BUFFER_MAX_LENGTH+1];
+ char errorStr[512];
int errorCode;
int errorAt;
/* this will be set to MPD_ERROR_* if there is an error, 0 if not */