[vlc-devel] [PATCH 4/4] sout: add airplay support
Steve Lhomme
robux4 at ycbcr.xyz
Tue Oct 9 15:36:29 CEST 2018
On 09/10/2018 09:40, Francois Cartegnie wrote:
> Le 09/10/2018 à 00:47, Alexander Lyon via vlc-devel a écrit :
>
>> +static int ParseWWWAuthenticate( char *psz_www_authenticate, char **ppsz_realm_value, char **ppsz_nonce_value )
>> +{
>> + if ( strncmp( psz_www_authenticate, "Digest ", 7 ) != 0 ) return VLC_EGENERIC;
>> +
>> + psz_www_authenticate += 7;
>> + char *psz_nonce;
>> + char *psz_realm = strtok_r( psz_www_authenticate, "; ", &psz_nonce );
>> +
>> + *ppsz_nonce_value = calloc( sizeof( char ), strlen( psz_nonce ) );
>> + *ppsz_realm_value = calloc( sizeof( char ), strlen( psz_realm ) );
> + 1
It's used in the sscanf to get a smaller part of that string, so it
practice it should never fill that much these strings.
>
>> + sscanf( psz_nonce, "%*[^\"]\"%[^\"]\"", *ppsz_nonce_value );
>> + sscanf( psz_realm, "%*[^\"]\"%[^\"]\"", *ppsz_realm_value );
> --
> Francois Cartegnie
> VideoLAN - VLC Developer
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list