func: int CVE_2012_1184_VULN_ast_parse_digest(const char *digest, struct ast_http_digest *d, int request, int pedantic) char * c , key [ 512 ] , val [ 512 ] ; struct ast_str * str = ast_str_create ( 16 ) ; if ( ast_strlen_zero ( digest ) || ! d || ! str )  c = ast_skip_blanks ( ast_str_buffer ( str ) ); if ( strncasecmp ( c , "Digest " , strlen ( "Digest " ) ) )  c += strlen ( "Digest " ); while ( * c && * ( c = ast_skip_blanks ( c ) ) )  while ( * c && * c != '=' && * c != ',' && ! isspace ( * c ) )  key [ i ++ ] = * c ++; key [ i ] = '\0'; c = ast_skip_blanks ( c ); if ( * c == '=' )  c = ast_skip_blanks ( ++ c ); if ( * c == '\"' )  c ++; while ( * c && * c != '\"' )  if ( * c == '\\' && c [ 1 ] != '\0' )  c ++; val [ i ++ ] = * c ++; while ( * c && * c != ',' && ! isspace ( * c ) )  val [ i ++ ] = * c ++; val [ i ] = '\0'; while ( * c && * c != ',' )  c ++; if ( * c )  c ++; if ( ! strcasecmp ( key , "username" ) )  ast_string_field_set ( d , username , val ); if ( ! strcasecmp ( key , "realm" ) )  ast_string_field_set ( d , realm , val ); if ( ! strcasecmp ( key , "nonce" ) )  ast_string_field_set ( d , nonce , val ); if ( ! strcasecmp ( key , "uri" ) )  ast_string_field_set ( d , uri , val ); if ( ! strcasecmp ( key , "domain" ) )  ast_string_field_set ( d , domain , val ); if ( ! strcasecmp ( key , "response" ) )  ast_string_field_set ( d , response , val ); if ( ! strcasecmp ( key , "algorithm" ) )  if ( strcasecmp ( val , "MD5" ) )  ast_log ( LOG_WARNING , "Digest algorithm: \"%s\" not supported.\n" , val ); if ( ! strcasecmp ( key , "cnonce" ) )  ast_string_field_set ( d , cnonce , val ); if ( ! strcasecmp ( key , "opaque" ) )  ast_string_field_set ( d , opaque , val ); if ( ! strcasecmp ( key , "qop" ) && ! strcasecmp ( val , "auth" ) )  if ( ! strcasecmp ( key , "nc" ) )  if ( sscanf ( val , "%30lx" , & u ) != 1 )  ast_log ( LOG_WARNING , "Incorrect Digest nc value: \"%s\".\n" , val ); ast_string_field_set ( d , nc , val ); 