Commit 3a653347 authored by Derk-Jan Hartman's avatar Derk-Jan Hartman

Fix a crash in stream_ReadLine

parent b587e9ff
...@@ -241,6 +241,7 @@ stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t b_quick ) ...@@ -241,6 +241,7 @@ stream_t *stream_AccessNew( access_t *p_access, vlc_bool_t b_quick )
/* UTF16 and UTF32 text file conversion */ /* UTF16 and UTF32 text file conversion */
s->i_char_width = 1; s->i_char_width = 1;
s->b_little_endian = VLC_FALSE; s->b_little_endian = VLC_FALSE;
s->conv = (vlc_iconv_t)(-1);
/* Common field */ /* Common field */
p_sys->p_access = p_access; p_sys->p_access = p_access;
...@@ -1528,7 +1529,7 @@ char * stream_ReadLine( stream_t *s ) ...@@ -1528,7 +1529,7 @@ char * stream_ReadLine( stream_t *s )
/* We failed to read any data, probably EOF */ /* We failed to read any data, probably EOF */
if( p_line ) free( p_line ); if( p_line ) free( p_line );
vlc_iconv_close( s->conv ); if( s->conv != (vlc_iconv_t)(-1) ) vlc_iconv_close( s->conv );
return NULL; return NULL;
} }
......
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