From 5e7367c580f3a7aca93f6523e6c9d37f81b1d48b Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 1 Jan 2008 10:09:43 +0000 Subject: charConv: tie the buffer size for iconv() to our PATH_MAX constant Although most PATH_MAX is higher than the 1k buffer we set, some implementations will set a 256 (or even 64) byte PATH_MAX, so we should be prepared for that. git-svn-id: https://svn.musicpd.org/mpd/trunk@7121 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/charConv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/charConv.c b/src/charConv.c index 71a86e7d7..a4b596efe 100644 --- a/src/charConv.c +++ b/src/charConv.c @@ -20,6 +20,7 @@ #include "mpd_types.h" #include "utf8.h" #include "utils.h" +#include "path.h" #include #include @@ -40,7 +41,7 @@ static mpd_sint8 char_conv_use_iconv; -1 is to use utf8ToLatin1*/ static mpd_sint8 char_conv_latin1ToUtf8; -#define BUFFER_SIZE 1024 +#define BUFFER_SIZE MPD_PATH_MAX static void closeCharSetConversion(void); -- cgit v1.2.3