Still segfaults on read from URL.
This commit is contained in:
parent
3470f27585
commit
8334e2bf1f
2 changed files with 5 additions and 4 deletions
|
|
@ -460,14 +460,11 @@ wint_t url_fgetwc( URL_FILE * input ) {
|
|||
|
||||
case CFTYPE_CURL:{
|
||||
wchar_t *wbuff = calloc( 2, sizeof( wchar_t ) );
|
||||
char *cbuff = calloc( 5, sizeof( char ) );
|
||||
|
||||
url_fread( cbuff, sizeof( char ), 4, input );
|
||||
mbstowcs( wbuff, cbuff, 1 );
|
||||
mbstowcs( wbuff, (char *)&input->buffer[input->buffer_pos], 1 );
|
||||
result = wbuff[0];
|
||||
use_one_wide( input );
|
||||
|
||||
free( cbuff );
|
||||
free( wbuff );
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue