Commit 03b4d88e authored by Laurent Aimar's avatar Laurent Aimar

Fixed regression in EITConvertToUTF8.

parent 349cbdc6
...@@ -2593,8 +2593,8 @@ static int EITConvertDuration( uint32_t i_duration ) ...@@ -2593,8 +2593,8 @@ static int EITConvertDuration( uint32_t i_duration )
#undef CVT_FROM_BCD #undef CVT_FROM_BCD
/* FIXME same than dvbsi_to_utf8 from dvb access */ /* FIXME same than dvbsi_to_utf8 from dvb access */
static char * static char *EITConvertToUTF8( const unsigned char *psz_instring,
EITConvertToUTF8( const unsigned char *psz_instring, size_t i_length ) size_t i_length )
{ {
const char *psz_encoding; const char *psz_encoding;
char *psz_outstring; char *psz_outstring;
...@@ -2691,13 +2691,13 @@ EITConvertToUTF8( const unsigned char *psz_instring, size_t i_length ) ...@@ -2691,13 +2691,13 @@ EITConvertToUTF8( const unsigned char *psz_instring, size_t i_length )
if( iconv_handle == (vlc_iconv_t)(-1) ) if( iconv_handle == (vlc_iconv_t)(-1) )
{ {
/* Invalid character set (e.g. ISO_8859-12) */ /* Invalid character set (e.g. ISO_8859-12) */
memcpy( psz_outstring, psz_instring, i_in ); memcpy( psz_outstring, &psz_instring[offset], i_in );
psz_outstring[i_in] = '\0'; psz_outstring[i_in] = '\0';
EnsureUTF8( psz_outstring ); EnsureUTF8( psz_outstring );
} }
else else
{ {
const char *psz_in = (const char *)psz_instring; const char *psz_in = (const char *)&psz_instring[offset];
char *psz_out = psz_outstring; char *psz_out = psz_outstring;
while( vlc_iconv( iconv_handle, &psz_in, &i_in, while( vlc_iconv( iconv_handle, &psz_in, &i_in,
......
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