diff options
author | Eric Wong <normalperson@yhbt.net> | 2008-01-01 10:09:43 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-01-01 10:09:43 +0000 |
commit | 5e7367c580f3a7aca93f6523e6c9d37f81b1d48b (patch) | |
tree | 2ef3a224397e92e639a486ec45302c82bc9c52cc | |
parent | 1b4de32706f6c43c4833146a98b0689cbe624fe6 (diff) | |
download | mpd-5e7367c580f3a7aca93f6523e6c9d37f81b1d48b.tar.gz mpd-5e7367c580f3a7aca93f6523e6c9d37f81b1d48b.tar.xz mpd-5e7367c580f3a7aca93f6523e6c9d37f81b1d48b.zip |
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
-rw-r--r-- | src/charConv.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <stdlib.h> #include <errno.h> @@ -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); |