Commit 5e7367c5 authored by Eric Wong's avatar Eric Wong

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
parent 1b4de327
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "mpd_types.h" #include "mpd_types.h"
#include "utf8.h" #include "utf8.h"
#include "utils.h" #include "utils.h"
#include "path.h"
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
...@@ -40,7 +41,7 @@ static mpd_sint8 char_conv_use_iconv; ...@@ -40,7 +41,7 @@ static mpd_sint8 char_conv_use_iconv;
-1 is to use utf8ToLatin1*/ -1 is to use utf8ToLatin1*/
static mpd_sint8 char_conv_latin1ToUtf8; static mpd_sint8 char_conv_latin1ToUtf8;
#define BUFFER_SIZE 1024 #define BUFFER_SIZE MPD_PATH_MAX
static void closeCharSetConversion(void); static void closeCharSetConversion(void);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment