hash
int64
-9,197,960,073,880,366,000
9,199,363,627B
project
stringclasses
2 values
size
int64
2
5.68k
label
int64
0
1
functionSource
stringlengths
31
235k
-4,078,760,840,682,684,000
chrome
37
0
static void read_ref_frames ( VP9_COMMON * const cm , MACROBLOCKD * const xd , vp9_reader * r , int segment_id , MV_REFERENCE_FRAME ref_frame [ 2 ] ) { FRAME_CONTEXT * const fc = & cm -> fc ; FRAME_COUNTS * const counts = & cm -> counts ; if ( vp9_segfeature_active ( & cm -> seg , segment_id , SEG_LVL_REF_FRAME ) ) { ref_frame [ 0 ] = ( MV_REFERENCE_FRAME ) vp9_get_segdata ( & cm -> seg , segment_id , SEG_LVL_REF_FRAME ) ; ref_frame [ 1 ] = NONE ; } else { const REFERENCE_MODE mode = read_block_reference_mode ( cm , xd , r ) ; if ( mode == COMPOUND_REFERENCE ) { const int idx = cm -> ref_frame_sign_bias [ cm -> comp_fixed_ref ] ; const int ctx = vp9_get_pred_context_comp_ref_p ( cm , xd ) ; const int bit = vp9_read ( r , fc -> comp_ref_prob [ ctx ] ) ; if ( ! cm -> frame_parallel_decoding_mode ) ++ counts -> comp_ref [ ctx ] [ bit ] ; ref_frame [ idx ] = cm -> comp_fixed_ref ; ref_frame [ ! idx ] = cm -> comp_var_ref [ bit ] ; } else if ( mode == SINGLE_REFERENCE ) { const int ctx0 = vp9_get_pred_context_single_ref_p1 ( xd ) ; const int bit0 = vp9_read ( r , fc -> single_ref_prob [ ctx0 ] [ 0 ] ) ; if ( ! cm -> frame_parallel_decoding_mode ) ++ counts -> single_ref [ ctx0 ] [ 0 ] [ bit0 ] ; if ( bit0 ) { const int ctx1 = vp9_get_pred_context_single_ref_p2 ( xd ) ; const int bit1 = vp9_read ( r , fc -> single_ref_prob [ ctx1 ] [ 1 ] ) ; if ( ! cm -> frame_parallel_decoding_mode ) ++ counts -> single_ref [ ctx1 ] [ 1 ] [ bit1 ] ; ref_frame [ 0 ] = bit1 ? ALTREF_FRAME : GOLDEN_FRAME ; } else { ref_frame [ 0 ] = LAST_FRAME ; } ref_frame [ 1 ] = NONE ; } else { assert ( 0 && "Invalid prediction mode." ) ; } } }
355,220,887,711,506,900
debian
56
1
static bool get_variable_range ( PlannerInfo * root , VariableStatData * vardata , Oid sortop , Datum * min , Datum * max ) { Datum tmin = 0 ; Datum tmax = 0 ; bool have_data = false ; int16 typLen ; bool typByVal ; Datum * values ; int nvalues ; int i ; # ifdef NOT_USED if ( get_actual_variable_range ( root , vardata , sortop , min , max ) ) return true ; # endif if ( ! HeapTupleIsValid ( vardata -> statsTuple ) ) { return false ; } get_typlenbyval ( vardata -> atttype , & typLen , & typByVal ) ; if ( get_attstatsslot ( vardata -> statsTuple , vardata -> atttype , vardata -> atttypmod , STATISTIC_KIND_HISTOGRAM , sortop , NULL , & values , & nvalues , NULL , NULL ) ) { if ( nvalues > 0 ) { tmin = datumCopy ( values [ 0 ] , typByVal , typLen ) ; tmax = datumCopy ( values [ nvalues - 1 ] , typByVal , typLen ) ; have_data = true ; } free_attstatsslot ( vardata -> atttype , values , nvalues , NULL , 0 ) ; } else if ( get_attstatsslot ( vardata -> statsTuple , vardata -> atttype , vardata -> atttypmod , STATISTIC_KIND_HISTOGRAM , InvalidOid , NULL , & values , & nvalues , NULL , NULL ) ) { free_attstatsslot ( vardata -> atttype , values , nvalues , NULL , 0 ) ; return false ; } if ( get_attstatsslot ( vardata -> statsTuple , vardata -> atttype , vardata -> atttypmod , STATISTIC_KIND_MCV , InvalidOid , NULL , & values , & nvalues , NULL , NULL ) ) { bool tmin_is_mcv = false ; bool tmax_is_mcv = false ; FmgrInfo opproc ; fmgr_info ( get_opcode ( sortop ) , & opproc ) ; for ( i = 0 ; i < nvalues ; i ++ ) { if ( ! have_data ) { tmin = tmax = values [ i ] ; tmin_is_mcv = tmax_is_mcv = have_data = true ; continue ; } if ( DatumGetBool ( FunctionCall2Coll ( & opproc , DEFAULT_COLLATION_OID , values [ i ] , tmin ) ) ) { tmin = values [ i ] ; tmin_is_mcv = true ; } if ( DatumGetBool ( FunctionCall2Coll ( & opproc , DEFAULT_COLLATION_OID , tmax , values [ i ] ) ) ) { tmax = values [ i ] ; tmax_is_mcv = true ; } } if ( tmin_is_mcv ) tmin = datumCopy ( tmin , typByVal , typLen ) ; if ( tmax_is_mcv ) tmax = datumCopy ( tmax , typByVal , typLen ) ; free_attstatsslot ( vardata -> atttype , values , nvalues , NULL , 0 ) ; } * min = tmin ; * max = tmax ; return have_data ; }
4,180,964,683,905,831,000
debian
8
0
static int selinux_ptrace_access_check ( struct task_struct * child , unsigned int mode ) { if ( mode & PTRACE_MODE_READ ) { u32 sid = current_sid ( ) ; u32 csid = task_sid ( child ) ; return avc_has_perm ( sid , csid , SECCLASS_FILE , FILE__READ , NULL ) ; } return current_has_perm ( child , PROCESS__PTRACE ) ; }
-7,855,974,557,509,681,000
debian
11
0
Oid get_opfamily_proc ( Oid opfamily , Oid lefttype , Oid righttype , int16 procnum ) { HeapTuple tp ; Form_pg_amproc amproc_tup ; RegProcedure result ; tp = SearchSysCache4 ( AMPROCNUM , ObjectIdGetDatum ( opfamily ) , ObjectIdGetDatum ( lefttype ) , ObjectIdGetDatum ( righttype ) , Int16GetDatum ( procnum ) ) ; if ( ! HeapTupleIsValid ( tp ) ) return InvalidOid ; amproc_tup = ( Form_pg_amproc ) GETSTRUCT ( tp ) ; result = amproc_tup -> amproc ; ReleaseSysCache ( tp ) ; return result ; }
-704,025,756,752,474,500
debian
21
0
void PNGAPI png_set_cHRM ( png_structp png_ptr , png_infop info_ptr , double white_x , double white_y , double red_x , double red_y , double green_x , double green_y , double blue_x , double blue_y ) { png_debug1 ( 1 , "in %s storage function" , "cHRM" ) ; if ( png_ptr == NULL || info_ptr == NULL ) return ; info_ptr -> x_white = ( float ) white_x ; info_ptr -> y_white = ( float ) white_y ; info_ptr -> x_red = ( float ) red_x ; info_ptr -> y_red = ( float ) red_y ; info_ptr -> x_green = ( float ) green_x ; info_ptr -> y_green = ( float ) green_y ; info_ptr -> x_blue = ( float ) blue_x ; info_ptr -> y_blue = ( float ) blue_y ; # ifdef PNG_FIXED_POINT_SUPPORTED info_ptr -> int_x_white = ( png_fixed_point ) ( white_x * 100000. + 0.5 ) ; info_ptr -> int_y_white = ( png_fixed_point ) ( white_y * 100000. + 0.5 ) ; info_ptr -> int_x_red = ( png_fixed_point ) ( red_x * 100000. + 0.5 ) ; info_ptr -> int_y_red = ( png_fixed_point ) ( red_y * 100000. + 0.5 ) ; info_ptr -> int_x_green = ( png_fixed_point ) ( green_x * 100000. + 0.5 ) ; info_ptr -> int_y_green = ( png_fixed_point ) ( green_y * 100000. + 0.5 ) ; info_ptr -> int_x_blue = ( png_fixed_point ) ( blue_x * 100000. + 0.5 ) ; info_ptr -> int_y_blue = ( png_fixed_point ) ( blue_y * 100000. + 0.5 ) ; # endif info_ptr -> valid |= PNG_INFO_cHRM ; }
1,760,449,185,745,615,400
debian
3
0
TSReturnCode TSUrlHostSet ( TSMBuffer bufp , TSMLoc obj , const char * value , int length ) { return URLPartSet ( bufp , obj , value , length , & URL : : host_set ) ; }
-3,135,212,895,432,241,000
debian
4
0
static guint32 dissect_netb_unknown ( tvbuff_t * tvb , packet_info * pinfo , int offset , proto_tree * tree ) { proto_tree_add_expert ( tree , pinfo , & ei_netb_unknown_command_data , tvb , offset + NB_COMMAND + 1 , - 1 ) ; return 0 ; }
6,017,095,990,848,568,000
chrome
9
0
static void unset_active_map ( const vpx_codec_enc_cfg_t * cfg , vpx_codec_ctx_t * codec ) { vpx_active_map_t map = { 0 , 0 , 0 } ; map . rows = ( cfg -> g_h + 15 ) / 16 ; map . cols = ( cfg -> g_w + 15 ) / 16 ; map . active_map = NULL ; if ( vpx_codec_control ( codec , VP8E_SET_ACTIVEMAP , & map ) ) die_codec ( codec , "Failed to set active map" ) ; }
-7,136,186,224,744,988,000
debian
37
0
CURLcode Curl_http_auth_act ( struct connectdata * conn ) { struct Curl_easy * data = conn -> data ; bool pickhost = FALSE ; bool pickproxy = FALSE ; CURLcode result = CURLE_OK ; if ( 100 <= data -> req . httpcode && 199 >= data -> req . httpcode ) return CURLE_OK ; if ( data -> state . authproblem ) return data -> set . http_fail_on_error ? CURLE_HTTP_RETURNED_ERROR : CURLE_OK ; if ( conn -> bits . user_passwd && ( ( data -> req . httpcode == 401 ) || ( conn -> bits . authneg && data -> req . httpcode < 300 ) ) ) { pickhost = pickoneauth ( & data -> state . authhost ) ; if ( ! pickhost ) data -> state . authproblem = TRUE ; } if ( conn -> bits . proxy_user_passwd && ( ( data -> req . httpcode == 407 ) || ( conn -> bits . authneg && data -> req . httpcode < 300 ) ) ) { pickproxy = pickoneauth ( & data -> state . authproxy ) ; if ( ! pickproxy ) data -> state . authproblem = TRUE ; } if ( pickhost || pickproxy ) { Curl_safefree ( data -> req . newurl ) ; data -> req . newurl = strdup ( data -> change . url ) ; if ( ! data -> req . newurl ) return CURLE_OUT_OF_MEMORY ; if ( ( data -> set . httpreq != HTTPREQ_GET ) && ( data -> set . httpreq != HTTPREQ_HEAD ) && ! conn -> bits . rewindaftersend ) { result = http_perhapsrewind ( conn ) ; if ( result ) return result ; } } else if ( ( data -> req . httpcode < 300 ) && ( ! data -> state . authhost . done ) && conn -> bits . authneg ) { if ( ( data -> set . httpreq != HTTPREQ_GET ) && ( data -> set . httpreq != HTTPREQ_HEAD ) ) { data -> req . newurl = strdup ( data -> change . url ) ; if ( ! data -> req . newurl ) return CURLE_OUT_OF_MEMORY ; data -> state . authhost . done = TRUE ; } } if ( http_should_fail ( conn ) ) { failf ( data , "The requested URL returned error: %d" , data -> req . httpcode ) ; result = CURLE_HTTP_RETURNED_ERROR ; } return result ; }
313,627,013,719,508,800
debian
3
0
static inline PixelTrait GetPixelRedTraits ( const Image * restrict image ) { return ( image -> channel_map [ RedPixelChannel ] . traits ) ; }
3,426,991,998,365,732,400
debian
92
0
void ps2_write_mouse ( void * opaque , int val ) { PS2MouseState * s = ( PS2MouseState * ) opaque ; trace_ps2_write_mouse ( opaque , val ) ; # ifdef DEBUG_MOUSE printf ( "kbd: write mouse 0x%02x\n" , val ) ; # endif switch ( s -> common . write_cmd ) { default : case - 1 : if ( s -> mouse_wrap ) { if ( val == AUX_RESET_WRAP ) { s -> mouse_wrap = 0 ; ps2_queue ( & s -> common , AUX_ACK ) ; return ; } else if ( val != AUX_RESET ) { ps2_queue ( & s -> common , val ) ; return ; } } switch ( val ) { case AUX_SET_SCALE11 : s -> mouse_status &= ~ MOUSE_STATUS_SCALE21 ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_SET_SCALE21 : s -> mouse_status |= MOUSE_STATUS_SCALE21 ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_SET_STREAM : s -> mouse_status &= ~ MOUSE_STATUS_REMOTE ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_SET_WRAP : s -> mouse_wrap = 1 ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_SET_REMOTE : s -> mouse_status |= MOUSE_STATUS_REMOTE ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_GET_TYPE : ps2_queue ( & s -> common , AUX_ACK ) ; ps2_queue ( & s -> common , s -> mouse_type ) ; break ; case AUX_SET_RES : case AUX_SET_SAMPLE : s -> common . write_cmd = val ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_GET_SCALE : ps2_queue ( & s -> common , AUX_ACK ) ; ps2_queue ( & s -> common , s -> mouse_status ) ; ps2_queue ( & s -> common , s -> mouse_resolution ) ; ps2_queue ( & s -> common , s -> mouse_sample_rate ) ; break ; case AUX_POLL : ps2_queue ( & s -> common , AUX_ACK ) ; ps2_mouse_send_packet ( s ) ; break ; case AUX_ENABLE_DEV : s -> mouse_status |= MOUSE_STATUS_ENABLED ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_DISABLE_DEV : s -> mouse_status &= ~ MOUSE_STATUS_ENABLED ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_SET_DEFAULT : s -> mouse_sample_rate = 100 ; s -> mouse_resolution = 2 ; s -> mouse_status = 0 ; ps2_queue ( & s -> common , AUX_ACK ) ; break ; case AUX_RESET : s -> mouse_sample_rate = 100 ; s -> mouse_resolution = 2 ; s -> mouse_status = 0 ; s -> mouse_type = 0 ; ps2_queue ( & s -> common , AUX_ACK ) ; ps2_queue ( & s -> common , 0xaa ) ; ps2_queue ( & s -> common , s -> mouse_type ) ; break ; default : break ; } break ; case AUX_SET_SAMPLE : s -> mouse_sample_rate = val ; switch ( s -> mouse_detect_state ) { default : case 0 : if ( val == 200 ) s -> mouse_detect_state = 1 ; break ; case 1 : if ( val == 100 ) s -> mouse_detect_state = 2 ; else if ( val == 200 ) s -> mouse_detect_state = 3 ; else s -> mouse_detect_state = 0 ; break ; case 2 : if ( val == 80 ) s -> mouse_type = 3 ; s -> mouse_detect_state = 0 ; break ; case 3 : if ( val == 80 ) s -> mouse_type = 4 ; s -> mouse_detect_state = 0 ; break ; } ps2_queue ( & s -> common , AUX_ACK ) ; s -> common . write_cmd = - 1 ; break ; case AUX_SET_RES : s -> mouse_resolution = val ; ps2_queue ( & s -> common , AUX_ACK ) ; s -> common . write_cmd = - 1 ; break ; } }
6,862,887,795,439,011,000
chrome
17
0
TEST_F ( SSLErrorAssistantTest , DynamicInterstitialListOrganizationMismatch ) { ASSERT_TRUE ( embedded_test_server ( ) -> Start ( ) ) ; EXPECT_EQ ( 1u , ssl_info ( ) . public_key_hashes . size ( ) ) ; auto config_proto = std : : make_unique < chrome_browser_ssl : : SSLErrorAssistantConfig > ( ) ; config_proto -> set_version_id ( kLargeVersionId ) ; chrome_browser_ssl : : DynamicInterstitial * filter = config_proto -> add_dynamic_interstitial ( ) ; filter -> set_interstitial_type ( chrome_browser_ssl : : DynamicInterstitial : : INTERSTITIAL_PAGE_SSL ) ; filter -> set_cert_error ( chrome_browser_ssl : : DynamicInterstitial : : UNKNOWN_CERT_ERROR ) ; filter -> add_sha256_hash ( "sha256uthatch" ) ; filter -> add_sha256_hash ( ssl_info ( ) . public_key_hashes [ 0 ] . ToString ( ) ) ; filter -> add_sha256_hash ( "sha256/treecreeper" ) ; filter -> set_issuer_common_name_regex ( issuer_common_name ( ) ) ; filter -> set_issuer_organization_regex ( "beeeater" ) ; filter -> set_mitm_software_name ( "UwS" ) ; error_assistant ( ) -> SetErrorAssistantProto ( std : : move ( config_proto ) ) ; EXPECT_FALSE ( error_assistant ( ) -> MatchDynamicInterstitial ( ssl_info ( ) ) ) ; }
378,220,832,151,730,900
debian
35
0
int qemuMonitorTextCreateSnapshot ( qemuMonitorPtr mon , const char * name ) { char * cmd = NULL ; char * reply = NULL ; int ret = - 1 ; char * safename ; if ( ! ( safename = qemuMonitorEscapeArg ( name ) ) || virAsprintf ( & cmd , "savevm \"%s\"" , safename ) < 0 ) { virReportOOMError ( ) ; goto cleanup ; } if ( qemuMonitorHMPCommand ( mon , cmd , & reply ) ) { qemuReportError ( VIR_ERR_OPERATION_FAILED , _ ( "failed to take snapshot using command '%s'" ) , cmd ) ; goto cleanup ; } if ( strstr ( reply , "Error while creating snapshot" ) != NULL ) { qemuReportError ( VIR_ERR_OPERATION_FAILED , _ ( "Failed to take snapshot: %s" ) , reply ) ; goto cleanup ; } else if ( strstr ( reply , "No block device can accept snapshots" ) != NULL ) { qemuReportError ( VIR_ERR_OPERATION_INVALID , "%s" , _ ( "this domain does not have a device to take snapshots" ) ) ; goto cleanup ; } else if ( strstr ( reply , "Could not open VM state file" ) != NULL ) { qemuReportError ( VIR_ERR_OPERATION_FAILED , "%s" , reply ) ; goto cleanup ; } else if ( strstr ( reply , "Error" ) != NULL && strstr ( reply , "while writing VM" ) != NULL ) { qemuReportError ( VIR_ERR_OPERATION_FAILED , "%s" , reply ) ; goto cleanup ; } ret = 0 ; cleanup : VIR_FREE ( safename ) ; VIR_FREE ( cmd ) ; VIR_FREE ( reply ) ; return ret ; }
-6,580,451,576,689,963,000
debian
116
0
static void dissect_wbxml_common ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tree , const wbxml_decoding * override_content_map ) { proto_item * ti ; proto_tree * wbxml_tree ; proto_tree * wbxml_str_tbl_tree ; proto_tree * wbxml_content_tree ; guint8 version ; guint offset = 0 ; guint32 len ; guint32 charset = 0 ; guint32 charset_len = 0 ; guint32 publicid ; guint32 publicid_index = 0 ; guint32 publicid_len ; guint32 str_tbl ; guint32 str_tbl_len ; guint32 str_tbl_len_len = 0 ; guint8 level = 0 ; const wbxml_decoding * content_map = NULL ; gchar * summary = NULL ; guint8 codepage_stag = 0 ; guint8 codepage_attr = 0 ; DebugLog ( ( "dissect_wbxml: Dissecting packet %u\n" , pinfo -> fd -> num ) ) ; switch ( version = tvb_get_guint8 ( tvb , 0 ) ) { case 0x00 : break ; case 0x01 : case 0x02 : case 0x03 : break ; default : col_append_fstr ( pinfo -> cinfo , COL_INFO , " (Unknown WBXML version 0x%02x)" , version ) ; ti = proto_tree_add_item ( tree , proto_wbxml , tvb , 0 , - 1 , ENC_NA ) ; proto_item_append_text ( ti , ", Unknown version 0x%02x" , version ) ; return ; } publicid = tvb_get_guintvar ( tvb , 1 , & publicid_len ) ; if ( ! publicid ) { publicid_index = tvb_get_guintvar ( tvb , 1 + publicid_len , & len ) ; publicid_len += len ; } offset = 1 + publicid_len ; switch ( version ) { case 0x00 : break ; case 0x01 : case 0x02 : case 0x03 : charset = tvb_get_guintvar ( tvb , offset , & charset_len ) ; offset += charset_len ; break ; default : DISSECTOR_ASSERT_NOT_REACHED ( ) ; break ; } tvb_get_guintvar ( tvb , offset , & str_tbl_len_len ) ; str_tbl = offset + str_tbl_len_len ; if ( publicid ) { summary = wmem_strdup_printf ( wmem_packet_scope ( ) , "%s, Public ID: \"%s\"" , val_to_str_ext ( version , & vals_wbxml_versions_ext , "(unknown 0x%x)" ) , val_to_str_ext ( publicid , & vals_wbxml_public_ids_ext , "(unknown 0x%x)" ) ) ; } else { len = tvb_strsize ( tvb , str_tbl + publicid_index ) ; summary = wmem_strdup_printf ( wmem_packet_scope ( ) , "%s, Public ID: \"%s\"" , val_to_str_ext ( version , & vals_wbxml_versions_ext , "(unknown 0x%x)" ) , tvb_format_text ( tvb , str_tbl + publicid_index , len - 1 ) ) ; } col_append_fstr ( pinfo -> cinfo , COL_INFO , " (WBXML %s)" , summary ) ; ti = proto_tree_add_item ( tree , proto_wbxml , tvb , 0 , - 1 , ENC_NA ) ; proto_item_append_text ( ti , ", Version: %s" , summary ) ; if ( tree ) { wbxml_tree = proto_item_add_subtree ( ti , ett_wbxml ) ; proto_tree_add_uint ( wbxml_tree , hf_wbxml_version , tvb , 0 , 1 , version ) ; if ( publicid ) { proto_tree_add_uint ( wbxml_tree , hf_wbxml_public_id_known , tvb , 1 , publicid_len , publicid ) ; } else { proto_tree_add_item ( wbxml_tree , hf_wbxml_public_id_literal , tvb , 1 , publicid_len , ENC_ASCII | ENC_NA ) ; } offset = 1 + publicid_len ; if ( version ) { proto_tree_add_uint ( wbxml_tree , hf_wbxml_charset , tvb , 1 + publicid_len , charset_len , charset ) ; offset += charset_len ; } str_tbl_len = tvb_get_guintvar ( tvb , offset , & len ) ; str_tbl = offset + len ; ti = proto_tree_add_text ( wbxml_tree , tvb , offset , len + str_tbl_len , "String table: %u bytes" , str_tbl_len ) ; if ( wbxml_tree && str_tbl_len ) { wbxml_str_tbl_tree = proto_item_add_subtree ( ti , ett_wbxml_str_tbl ) ; show_wbxml_string_table ( wbxml_str_tbl_tree , tvb , str_tbl , str_tbl_len ) ; } offset += len + str_tbl_len ; if ( disable_wbxml_token_parsing ) { proto_tree_add_text ( wbxml_tree , tvb , offset , - 1 , "Data representation not shown " "(edit WBXML preferences to show)" ) ; return ; } ti = proto_tree_add_text ( wbxml_tree , tvb , offset , - 1 , "Data representation" ) ; wbxml_content_tree = proto_item_add_subtree ( ti , ett_wbxml_content ) ; if ( wbxml_tree ) { if ( override_content_map != NULL ) { content_map = override_content_map ; proto_item_append_text ( ti , " is based on: %s" , content_map -> name ) ; } else { content_map = get_wbxml_decoding_from_public_id ( publicid ) ; if ( ! content_map ) { content_map = get_wbxml_decoding_from_content_type ( pinfo -> match_string , tvb , offset ) ; if ( ! content_map ) { proto_tree_add_text ( wbxml_content_tree , tvb , offset , - 1 , "[Rendering of this content type" " not (yet) supported]" ) ; } else { proto_item_append_text ( ti , " is based on Content-Type: %s " "(chosen decoding: %s)" , pinfo -> match_string , content_map -> name ) ; } } } if ( content_map && skip_wbxml_token_mapping ) { proto_tree_add_text ( wbxml_content_tree , tvb , offset , - 1 , "[Rendering of this content type" " has been disabled " "(edit WBXML preferences to enable)]" ) ; content_map = NULL ; } proto_tree_add_text ( wbxml_content_tree , tvb , offset , - 1 , "Level | State | Codepage " "| WBXML Token Description " "| Rendering" ) ; if ( content_map ) { len = parse_wbxml_tag_defined ( wbxml_content_tree , tvb , offset , str_tbl , & level , & codepage_stag , & codepage_attr , content_map ) ; } else { len = parse_wbxml_tag ( wbxml_content_tree , tvb , offset , str_tbl , & level , & codepage_stag , & codepage_attr ) ; } } return ; } }
3,887,066,622,454,352,400
chrome
35
1
static void super_block_uvrd ( const VP9_COMP * cpi , MACROBLOCK * x , int * rate , int64_t * distortion , int * skippable , int64_t * sse , BLOCK_SIZE bsize , int64_t ref_best_rd ) { MACROBLOCKD * const xd = & x -> e_mbd ; MB_MODE_INFO * const mbmi = & xd -> mi [ 0 ] -> mbmi ; const TX_SIZE uv_tx_size = get_uv_tx_size ( mbmi , & xd -> plane [ 1 ] ) ; int plane ; int pnrate = 0 , pnskip = 1 ; int64_t pndist = 0 , pnsse = 0 ; if ( ref_best_rd < 0 ) goto term ; if ( is_inter_block ( mbmi ) ) { int plane ; for ( plane = 1 ; plane < MAX_MB_PLANE ; ++ plane ) vp9_subtract_plane ( x , bsize , plane ) ; } * rate = 0 ; * distortion = 0 ; * sse = 0 ; * skippable = 1 ; for ( plane = 1 ; plane < MAX_MB_PLANE ; ++ plane ) { txfm_rd_in_plane ( x , & pnrate , & pndist , & pnskip , & pnsse , ref_best_rd , plane , bsize , uv_tx_size , cpi -> sf . use_fast_coef_costing ) ; if ( pnrate == INT_MAX ) goto term ; * rate += pnrate ; * distortion += pndist ; * sse += pnsse ; * skippable &= pnskip ; } return ; term : * rate = INT_MAX ; * distortion = INT64_MAX ; * sse = INT64_MAX ; * skippable = 0 ; return ; }
-1,919,011,628,477,389,000
debian
7
0
static inline void write_IRQreg_ilr ( OpenPICState * opp , int n_IRQ , uint32_t val ) { if ( opp -> flags & OPENPIC_FLAG_ILR ) { IRQSource * src = & opp -> src [ n_IRQ ] ; src -> output = inttgt_to_output ( val & ILR_INTTGT_MASK ) ; DPRINTF ( "Set ILR %d to 0x%08x, output %d\n" , n_IRQ , src -> idr , src -> output ) ; } }
-7,117,046,864,335,130,000
chrome
10
0
int vp9_rc_clamp_pframe_target_size ( const VP9_COMP * const cpi , int target ) { const RATE_CONTROL * rc = & cpi -> rc ; const int min_frame_target = MAX ( rc -> min_frame_bandwidth , rc -> avg_frame_bandwidth >> 5 ) ; if ( target < min_frame_target ) target = min_frame_target ; if ( cpi -> refresh_golden_frame && rc -> is_src_frame_alt_ref ) { target = min_frame_target ; } if ( target > rc -> max_frame_bandwidth ) target = rc -> max_frame_bandwidth ; return target ; }
4,180,964,683,905,831,000
debian
16
0
static int selinux_file_ioctl ( struct file * file , unsigned int cmd , unsigned long arg ) { const struct cred * cred = current_cred ( ) ; int error = 0 ; switch ( cmd ) { case FIONREAD : case FIBMAP : case FIGETBSZ : case FS_IOC_GETFLAGS : case FS_IOC_GETVERSION : error = file_has_perm ( cred , file , FILE__GETATTR ) ; break ; case FS_IOC_SETFLAGS : case FS_IOC_SETVERSION : error = file_has_perm ( cred , file , FILE__SETATTR ) ; break ; case FIONBIO : case FIOASYNC : error = file_has_perm ( cred , file , 0 ) ; break ; case KDSKBENT : case KDSKBSENT : error = cred_has_capability ( cred , CAP_SYS_TTY_CONFIG , SECURITY_CAP_AUDIT , true ) ; break ; default : error = ioctl_has_perm ( cred , file , FILE__IOCTL , ( u16 ) cmd ) ; } return error ; }
6,336,384,260,629,386,000
debian
11
0
static void decode_zcl_ota_req_time ( gchar * s , guint32 value ) { if ( value == ZBEE_ZCL_OTA_TIME_WAIT ) { g_snprintf ( s , ITEM_LABEL_LENGTH , "Wrong Value" ) ; } else { gchar * tmp = time_secs_to_str ( NULL , value ) ; g_snprintf ( s , ITEM_LABEL_LENGTH , "%s from now" , tmp ) ; wmem_free ( NULL , tmp ) ; } return ; }
-1,672,864,273,235,910,400
debian
20
0
inline static void _slurm_rpc_trigger_get ( slurm_msg_t * msg ) { uid_t uid = g_slurm_auth_get_uid ( msg -> auth_cred , slurmctld_config . auth_info ) ; trigger_info_msg_t * resp_data ; trigger_info_msg_t * trigger_ptr = ( trigger_info_msg_t * ) msg -> data ; slurm_msg_t response_msg ; DEF_TIMERS ; START_TIMER ; debug ( "Processing RPC: REQUEST_TRIGGER_GET from uid=%d" , uid ) ; resp_data = trigger_get ( uid , trigger_ptr ) ; END_TIMER2 ( "_slurm_rpc_trigger_get" ) ; slurm_msg_t_init ( & response_msg ) ; response_msg . flags = msg -> flags ; response_msg . protocol_version = msg -> protocol_version ; response_msg . address = msg -> address ; response_msg . conn = msg -> conn ; response_msg . msg_type = RESPONSE_TRIGGER_GET ; response_msg . data = resp_data ; slurm_send_node_msg ( msg -> conn_fd , & response_msg ) ; slurm_free_trigger_msg ( resp_data ) ; }
-8,934,524,072,451,888,000
debian
4
0
inline static bool is_localhost ( const char * name , int len ) { static const char local [ ] = "127.0.0.1" ; return ( len == ( sizeof ( local ) - 1 ) ) && ( memcmp ( name , local , len ) == 0 ) ; }
1,182,028,467,273,265,000
debian
66
0
static my_bool get_one_option ( int optid , const struct my_option * opt , char * argument ) { switch ( optid ) { case '#' : # ifndef DBUG_OFF DBUG_PUSH ( argument ? argument : "d:t:S:i:O,/tmp/mysqltest.trace" ) ; debug_check_flag = 1 ; debug_info_flag = 1 ; # endif break ; case 'r' : record = 1 ; break ; case 'x' : { char buff [ FN_REFLEN ] ; if ( ! test_if_hard_path ( argument ) ) { strxmov ( buff , opt_basedir , argument , NullS ) ; argument = buff ; } fn_format ( buff , argument , "" , "" , MY_UNPACK_FILENAME ) ; DBUG_ASSERT ( cur_file == file_stack && cur_file -> file == 0 ) ; if ( ! ( cur_file -> file = fopen ( buff , "rb" ) ) ) die ( "Could not open '%s' for reading, errno: %d" , buff , errno ) ; cur_file -> file_name = my_strdup ( buff , MYF ( MY_FAE ) ) ; cur_file -> lineno = 1 ; break ; } case 'm' : { static char buff [ FN_REFLEN ] ; if ( ! test_if_hard_path ( argument ) ) { strxmov ( buff , opt_basedir , argument , NullS ) ; argument = buff ; } fn_format ( buff , argument , "" , "" , MY_UNPACK_FILENAME ) ; timer_file = buff ; unlink ( timer_file ) ; break ; } case 'p' : if ( argument == disabled_my_option ) argument = ( char * ) "" ; if ( argument ) { my_free ( opt_pass ) ; opt_pass = my_strdup ( argument , MYF ( MY_FAE ) ) ; while ( * argument ) * argument ++ = 'x' ; tty_password = 0 ; } else tty_password = 1 ; break ; # include < sslopt - case . h > case 't' : strnmov ( TMPDIR , argument , sizeof ( TMPDIR ) ) ; break ; case 'A' : if ( ! embedded_server_arg_count ) { embedded_server_arg_count = 1 ; embedded_server_args [ 0 ] = ( char * ) "" ; } if ( embedded_server_arg_count == MAX_EMBEDDED_SERVER_ARGS - 1 || ! ( embedded_server_args [ embedded_server_arg_count ++ ] = my_strdup ( argument , MYF ( MY_FAE ) ) ) ) { die ( "Can't use server argument" ) ; } break ; case OPT_LOG_DIR : if ( access ( opt_logdir , F_OK ) != 0 ) die ( "The specified log directory does not exist: '%s'" , opt_logdir ) ; break ; case 'F' : read_embedded_server_arguments ( argument ) ; break ; case OPT_RESULT_FORMAT_VERSION : set_result_format_version ( opt_result_format_version ) ; break ; case 'V' : print_version ( ) ; exit ( 0 ) ; case OPT_MYSQL_PROTOCOL : # ifndef EMBEDDED_LIBRARY opt_protocol = find_type_or_exit ( argument , & sql_protocol_typelib , opt -> name ) ; # endif break ; case '?' : usage ( ) ; exit ( 0 ) ; } return 0 ; }
5,357,882,892,791,796,000
debian
4
0
static inline void e1000e_clear_ims_bits ( E1000ECore * core , uint32_t bits ) { trace_e1000e_irq_clear_ims ( bits , core -> mac [ IMS ] , core -> mac [ IMS ] & ~ bits ) ; core -> mac [ IMS ] &= ~ bits ; }
8,415,334,249,344,417,000
debian
30
0
static const gchar * get_register_name_from_address ( guint64 addr , gboolean * is_custom_register , u3v_conv_info_t * u3v_conv_info ) { const gchar * address_string = NULL ; guint32 offset_address ; if ( is_custom_register != NULL ) { * is_custom_register = FALSE ; } if ( addr < 0x10000 ) { offset_address = ( guint32 ) addr ; address_string = try_val_to_str ( offset_address , bootstrap_register_names_abrm ) ; } if ( u3v_conv_info && u3v_conv_info -> sbrm_addr != 0 && ( addr >= u3v_conv_info -> sbrm_addr ) ) { offset_address = ( guint32 ) ( addr - u3v_conv_info -> sbrm_addr ) ; address_string = try_val_to_str ( offset_address , bootstrap_register_names_sbrm ) ; } if ( u3v_conv_info && u3v_conv_info -> sirm_addr != 0 && ( addr >= u3v_conv_info -> sirm_addr ) ) { offset_address = ( guint32 ) ( addr - u3v_conv_info -> sirm_addr ) ; address_string = try_val_to_str ( offset_address , bootstrap_register_names_sirm ) ; } if ( u3v_conv_info && u3v_conv_info -> eirm_addr != 0 && ( addr >= u3v_conv_info -> eirm_addr ) ) { offset_address = ( guint32 ) ( addr - u3v_conv_info -> eirm_addr ) ; address_string = try_val_to_str ( offset_address , bootstrap_register_names_eirm ) ; } if ( ! address_string ) { address_string = wmem_strdup_printf ( wmem_packet_scope ( ) , "[Addr:0x%016" G_GINT64_MODIFIER "X]" , addr ) ; if ( is_custom_register != NULL ) { * is_custom_register = TRUE ; } } return address_string ; }
-7,470,076,990,396,875,000
chrome
45
0
static int kq_add ( void * arg , struct event * ev ) { struct kqop * kqop = arg ; struct kevent kev ; if ( ev -> ev_events & EV_SIGNAL ) { int nsignal = EVENT_SIGNAL ( ev ) ; assert ( nsignal >= 0 && nsignal < NSIG ) ; if ( TAILQ_EMPTY ( & kqop -> evsigevents [ nsignal ] ) ) { struct timespec timeout = { 0 , 0 } ; memset ( & kev , 0 , sizeof ( kev ) ) ; kev . ident = nsignal ; kev . filter = EVFILT_SIGNAL ; kev . flags = EV_ADD ; kev . udata = PTR_TO_UDATA ( & kqop -> evsigevents [ nsignal ] ) ; if ( kevent ( kqop -> kq , & kev , 1 , NULL , 0 , & timeout ) == - 1 ) return ( - 1 ) ; if ( _evsignal_set_handler ( ev -> ev_base , nsignal , kq_sighandler ) == - 1 ) return ( - 1 ) ; } TAILQ_INSERT_TAIL ( & kqop -> evsigevents [ nsignal ] , ev , ev_signal_next ) ; ev -> ev_flags |= EVLIST_X_KQINKERNEL ; return ( 0 ) ; } if ( ev -> ev_events & EV_READ ) { memset ( & kev , 0 , sizeof ( kev ) ) ; kev . ident = ev -> ev_fd ; kev . filter = EVFILT_READ ; # ifdef NOTE_EOF kev . fflags = NOTE_EOF ; # endif kev . flags = EV_ADD ; if ( ! ( ev -> ev_events & EV_PERSIST ) ) kev . flags |= EV_ONESHOT ; kev . udata = PTR_TO_UDATA ( ev ) ; if ( kq_insert ( kqop , & kev ) == - 1 ) return ( - 1 ) ; ev -> ev_flags |= EVLIST_X_KQINKERNEL ; } if ( ev -> ev_events & EV_WRITE ) { memset ( & kev , 0 , sizeof ( kev ) ) ; kev . ident = ev -> ev_fd ; kev . filter = EVFILT_WRITE ; kev . flags = EV_ADD ; if ( ! ( ev -> ev_events & EV_PERSIST ) ) kev . flags |= EV_ONESHOT ; kev . udata = PTR_TO_UDATA ( ev ) ; if ( kq_insert ( kqop , & kev ) == - 1 ) return ( - 1 ) ; ev -> ev_flags |= EVLIST_X_KQINKERNEL ; } return ( 0 ) ; }
-5,361,762,812,461,355,000
chrome
3
1
static const char * _CompoundTextgetName ( const UConverter * cnv ) { return "x11-compound-text" ; }
313,627,013,719,508,800
debian
6
0
static inline MagickBooleanType IsPixelAtDepth ( const Quantum pixel , const QuantumAny range ) { Quantum quantum ; # if ! defined ( MAGICKCORE_HDRI_SUPPORT ) quantum = ( Quantum ) ( ( ( MagickRealType ) QuantumRange * ( ( QuantumAny ) ( ( ( MagickRealType ) range * pixel ) / QuantumRange + 0.5 ) ) ) / range + 0.5 ) ; # else quantum = ( Quantum ) ( ( ( MagickRealType ) QuantumRange * ( ( QuantumAny ) ( ( ( MagickRealType ) range * pixel ) / QuantumRange + 0.5 ) ) ) / range ) ; # endif return ( pixel == quantum ? MagickTrue : MagickFalse ) ; }
6,584,173,680,685,890,000
debian
29
0
int dorestore ( i_ctx_t * i_ctx_p , alloc_save_t * asave ) { os_ptr op = osp ; bool last ; vm_save_t * vmsave ; int code ; osp -- ; restore_fix_stack ( i_ctx_p , & o_stack , asave , false ) ; restore_fix_stack ( i_ctx_p , & e_stack , asave , true ) ; restore_fix_stack ( i_ctx_p , & d_stack , asave , false ) ; do { vmsave = alloc_save_client_data ( alloc_save_current ( idmemory ) ) ; gs_grestoreall_for_restore ( igs , vmsave -> gsave ) ; vmsave -> gsave = 0 ; code = alloc_restore_step_in ( idmemory , asave ) ; if ( code < 0 ) return code ; last = code ; } while ( ! last ) ; { uint space = icurrent_space ; ialloc_set_space ( idmemory , avm_local ) ; ifree_object ( vmsave , "zrestore" ) ; ialloc_set_space ( idmemory , space ) ; } dict_set_top ( ) ; if ( I_VALIDATE_AFTER_RESTORE ) ivalidate_clean_spaces ( i_ctx_p ) ; i_ctx_p -> LockFilePermissions = false ; return 0 ; }
-2,181,129,709,629,422,000
chrome
13
0
IN_PROC_BROWSER_TEST_F ( DownloadNotificationTest , InterruptDownloadAfterClosingNotification ) { CreateDownload ( ) ; CloseNotification ( ) ; std : : vector < download : : DownloadItem * > downloads ; content : : DownloadManager * download_manager = GetDownloadManager ( browser ( ) ) ; download_manager -> GetAllDownloads ( & downloads ) ; EXPECT_EQ ( 1u , downloads . size ( ) ) ; EXPECT_EQ ( download : : DownloadItem : : IN_PROGRESS , downloads [ 0 ] -> GetState ( ) ) ; content : : DownloadTestObserverInterrupted download_terminal_observer ( download_manager , 1u , content : : DownloadTestObserver : : ON_DANGEROUS_DOWNLOAD_FAIL ) ; InterruptTheDownload ( ) ; EXPECT_EQ ( 1u , GetDownloadNotifications ( ) . size ( ) ) ; ASSERT_TRUE ( notification ( ) ) ; }
-6,032,494,406,888,258,000
chrome
23
0
static UChar32 U_CALLCONV lenient8IteratorCurrent ( UCharIterator * iter ) { if ( iter -> reservedField != 0 ) { return U16_TRAIL ( iter -> reservedField ) ; } else if ( iter -> start < iter -> limit ) { const uint8_t * s = ( const uint8_t * ) iter -> context ; UChar32 c ; int32_t i = iter -> start ; L8_NEXT ( s , i , iter -> limit , c ) ; if ( c < 0 ) { return 0xfffd ; } else if ( c <= 0xffff ) { return c ; } else { return U16_LEAD ( c ) ; } } else { return U_SENTINEL ; } }
4,876,100,961,671,883,000
debian
5
0
static gint pvfs2_io_tracking_equal ( gconstpointer k1 , gconstpointer k2 ) { const pvfs2_io_tracking_key_t * key1 = ( const pvfs2_io_tracking_key_t * ) k1 ; const pvfs2_io_tracking_key_t * key2 = ( const pvfs2_io_tracking_key_t * ) k2 ; return ( key1 -> tag == key2 -> tag ) ; }
-866,921,002,076,081,900
debian
21
0
static int checkHttpTxnClientIPGet ( SocketTest * test , void * data ) { sockaddr const * ptr ; in_addr_t ip ; TSHttpTxn txnp = ( TSHttpTxn ) data ; in_addr_t actual_ip = htonl ( INADDR_LOOPBACK ) ; ptr = TSHttpTxnClientAddrGet ( txnp ) ; if ( ptr == nullptr || INADDR_ANY == ( ip = ats_ip4_addr_cast ( ptr ) ) ) { test -> test_client_ip_get = false ; SDK_RPRINT ( test -> regtest , "TSHttpTxnClientIPGet" , "TestCase1" , TC_FAIL , "TSHttpTxnClientIPGet returns 0 %s" , ptr ? "address" : "pointer" ) ; return TS_EVENT_CONTINUE ; } if ( ip == actual_ip ) { test -> test_client_ip_get = true ; SDK_RPRINT ( test -> regtest , "TSHttpTxnClientIPGet" , "TestCase1" , TC_PASS , "ok [%0.8x]" , ip ) ; } else { test -> test_client_ip_get = false ; SDK_RPRINT ( test -> regtest , "TSHttpTxnClientIPGet" , "TestCase1" , TC_FAIL , "Value's Mismatch [expected %.8x got %.8x]" , actual_ip , ip ) ; } return TS_EVENT_CONTINUE ; }
9,173,748,358,801,811,000
debian
33
0
static int cert_retrieve_fn ( gnutls_session_t session , const gnutls_datum_t * req_ca_rdn __attribute__ ( ( unused ) ) , int nreqs __attribute__ ( ( unused ) ) , const gnutls_pk_algorithm_t * pk_algos __attribute__ ( ( unused ) ) , int pk_algos_length __attribute__ ( ( unused ) ) , gnutls_retr2_st * ret ) { _gnutls_log ( debug_log_fp , "%s: %d\n" , __func__ , __LINE__ ) ; mgs_handle_t * ctxt ; if ( session == NULL ) { ret -> ncerts = 0 ; ret -> deinit_all = 1 ; return - 1 ; } ctxt = gnutls_transport_get_ptr ( session ) ; if ( gnutls_certificate_type_get ( session ) == GNUTLS_CRT_X509 ) { ret -> cert_type = GNUTLS_CRT_X509 ; ret -> key_type = GNUTLS_PRIVKEY_X509 ; ret -> ncerts = ctxt -> sc -> certs_x509_chain_num ; ret -> deinit_all = 0 ; ret -> cert . x509 = ctxt -> sc -> certs_x509_chain ; ret -> key . x509 = ctxt -> sc -> privkey_x509 ; return 0 ; } else if ( gnutls_certificate_type_get ( session ) == GNUTLS_CRT_OPENPGP ) { ret -> cert_type = GNUTLS_CRT_OPENPGP ; ret -> key_type = GNUTLS_PRIVKEY_OPENPGP ; ret -> ncerts = 1 ; ret -> deinit_all = 0 ; ret -> cert . pgp = ctxt -> sc -> cert_pgp ; ret -> key . pgp = ctxt -> sc -> privkey_pgp ; return 0 ; } else { ret -> ncerts = 0 ; ret -> deinit_all = 1 ; return - 1 ; } }
-6,245,610,163,896,160,000
debian
11
0
static void malta_fpga_led_init ( CharDriverState * chr ) { qemu_chr_fe_printf ( chr , "\e[HMalta LEDBAR\r\n" ) ; qemu_chr_fe_printf ( chr , "+--------+\r\n" ) ; qemu_chr_fe_printf ( chr , "+ +\r\n" ) ; qemu_chr_fe_printf ( chr , "+--------+\r\n" ) ; qemu_chr_fe_printf ( chr , "\n" ) ; qemu_chr_fe_printf ( chr , "Malta ASCII\r\n" ) ; qemu_chr_fe_printf ( chr , "+--------+\r\n" ) ; qemu_chr_fe_printf ( chr , "+ +\r\n" ) ; qemu_chr_fe_printf ( chr , "+--------+\r\n" ) ; }
4,537,091,194,729,140,000
chrome
40
0
IN_PROC_BROWSER_TEST_F ( FullscreenControllerInteractiveTest , DISABLED_EscapingMouseLockAndFullscreen ) { ASSERT_TRUE ( test_server ( ) -> Start ( ) ) ; ui_test_utils : : NavigateToURL ( browser ( ) , test_server ( ) -> GetURL ( kFullscreenMouseLockHTML ) ) ; ASSERT_FALSE ( IsFullscreenBubbleDisplayed ( ) ) ; { FullscreenNotificationObserver fullscreen_observer ; ASSERT_TRUE ( ui_test_utils : : SendKeyPressAndWait ( browser ( ) , ui : : VKEY_B , false , true , false , false , chrome : : NOTIFICATION_MOUSE_LOCK_CHANGED , content : : NotificationService : : AllSources ( ) ) ) ; fullscreen_observer . Wait ( ) ; } ASSERT_TRUE ( IsFullscreenPermissionRequested ( ) ) ; ASSERT_TRUE ( IsMouseLockPermissionRequested ( ) ) ; { FullscreenNotificationObserver fullscreen_observer ; SendEscapeToFullscreenController ( ) ; fullscreen_observer . Wait ( ) ; } ASSERT_FALSE ( IsFullscreenPermissionRequested ( ) ) ; ASSERT_FALSE ( IsMouseLockPermissionRequested ( ) ) ; { FullscreenNotificationObserver fullscreen_observer ; ASSERT_TRUE ( ui_test_utils : : SendKeyPressAndWait ( browser ( ) , ui : : VKEY_B , false , true , false , false , chrome : : NOTIFICATION_MOUSE_LOCK_CHANGED , content : : NotificationService : : AllSources ( ) ) ) ; fullscreen_observer . Wait ( ) ; } ASSERT_TRUE ( IsFullscreenPermissionRequested ( ) ) ; ASSERT_TRUE ( IsMouseLockPermissionRequested ( ) ) ; AcceptCurrentFullscreenOrMouseLockRequest ( ) ; ASSERT_TRUE ( IsMouseLocked ( ) ) ; ASSERT_TRUE ( IsWindowFullscreenForTabOrPending ( ) ) ; ASSERT_FALSE ( IsFullscreenPermissionRequested ( ) ) ; ASSERT_FALSE ( IsMouseLockPermissionRequested ( ) ) ; { FullscreenNotificationObserver fullscreen_observer ; SendEscapeToFullscreenController ( ) ; fullscreen_observer . Wait ( ) ; } ASSERT_FALSE ( IsMouseLocked ( ) ) ; ASSERT_FALSE ( IsWindowFullscreenForTabOrPending ( ) ) ; ASSERT_FALSE ( IsFullscreenPermissionRequested ( ) ) ; ASSERT_FALSE ( IsMouseLockPermissionRequested ( ) ) ; }
3,557,739,556,029,059,000
chrome
18
0
unsigned int vp9_sad ## m ## x ## n ## _avg_c ( const uint8_t * src , int src_stride , const uint8_t * ref , int ref_stride , const uint8_t * second_pred ) { uint8_t comp_pred [ m * n ] ; vp9_comp_avg_pred ( comp_pred , second_pred , m , n , ref , ref_stride ) ; return sad ( src , src_stride , comp_pred , m , m , n ) ; \ } # define sadMxNxK ( m , n , k ) void vp9_sad ## m ## x ## n ## x ## k ## _c ( const uint8_t * src , int src_stride , const uint8_t * ref , int ref_stride , unsigned int * sads ) { int i ; for ( i = 0 ; i < k ; ++ i ) sads [ i ] = vp9_sad ## m ## x ## n ## _c ( src , src_stride , & ref [ i ] , ref_stride ) ; \ } # define sadMxNx4D ( m , n ) void vp9_sad ## m ## x ## n ## x4d_c ( const uint8_t * src , int src_stride , const uint8_t * const refs [ ] , int ref_stride , unsigned int * sads ) { int i ; for ( i = 0 ; i < 4 ; ++ i ) sads [ i ] = vp9_sad ## m ## x ## n ## _c ( src , src_stride , refs [ i ] , ref_stride ) ; \ } sadMxN ( 64 , 64 ) sadMxNxK ( 64 , 64 , 3 ) sadMxNxK ( 64 , 64 , 8 ) sadMxNx4D ( 64 , 64 ) sadMxN ( 64 , 32 ) sadMxNx4D ( 64 , 32 ) sadMxN ( 32 , 64 ) sadMxNx4D ( 32 , 64 ) sadMxN ( 32 , 32 ) sadMxNxK ( 32 , 32 , 3 ) sadMxNxK ( 32 , 32 , 8 ) sadMxNx4D ( 32 , 32 ) sadMxN ( 32 , 16 ) sadMxNx4D ( 32 , 16 ) sadMxN ( 16 , 32 ) sadMxNx4D ( 16 , 32 ) sadMxN ( 16 , 16 ) sadMxNxK ( 16 , 16 , 3 ) sadMxNxK ( 16 , 16 , 8 ) sadMxNx4D ( 16 , 16 ) sadMxN ( 16 , 8 ) sadMxNxK ( 16 , 8 , 3 ) sadMxNxK ( 16 , 8 , 8 ) sadMxNx4D ( 16 , 8 ) sadMxN ( 8 , 16 ) sadMxNxK ( 8 , 16 , 3 ) sadMxNxK ( 8 , 16 , 8 ) sadMxNx4D ( 8 , 16 ) sadMxN ( 8 , 8 ) sadMxNxK ( 8 , 8 , 3 ) sadMxNxK ( 8 , 8 , 8 ) sadMxNx4D ( 8 , 8 ) sadMxN ( 8 , 4 ) sadMxNxK ( 8 , 4 , 8 ) sadMxNx4D ( 8 , 4 ) sadMxN ( 4 , 8 )
6,343,276,067,273,564,000
debian
47
0
afs_int32 listOwned ( struct rx_call * call , afs_int32 aid , prlist * alist , afs_int32 * lastP , afs_int32 * cid ) { afs_int32 code ; struct ubik_trans * tt ; struct prentry tentry ; afs_int32 head = 0 ; afs_int32 start ; alist -> prlist_len = 0 ; alist -> prlist_val = NULL ; if ( ! lastP ) return PRBADARG ; start = * lastP ; * lastP = 0 ; code = Initdb ( ) ; if ( code != PRSUCCESS ) return code ; code = ubik_BeginTransReadAny ( dbase , UBIK_READTRANS , & tt ) ; if ( code ) return code ; code = ubik_SetLock ( tt , 1 , 1 , LOCKREAD ) ; if ( code ) ABORT_WITH ( tt , code ) ; code = read_DbHeader ( tt ) ; if ( code ) ABORT_WITH ( tt , code ) ; code = WhoIsThis ( call , tt , cid ) ; if ( code ) ABORT_WITH ( tt , PRPERM ) ; if ( start ) { code = pr_ReadEntry ( tt , 0 , start , & tentry ) ; if ( ! code && ( tentry . owner == aid ) ) head = start ; } if ( ! head ) { if ( aid ) { afs_int32 loc = FindByID ( tt , aid ) ; if ( loc == 0 ) ABORT_WITH ( tt , PRNOENT ) ; code = pr_ReadEntry ( tt , 0 , loc , & tentry ) ; if ( code ) ABORT_WITH ( tt , code ) ; if ( ! AccessOK ( tt , * cid , & tentry , - 1 , PRP_OWNED_ANY ) ) ABORT_WITH ( tt , PRPERM ) ; head = tentry . owned ; } else { if ( ! AccessOK ( tt , * cid , 0 , 0 , 0 ) ) ABORT_WITH ( tt , PRPERM ) ; head = ntohl ( cheader . orphan ) ; } } code = GetOwnedChain ( tt , & head , alist ) ; if ( code ) { if ( code == PRTOOMANY ) * lastP = head ; else ABORT_WITH ( tt , code ) ; } code = ubik_EndTrans ( tt ) ; return code ; }
7,092,216,800,726,730,000
debian
4
0
static int dissect_h245_UserInputCapability ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) { offset = dissect_per_choice ( tvb , offset , actx , tree , hf_index , ett_h245_UserInputCapability , UserInputCapability_choice , NULL ) ; return offset ; }
-2,424,348,134,098,907,000
debian
5
0
struct proclistlist * pll_create ( void ) { struct proclistlist * pll = calloc ( 1 , sizeof ( struct proclistlist ) ) ; pll -> proclist = get_proclist ( & pll -> length ) ; return pll ; }
-8,933,711,118,846,966,000
debian
4
0
static void cirrus_vga_register_types ( void ) { type_register_static ( & isa_cirrus_vga_info ) ; type_register_static ( & cirrus_vga_info ) ; }
-4,552,633,429,382,740,500
debian
13
0
void mpi_set ( MPI w , MPI u ) { mpi_ptr_t wp , up ; mpi_size_t usize = u -> nlimbs ; int usign = u -> sign ; RESIZE_IF_NEEDED ( w , usize ) ; wp = w -> d ; up = u -> d ; MPN_COPY ( wp , up , usize ) ; w -> nlimbs = usize ; w -> nbits = u -> nbits ; w -> flags = u -> flags ; w -> sign = usign ; }
-2,723,830,976,796,502,500
chrome
9
0
static vpx_codec_err_t ctrl_set_svc ( vpx_codec_alg_priv_t * ctx , va_list args ) { int data = va_arg ( args , int ) ; const vpx_codec_enc_cfg_t * cfg = & ctx -> cfg ; vp9_set_svc ( ctx -> cpi , data ) ; if ( data == 1 && ( cfg -> rc_end_usage == VPX_CBR || cfg -> g_pass == VPX_RC_FIRST_PASS || cfg -> g_pass == VPX_RC_LAST_PASS ) && cfg -> ss_number_layers > 1 && cfg -> ts_number_layers > 1 ) { return VPX_CODEC_INVALID_PARAM ; } return VPX_CODEC_OK ; }
4,180,964,683,905,831,000
debian
5
0
static void inode_free_rcu ( struct rcu_head * head ) { struct inode_security_struct * isec ; isec = container_of ( head , struct inode_security_struct , rcu ) ; kmem_cache_free ( sel_inode_cache , isec ) ; }
8,127,806,390,163,863,000
debian
41
0
static void vapic_write ( void * opaque , hwaddr addr , uint64_t data , unsigned int size ) { CPUState * cs = current_cpu ; X86CPU * cpu = X86_CPU ( cs ) ; CPUX86State * env = & cpu -> env ; hwaddr rom_paddr ; VAPICROMState * s = opaque ; cpu_synchronize_state ( cs ) ; switch ( size ) { case 2 : if ( s -> state == VAPIC_INACTIVE ) { rom_paddr = ( env -> segs [ R_CS ] . base + env -> eip ) & ROM_BLOCK_MASK ; s -> rom_state_paddr = rom_paddr + data ; s -> state = VAPIC_STANDBY ; } if ( vapic_prepare ( s ) < 0 ) { s -> state = VAPIC_INACTIVE ; break ; } break ; case 1 : if ( kvm_enabled ( ) ) { pause_all_vcpus ( ) ; patch_byte ( env , env -> eip - 2 , 0x66 ) ; patch_byte ( env , env -> eip - 1 , 0x90 ) ; resume_all_vcpus ( ) ; } if ( s -> state == VAPIC_ACTIVE ) { break ; } if ( update_rom_mapping ( s , env , env -> eip ) < 0 ) { break ; } if ( find_real_tpr_addr ( s , env ) < 0 ) { break ; } vapic_enable ( s , env ) ; break ; default : case 4 : if ( ! kvm_irqchip_in_kernel ( ) ) { apic_poll_irq ( env -> apic_state ) ; } break ; } }
-7,434,014,980,763,121,000
debian
5
0
static tvbuff_t * ber_tvb_new_subset_length ( tvbuff_t * tvb , const gint backing_offset , const gint backing_length ) { gint length_remaining ; length_remaining = tvb_reported_length_remaining ( tvb , backing_offset ) ; return tvb_new_subset_length ( tvb , backing_offset , ( length_remaining > backing_length ) ? backing_length : length_remaining ) ; }
3,298,403,829,257,765,400
debian
35
0
static int qcow2_set_key ( BlockDriverState * bs , const char * key ) { BDRVQcowState * s = bs -> opaque ; uint8_t keybuf [ 16 ] ; int len , i ; memset ( keybuf , 0 , 16 ) ; len = strlen ( key ) ; if ( len > 16 ) len = 16 ; for ( i = 0 ; i < len ; i ++ ) { keybuf [ i ] = key [ i ] ; } s -> crypt_method = s -> crypt_method_header ; if ( AES_set_encrypt_key ( keybuf , 128 , & s -> aes_encrypt_key ) != 0 ) return - 1 ; if ( AES_set_decrypt_key ( keybuf , 128 , & s -> aes_decrypt_key ) != 0 ) return - 1 ; # if 0 { uint8_t in [ 16 ] ; uint8_t out [ 16 ] ; uint8_t tmp [ 16 ] ; for ( i = 0 ; i < 16 ; i ++ ) in [ i ] = i ; AES_encrypt ( in , tmp , & s -> aes_encrypt_key ) ; AES_decrypt ( tmp , out , & s -> aes_decrypt_key ) ; for ( i = 0 ; i < 16 ; i ++ ) printf ( " %02x" , tmp [ i ] ) ; printf ( "\n" ) ; for ( i = 0 ; i < 16 ; i ++ ) printf ( " %02x" , out [ i ] ) ; printf ( "\n" ) ; } # endif return 0 ; }
5,835,074,581,393,329,000
debian
6
0
relpRetVal relpTcpSetAuthMode ( relpTcp_t * pThis , relpAuthMode_t authmode ) { ENTER_RELPFUNC ; RELPOBJ_assert ( pThis , Tcp ) ; pThis -> authmode = authmode ; LEAVE_RELPFUNC ; }
-5,780,611,388,839,126,000
chrome
4
0
xmlError * __xmlLastError ( void ) { if ( IS_MAIN_THREAD ) return ( & xmlLastError ) ; else return ( & xmlGetGlobalState ( ) -> xmlLastError ) ; }
-8,176,848,763,607,322,000
chrome
7
0
TEST_F ( HistoryQuickProviderTest , VisitCountMatches ) { std : : vector < std : : string > expected_urls ; expected_urls . push_back ( "http://visitedest.com/y/a" ) ; expected_urls . push_back ( "http://visitedest.com/y/b" ) ; expected_urls . push_back ( "http://visitedest.com/x/c" ) ; RunTest ( ASCIIToUTF16 ( "visitedest" ) , false , expected_urls , true , ASCIIToUTF16 ( "visitedest.com/y/a" ) , ASCIIToUTF16 ( ".com/y/a" ) ) ; }
-5,262,394,088,289,560,000
debian
7
1
static inline int get_current_cpu ( ARMMPTimerState * s ) { CPUState * cpu_single_cpu = ENV_GET_CPU ( cpu_single_env ) ; if ( cpu_single_cpu -> cpu_index >= s -> num_cpu ) { hw_error ( "arm_mptimer: num-cpu %d but this cpu is %d!\n" , s -> num_cpu , cpu_single_cpu -> cpu_index ) ; } return cpu_single_cpu -> cpu_index ; }
6,323,824,267,898,511,000
debian
5
0
static void fz_drop_link_imp ( fz_context * ctx , fz_storable * storable ) { fz_icclink * link = ( fz_icclink * ) storable ; fz_cmm_fin_link ( ctx , link ) ; fz_free ( ctx , link ) ; }
-5,992,472,514,718,425,000
debian
37
0
static struct cgroup_process_info * lxc_cgroup_get_container_info ( const char * name , const char * lxcpath , struct cgroup_meta_data * meta_data ) { struct cgroup_process_info * result = NULL ; int saved_errno = 0 ; size_t i ; struct cgroup_process_info * * cptr = & result ; struct cgroup_process_info * entry = NULL ; char * path = NULL ; for ( i = 0 ; i <= meta_data -> maximum_hierarchy ; i ++ ) { struct cgroup_hierarchy * h = meta_data -> hierarchies [ i ] ; if ( ! h || ! h -> used ) continue ; path = lxc_cmd_get_cgroup_path ( name , lxcpath , h -> subsystems [ 0 ] ) ; if ( ! path ) { h -> used = false ; WARN ( "Not attaching to cgroup %s unknown to %s %s" , h -> subsystems [ 0 ] , lxcpath , name ) ; continue ; } entry = calloc ( 1 , sizeof ( struct cgroup_process_info ) ) ; if ( ! entry ) goto out_error ; entry -> meta_ref = lxc_cgroup_get_meta ( meta_data ) ; entry -> hierarchy = h ; entry -> cgroup_path = path ; path = NULL ; entry -> designated_mount_point = lxc_cgroup_find_mount_point ( h , entry -> cgroup_path , true ) ; * cptr = entry ; cptr = & entry -> next ; entry = NULL ; } return result ; out_error : saved_errno = errno ; free ( path ) ; lxc_cgroup_process_info_free ( result ) ; lxc_cgroup_process_info_free ( entry ) ; errno = saved_errno ; return NULL ; }
-7,500,496,935,464,391,000
debian
26
0
static qcelp_packet_rate determine_bitrate ( AVCodecContext * avctx , const int buf_size , const uint8_t * * buf ) { qcelp_packet_rate bitrate ; if ( ( bitrate = buf_size2bitrate ( buf_size ) ) >= 0 ) { if ( bitrate > * * buf ) { QCELPContext * q = avctx -> priv_data ; if ( ! q -> warned_buf_mismatch_bitrate ) { av_log ( avctx , AV_LOG_WARNING , "Claimed bitrate and buffer size mismatch.\n" ) ; q -> warned_buf_mismatch_bitrate = 1 ; } bitrate = * * buf ; } else if ( bitrate < * * buf ) { av_log ( avctx , AV_LOG_ERROR , "Buffer is too small for the claimed bitrate.\n" ) ; return I_F_Q ; } ( * buf ) ++ ; } else if ( ( bitrate = buf_size2bitrate ( buf_size + 1 ) ) >= 0 ) { av_log ( avctx , AV_LOG_WARNING , "Bitrate byte is missing, guessing the bitrate from packet size.\n" ) ; } else return I_F_Q ; if ( bitrate == SILENCE ) { av_log_ask_for_sample ( avctx , "'Blank frame handling is experimental." ) ; } return bitrate ; }
4,121,961,736,373,896,700
chrome
21
0
static void * _getBuffer ( UEnumeration * en , int32_t capacity ) { if ( en -> baseContext != NULL ) { if ( ( ( _UEnumBuffer * ) en -> baseContext ) -> len < capacity ) { capacity += PAD ; en -> baseContext = uprv_realloc ( en -> baseContext , sizeof ( int32_t ) + capacity ) ; if ( en -> baseContext == NULL ) { return NULL ; } ( ( _UEnumBuffer * ) en -> baseContext ) -> len = capacity ; } } else { capacity += PAD ; en -> baseContext = uprv_malloc ( sizeof ( int32_t ) + capacity ) ; if ( en -> baseContext == NULL ) { return NULL ; } ( ( _UEnumBuffer * ) en -> baseContext ) -> len = capacity ; } return ( void * ) & ( ( _UEnumBuffer * ) en -> baseContext ) -> data ; }
-7,076,754,245,473,579,000
chrome
15
0
static void name_from_addr ( struct sockaddr * sa , socklen_t salen , char * * phost , char * * pport ) { char ntop [ NI_MAXHOST ] ; char strport [ NI_MAXSERV ] ; int ni_result ; # ifdef HAVE_GETNAMEINFO ni_result = getnameinfo ( sa , salen , ntop , sizeof ( ntop ) , strport , sizeof ( strport ) , NI_NUMERICHOST | NI_NUMERICSERV ) ; if ( ni_result != 0 ) { if ( ni_result == EAI_SYSTEM ) event_err ( 1 , "getnameinfo failed" ) ; else event_errx ( 1 , "getnameinfo failed: %s" , gai_strerror ( ni_result ) ) ; return ; } # else ni_result = fake_getnameinfo ( sa , salen , ntop , sizeof ( ntop ) , strport , sizeof ( strport ) , NI_NUMERICHOST | NI_NUMERICSERV ) ; if ( ni_result != 0 ) return ; # endif * phost = strdup ( ntop ) ; * pport = strdup ( strport ) ; }
-4,558,261,210,024,070,700
chrome
7
0
xmlListPtr xmlListDup ( const xmlListPtr old ) { xmlListPtr cur ; if ( old == NULL ) return ( NULL ) ; if ( NULL == ( cur = xmlListCreate ( NULL , old -> linkCompare ) ) ) return ( NULL ) ; if ( 0 != xmlListCopy ( cur , old ) ) return NULL ; return cur ; }
8,484,475,213,808,847,000
debian
9
0
static BusState * qbus_find_bus ( DeviceState * dev , char * elem ) { BusState * child ; QLIST_FOREACH ( child , & dev -> child_bus , sibling ) { if ( strcmp ( child -> name , elem ) == 0 ) { return child ; } } return NULL ; }
4,489,017,523,191,997,000
debian
6
1
static int dissect_h225_H245Control_item ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) { # line 368 "./asn1/h225/h225.cnf" tvbuff_t * h245_tvb = NULL ; offset = dissect_per_octet_string ( tvb , offset , actx , tree , hf_index , NO_BOUND , NO_BOUND , FALSE , & h245_tvb ) ; next_tvb_add_handle ( & h245_list , h245_tvb , ( h225_h245_in_tree ) ? tree : NULL , h245dg_handle ) ; return offset ; }
-1,929,262,071,302,712,000
debian
19
0
static void DupTagTypeList ( struct _cmsContext_struct * ctx , const struct _cmsContext_struct * src , int loc ) { _cmsTagTypePluginChunkType newHead = { NULL } ; _cmsTagTypeLinkedList * entry ; _cmsTagTypeLinkedList * Anterior = NULL ; _cmsTagTypePluginChunkType * head = ( _cmsTagTypePluginChunkType * ) src -> chunks [ loc ] ; for ( entry = head -> TagTypes ; entry != NULL ; entry = entry -> Next ) { _cmsTagTypeLinkedList * newEntry = ( _cmsTagTypeLinkedList * ) _cmsSubAllocDup ( ctx -> MemPool , entry , sizeof ( _cmsTagTypeLinkedList ) ) ; if ( newEntry == NULL ) return ; newEntry -> Next = NULL ; if ( Anterior ) Anterior -> Next = newEntry ; Anterior = newEntry ; if ( newHead . TagTypes == NULL ) newHead . TagTypes = newEntry ; } ctx -> chunks [ loc ] = _cmsSubAllocDup ( ctx -> MemPool , & newHead , sizeof ( _cmsTagTypePluginChunkType ) ) ; }
4,976,989,049,001,280,000
debian
6
0
static void http_skip_ws ( const char * & buf , int & len ) { while ( len > 0 && * buf && ParseRules : : is_ws ( * buf ) ) { buf += 1 ; len -= 1 ; } }
-1,676,420,406,744,178,400
debian
43
0
char * ksba_oid_to_str ( const char * buffer , size_t length ) { const unsigned char * buf = buffer ; char * string , * p ; int n = 0 ; unsigned long val , valmask ; valmask = ( unsigned long ) 0xfe << ( 8 * ( sizeof ( valmask ) - 1 ) ) ; string = p = xtrymalloc ( length * ( 1 + 3 ) + 2 + 1 ) ; if ( ! string ) return NULL ; if ( ! length ) { * p = 0 ; return string ; } if ( buf [ 0 ] < 40 ) p += sprintf ( p , "0.%d" , buf [ n ] ) ; else if ( buf [ 0 ] < 80 ) p += sprintf ( p , "1.%d" , buf [ n ] - 40 ) ; else { val = buf [ n ] & 0x7f ; while ( ( buf [ n ] & 0x80 ) && ++ n < length ) { if ( ( val & valmask ) ) goto badoid ; val <<= 7 ; val |= buf [ n ] & 0x7f ; } if ( val < 80 ) goto badoid ; val -= 80 ; sprintf ( p , "2.%lu" , val ) ; p += strlen ( p ) ; } for ( n ++ ; n < length ; n ++ ) { val = buf [ n ] & 0x7f ; while ( ( buf [ n ] & 0x80 ) && ++ n < length ) { if ( ( val & valmask ) ) goto badoid ; val <<= 7 ; val |= buf [ n ] & 0x7f ; } sprintf ( p , ".%lu" , val ) ; p += strlen ( p ) ; } * p = 0 ; return string ; badoid : xfree ( string ) ; return xtrystrdup ( "1.3.6.1.4.1.11591.2.12242973" ) ; }
355,220,887,711,506,900
debian
3
0
Datum likejoinsel ( PG_FUNCTION_ARGS ) { PG_RETURN_FLOAT8 ( patternjoinsel ( fcinfo , Pattern_Type_Like , false ) ) ; }
-6,126,432,314,261,452,000
debian
4
0
gx_device * gx_device_reloc_ptr ( gx_device * dev , gc_state_t * gcst ) { if ( dev == 0 || dev -> memory == 0 ) return dev ; return RELOC_OBJ ( dev ) ; }
-5,260,094,338,219,890,000
debian
3
0
static void stroke_reread ( private_stroke_socket_t * this , stroke_msg_t * msg , FILE * out ) { this -> cred -> reread ( this -> cred , msg , out ) ; }
3,426,991,998,365,732,400
debian
6
0
static void ps2_reset_queue ( PS2State * s ) { PS2Queue * q = & s -> queue ; q -> rptr = 0 ; q -> wptr = 0 ; q -> count = 0 ; }
1,896,723,564,367,514,400
debian
23
0
static VALUE ossl_cipher_pkcs5_keyivgen ( int argc , VALUE * argv , VALUE self ) { EVP_CIPHER_CTX * ctx ; const EVP_MD * digest ; VALUE vpass , vsalt , viter , vdigest ; unsigned char key [ EVP_MAX_KEY_LENGTH ] , iv [ EVP_MAX_IV_LENGTH ] , * salt = NULL ; int iter ; rb_scan_args ( argc , argv , "13" , & vpass , & vsalt , & viter , & vdigest ) ; StringValue ( vpass ) ; if ( ! NIL_P ( vsalt ) ) { StringValue ( vsalt ) ; if ( RSTRING_LEN ( vsalt ) != PKCS5_SALT_LEN ) ossl_raise ( eCipherError , "salt must be an 8-octet string" ) ; salt = ( unsigned char * ) RSTRING_PTR ( vsalt ) ; } iter = NIL_P ( viter ) ? 2048 : NUM2INT ( viter ) ; digest = NIL_P ( vdigest ) ? EVP_md5 ( ) : GetDigestPtr ( vdigest ) ; GetCipher ( self , ctx ) ; EVP_BytesToKey ( EVP_CIPHER_CTX_cipher ( ctx ) , digest , salt , ( unsigned char * ) RSTRING_PTR ( vpass ) , RSTRING_LENINT ( vpass ) , iter , key , iv ) ; if ( EVP_CipherInit_ex ( ctx , NULL , NULL , key , iv , - 1 ) != 1 ) ossl_raise ( eCipherError , NULL ) ; OPENSSL_cleanse ( key , sizeof key ) ; OPENSSL_cleanse ( iv , sizeof iv ) ; rb_ivar_set ( self , id_key_set , Qtrue ) ; return Qnil ; }
-7,888,349,587,538,304,000
debian
41
0
static int rawv6_bind ( struct sock * sk , struct sockaddr * uaddr , int addr_len ) { struct inet_sock * inet = inet_sk ( sk ) ; struct ipv6_pinfo * np = inet6_sk ( sk ) ; struct sockaddr_in6 * addr = ( struct sockaddr_in6 * ) uaddr ; __be32 v4addr = 0 ; int addr_type ; int err ; if ( addr_len < SIN6_LEN_RFC2133 ) return - EINVAL ; addr_type = ipv6_addr_type ( & addr -> sin6_addr ) ; if ( addr_type == IPV6_ADDR_MAPPED ) return - EADDRNOTAVAIL ; lock_sock ( sk ) ; err = - EINVAL ; if ( sk -> sk_state != TCP_CLOSE ) goto out ; rcu_read_lock ( ) ; if ( addr_type != IPV6_ADDR_ANY ) { struct net_device * dev = NULL ; if ( addr_type & IPV6_ADDR_LINKLOCAL ) { if ( addr_len >= sizeof ( struct sockaddr_in6 ) && addr -> sin6_scope_id ) { sk -> sk_bound_dev_if = addr -> sin6_scope_id ; } if ( ! sk -> sk_bound_dev_if ) goto out_unlock ; err = - ENODEV ; dev = dev_get_by_index_rcu ( sock_net ( sk ) , sk -> sk_bound_dev_if ) ; if ( ! dev ) goto out_unlock ; } v4addr = LOOPBACK4_IPV6 ; if ( ! ( addr_type & IPV6_ADDR_MULTICAST ) ) { err = - EADDRNOTAVAIL ; if ( ! ipv6_chk_addr ( sock_net ( sk ) , & addr -> sin6_addr , dev , 0 ) ) { goto out_unlock ; } } } inet -> inet_rcv_saddr = inet -> inet_saddr = v4addr ; ipv6_addr_copy ( & np -> rcv_saddr , & addr -> sin6_addr ) ; if ( ! ( addr_type & IPV6_ADDR_MULTICAST ) ) ipv6_addr_copy ( & np -> saddr , & addr -> sin6_addr ) ; err = 0 ; out_unlock : rcu_read_unlock ( ) ; out : release_sock ( sk ) ; return err ; }
2,600,695,546,378,251,300
debian
64
0
static int h261_decode_block ( H261Context * h , int16_t * block , int n , int coded ) { MpegEncContext * const s = & h -> s ; int code , level , i , j , run ; RLTable * rl = & h261_rl_tcoeff ; const uint8_t * scan_table ; scan_table = s -> intra_scantable . permutated ; if ( s -> mb_intra ) { level = get_bits ( & s -> gb , 8 ) ; if ( ( level & 0x7F ) == 0 ) { av_log ( s -> avctx , AV_LOG_ERROR , "illegal dc %d at %d %d\n" , level , s -> mb_x , s -> mb_y ) ; return - 1 ; } if ( level == 255 ) level = 128 ; block [ 0 ] = level ; i = 1 ; } else if ( coded ) { int check = show_bits ( & s -> gb , 2 ) ; i = 0 ; if ( check & 0x2 ) { skip_bits ( & s -> gb , 2 ) ; block [ 0 ] = ( check & 0x1 ) ? - 1 : 1 ; i = 1 ; } } else { i = 0 ; } if ( ! coded ) { s -> block_last_index [ n ] = i - 1 ; return 0 ; } for ( ; ; ) { code = get_vlc2 ( & s -> gb , rl -> vlc . table , TCOEFF_VLC_BITS , 2 ) ; if ( code < 0 ) { av_log ( s -> avctx , AV_LOG_ERROR , "illegal ac vlc code at %dx%d\n" , s -> mb_x , s -> mb_y ) ; return - 1 ; } if ( code == rl -> n ) { run = get_bits ( & s -> gb , 6 ) ; level = get_sbits ( & s -> gb , 8 ) ; } else if ( code == 0 ) { break ; } else { run = rl -> table_run [ code ] ; level = rl -> table_level [ code ] ; if ( get_bits1 ( & s -> gb ) ) level = - level ; } i += run ; if ( i >= 64 ) { av_log ( s -> avctx , AV_LOG_ERROR , "run overflow at %dx%d\n" , s -> mb_x , s -> mb_y ) ; return - 1 ; } j = scan_table [ i ] ; block [ j ] = level ; i ++ ; } s -> block_last_index [ n ] = i - 1 ; return 0 ; }
7,039,307,292,471,245,000
debian
28
0
static guint16 de_facility ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo , guint32 offset , guint fac_len , gchar * add_string _U_ , int string_len _U_ ) { guint saved_offset ; gint8 appclass ; gboolean pc ; gboolean ind = FALSE ; guint32 component_len = 0 ; guint32 header_end_offset ; guint32 header_len ; asn1_ctx_t asn1_ctx ; tvbuff_t * SS_tvb = NULL ; static gint comp_type_tag ; asn1_ctx_init ( & asn1_ctx , ASN1_ENC_BER , TRUE , pinfo ) ; saved_offset = offset ; col_append_str ( pinfo -> cinfo , COL_PROTOCOL , "/" ) ; col_set_fence ( pinfo -> cinfo , COL_PROTOCOL ) ; while ( fac_len > ( offset - saved_offset ) ) { header_end_offset = get_ber_identifier ( tvb , offset , & appclass , & pc , & comp_type_tag ) ; header_end_offset = get_ber_length ( tvb , header_end_offset , & component_len , & ind ) ; header_len = header_end_offset - offset ; component_len = header_len + component_len ; SS_tvb = tvb_new_subset_length ( tvb , offset , component_len ) ; col_append_str ( pinfo -> cinfo , COL_INFO , "(GSM MAP) " ) ; col_set_fence ( pinfo -> cinfo , COL_INFO ) ; call_dissector ( gsm_map_handle , SS_tvb , pinfo , tree ) ; offset = offset + component_len ; } return ( fac_len ) ; }
5,347,874,611,477,979,000
chrome
10
0
static void test_simpleread ( void ) { struct event ev ; setup_test ( "Simple read: " ) ; write ( pair [ 0 ] , TEST1 , strlen ( TEST1 ) + 1 ) ; shutdown ( pair [ 0 ] , SHUT_WR ) ; event_set ( & ev , pair [ 1 ] , EV_READ , simple_read_cb , & ev ) ; if ( event_add ( & ev , NULL ) == - 1 ) exit ( 1 ) ; event_dispatch ( ) ; cleanup_test ( ) ; }
-281,311,800,725,760,060
debian
188
1
static int tak_decode_frame ( AVCodecContext * avctx , void * data , int * got_frame_ptr , AVPacket * pkt ) { TAKDecContext * s = avctx -> priv_data ; AVFrame * frame = data ; GetBitContext * gb = & s -> gb ; int chan , i , ret , hsize ; if ( pkt -> size < TAK_MIN_FRAME_HEADER_BYTES ) return AVERROR_INVALIDDATA ; init_get_bits ( gb , pkt -> data , pkt -> size * 8 ) ; if ( ( ret = ff_tak_decode_frame_header ( avctx , gb , & s -> ti , 0 ) ) < 0 ) return ret ; if ( s -> ti . flags & TAK_FRAME_FLAG_HAS_METADATA ) { av_log_missing_feature ( avctx , "frame metadata" , 1 ) ; return AVERROR_PATCHWELCOME ; } hsize = get_bits_count ( gb ) / 8 ; if ( avctx -> err_recognition & AV_EF_CRCCHECK ) { if ( ff_tak_check_crc ( pkt -> data , hsize ) ) { av_log ( avctx , AV_LOG_ERROR , "CRC error\n" ) ; return AVERROR_INVALIDDATA ; } } if ( s -> ti . codec != TAK_CODEC_MONO_STEREO && s -> ti . codec != TAK_CODEC_MULTICHANNEL ) { av_log ( avctx , AV_LOG_ERROR , "unsupported codec: %d\n" , s -> ti . codec ) ; return AVERROR_PATCHWELCOME ; } if ( s -> ti . data_type ) { av_log ( avctx , AV_LOG_ERROR , "unsupported data type: %d\n" , s -> ti . data_type ) ; return AVERROR_INVALIDDATA ; } if ( s -> ti . codec == TAK_CODEC_MONO_STEREO && s -> ti . channels > 2 ) { av_log ( avctx , AV_LOG_ERROR , "invalid number of channels: %d\n" , s -> ti . channels ) ; return AVERROR_INVALIDDATA ; } if ( s -> ti . channels > 6 ) { av_log ( avctx , AV_LOG_ERROR , "unsupported number of channels: %d\n" , s -> ti . channels ) ; return AVERROR_INVALIDDATA ; } if ( s -> ti . frame_samples <= 0 ) { av_log ( avctx , AV_LOG_ERROR , "unsupported/invalid number of samples\n" ) ; return AVERROR_INVALIDDATA ; } if ( s -> ti . bps != avctx -> bits_per_coded_sample ) { avctx -> bits_per_coded_sample = s -> ti . bps ; if ( ( ret = set_bps_params ( avctx ) ) < 0 ) return ret ; } if ( s -> ti . sample_rate != avctx -> sample_rate ) { avctx -> sample_rate = s -> ti . sample_rate ; set_sample_rate_params ( avctx ) ; } if ( s -> ti . ch_layout ) avctx -> channel_layout = s -> ti . ch_layout ; avctx -> channels = s -> ti . channels ; s -> nb_samples = s -> ti . last_frame_samples ? s -> ti . last_frame_samples : s -> ti . frame_samples ; frame -> nb_samples = s -> nb_samples ; if ( ( ret = ff_get_buffer ( avctx , frame ) ) < 0 ) return ret ; if ( avctx -> bits_per_coded_sample <= 16 ) { int buf_size = av_samples_get_buffer_size ( NULL , avctx -> channels , s -> nb_samples , AV_SAMPLE_FMT_S32P , 0 ) ; av_fast_malloc ( & s -> decode_buffer , & s -> decode_buffer_size , buf_size ) ; if ( ! s -> decode_buffer ) return AVERROR ( ENOMEM ) ; ret = av_samples_fill_arrays ( ( uint8_t * * ) s -> decoded , NULL , s -> decode_buffer , avctx -> channels , s -> nb_samples , AV_SAMPLE_FMT_S32P , 0 ) ; if ( ret < 0 ) return ret ; } else { for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) s -> decoded [ chan ] = ( int32_t * ) frame -> extended_data [ chan ] ; } if ( s -> nb_samples < 16 ) { for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) { int32_t * decoded = s -> decoded [ chan ] ; for ( i = 0 ; i < s -> nb_samples ; i ++ ) decoded [ i ] = get_sbits ( gb , avctx -> bits_per_coded_sample ) ; } } else { if ( s -> ti . codec == TAK_CODEC_MONO_STEREO ) { for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) if ( ret = decode_channel ( s , chan ) ) return ret ; if ( avctx -> channels == 2 ) { if ( get_bits1 ( gb ) ) { skip_bits ( gb , 6 ) ; } s -> dmode = get_bits ( gb , 3 ) ; if ( ret = decorrelate ( s , 0 , 1 , s -> nb_samples - 1 ) ) return ret ; } } else if ( s -> ti . codec == TAK_CODEC_MULTICHANNEL ) { if ( get_bits1 ( gb ) ) { int ch_mask = 0 ; chan = get_bits ( gb , 4 ) + 1 ; if ( chan > avctx -> channels ) return AVERROR_INVALIDDATA ; for ( i = 0 ; i < chan ; i ++ ) { int nbit = get_bits ( gb , 4 ) ; if ( nbit >= avctx -> channels ) return AVERROR_INVALIDDATA ; if ( ch_mask & 1 << nbit ) return AVERROR_INVALIDDATA ; s -> mcdparams [ i ] . present = get_bits1 ( gb ) ; if ( s -> mcdparams [ i ] . present ) { s -> mcdparams [ i ] . index = get_bits ( gb , 2 ) ; s -> mcdparams [ i ] . chan2 = get_bits ( gb , 4 ) ; if ( s -> mcdparams [ i ] . index == 1 ) { if ( ( nbit == s -> mcdparams [ i ] . chan2 ) || ( ch_mask & 1 << s -> mcdparams [ i ] . chan2 ) ) return AVERROR_INVALIDDATA ; ch_mask |= 1 << s -> mcdparams [ i ] . chan2 ; } else if ( ! ( ch_mask & 1 << s -> mcdparams [ i ] . chan2 ) ) { return AVERROR_INVALIDDATA ; } } s -> mcdparams [ i ] . chan1 = nbit ; ch_mask |= 1 << nbit ; } } else { chan = avctx -> channels ; for ( i = 0 ; i < chan ; i ++ ) { s -> mcdparams [ i ] . present = 0 ; s -> mcdparams [ i ] . chan1 = i ; } } for ( i = 0 ; i < chan ; i ++ ) { if ( s -> mcdparams [ i ] . present && s -> mcdparams [ i ] . index == 1 ) if ( ret = decode_channel ( s , s -> mcdparams [ i ] . chan2 ) ) return ret ; if ( ret = decode_channel ( s , s -> mcdparams [ i ] . chan1 ) ) return ret ; if ( s -> mcdparams [ i ] . present ) { s -> dmode = mc_dmodes [ s -> mcdparams [ i ] . index ] ; if ( ret = decorrelate ( s , s -> mcdparams [ i ] . chan2 , s -> mcdparams [ i ] . chan1 , s -> nb_samples - 1 ) ) return ret ; } } } for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) { int32_t * decoded = s -> decoded [ chan ] ; if ( s -> lpc_mode [ chan ] ) decode_lpc ( decoded , s -> lpc_mode [ chan ] , s -> nb_samples ) ; if ( s -> sample_shift [ chan ] > 0 ) for ( i = 0 ; i < s -> nb_samples ; i ++ ) decoded [ i ] <<= s -> sample_shift [ chan ] ; } } align_get_bits ( gb ) ; skip_bits ( gb , 24 ) ; if ( get_bits_left ( gb ) < 0 ) av_log ( avctx , AV_LOG_DEBUG , "overread\n" ) ; else if ( get_bits_left ( gb ) > 0 ) av_log ( avctx , AV_LOG_DEBUG , "underread\n" ) ; if ( avctx -> err_recognition & AV_EF_CRCCHECK ) { if ( ff_tak_check_crc ( pkt -> data + hsize , get_bits_count ( gb ) / 8 - hsize ) ) { av_log ( avctx , AV_LOG_ERROR , "CRC error\n" ) ; return AVERROR_INVALIDDATA ; } } switch ( avctx -> sample_fmt ) { case AV_SAMPLE_FMT_U8P : for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) { uint8_t * samples = ( uint8_t * ) frame -> extended_data [ chan ] ; int32_t * decoded = s -> decoded [ chan ] ; for ( i = 0 ; i < s -> nb_samples ; i ++ ) samples [ i ] = decoded [ i ] + 0x80 ; } break ; case AV_SAMPLE_FMT_S16P : for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) { int16_t * samples = ( int16_t * ) frame -> extended_data [ chan ] ; int32_t * decoded = s -> decoded [ chan ] ; for ( i = 0 ; i < s -> nb_samples ; i ++ ) samples [ i ] = decoded [ i ] ; } break ; case AV_SAMPLE_FMT_S32P : for ( chan = 0 ; chan < avctx -> channels ; chan ++ ) { int32_t * samples = ( int32_t * ) frame -> extended_data [ chan ] ; for ( i = 0 ; i < s -> nb_samples ; i ++ ) samples [ i ] <<= 8 ; } break ; } * got_frame_ptr = 1 ; return pkt -> size ; }
8,320,716,512,483,418,000
chrome
5
1
void vp9_idct32x32_add ( const int16_t * input , uint8_t * dest , int stride , int eob ) { if ( eob == 1 ) vp9_idct32x32_1_add ( input , dest , stride ) ; else if ( eob <= 34 ) vp9_idct32x32_34_add ( input , dest , stride ) ; else vp9_idct32x32_1024_add ( input , dest , stride ) ; }
-673,406,620,978,847,500
chrome
14
0
TEST_F ( WebFrameTest , ShowVirtualKeyboardOnElementFocus ) { FrameTestHelpers : : WebViewHelper web_view_helper ; web_view_helper . InitializeRemote ( ) ; ShowVirtualKeyboardObserverWidgetClient web_widget_client ; WebLocalFrameImpl * local_frame = FrameTestHelpers : : CreateLocalChild ( * web_view_helper . RemoteMainFrame ( ) , "child" , WebFrameOwnerProperties ( ) , nullptr , nullptr , & web_widget_client ) ; RegisterMockedHttpURLLoad ( "input_field_default.html" ) ; FrameTestHelpers : : LoadFrame ( local_frame , base_url_ + "input_field_default.html" ) ; Frame : : NotifyUserActivation ( local_frame -> GetFrame ( ) , UserGestureToken : : kNewGesture ) ; local_frame -> ExecuteScript ( WebScriptSource ( "window.focus(); " "document.querySelector('input').focus(); " ) ) ; EXPECT_TRUE ( web_widget_client . DidShowVirtualKeyboard ( ) ) ; web_view_helper . Reset ( ) ; }
-673,406,620,978,847,500
chrome
32
0
TEST_F ( WebFrameSimTest , ScrollFocusedIntoViewClipped ) { UseAndroidSettings ( ) ; WebView ( ) . Resize ( WebSize ( 400 , 600 ) ) ; WebView ( ) . EnableFakePageScaleAnimationForTesting ( true ) ; WebView ( ) . GetPage ( ) -> GetSettings ( ) . SetTextAutosizingEnabled ( false ) ; SimRequest request ( "https://example.com/test.html" , "text/html" ) ; LoadURL ( "https://example.com/test.html" ) ; request . Complete ( R "HTML( < ! DOCTYPE html > < style > : : - webkit - scrollbar { width : 0px ; height : 0px ; } body , html { margin : 0px ; width : 100 % ; height : 100 % ; } input { padding : 0 ; position : relative ; top : 1400px ; width : 100px ; height : 20px ; } # clip { width : 100 % ; height : 100 % ; overflow : hidden ; } # container { width : 980px ; height : 1470px ; }
1,223,258,652,239,369,200
debian
24
0
SPL_METHOD ( DirectoryIterator , getExtension ) { spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; char * fname = NULL ; const char * p ; size_t flen ; int idx ; if ( zend_parse_parameters_none ( ) == FAILURE ) { return ; } php_basename ( intern -> u . dir . entry . d_name , strlen ( intern -> u . dir . entry . d_name ) , NULL , 0 , & fname , & flen TSRMLS_CC ) ; p = zend_memrchr ( fname , '.' , flen ) ; if ( p ) { idx = p - fname ; RETVAL_STRINGL ( fname + idx + 1 , flen - idx - 1 , 1 ) ; efree ( fname ) ; return ; } else { if ( fname ) { efree ( fname ) ; } RETURN_EMPTY_STRING ( ) ; } }
-1,983,921,383,858,884,000
debian
44
1
static int ipvideo_decode_block_opcode_0xA ( IpvideoContext * s ) { int x , y ; unsigned char P [ 8 ] ; int flags = 0 ; bytestream2_get_buffer ( & s -> stream_ptr , P , 4 ) ; if ( P [ 0 ] <= P [ 1 ] ) { for ( y = 0 ; y < 16 ; y ++ ) { if ( ! ( y & 3 ) ) { if ( y ) bytestream2_get_buffer ( & s -> stream_ptr , P , 4 ) ; flags = bytestream2_get_le32 ( & s -> stream_ptr ) ; } for ( x = 0 ; x < 4 ; x ++ , flags >>= 2 ) * s -> pixel_ptr ++ = P [ flags & 0x03 ] ; s -> pixel_ptr += s -> stride - 4 ; if ( y == 7 ) s -> pixel_ptr -= 8 * s -> stride - 4 ; } } else { int vert ; uint64_t flags = bytestream2_get_le64 ( & s -> stream_ptr ) ; bytestream2_get_buffer ( & s -> stream_ptr , P + 4 , 4 ) ; vert = P [ 4 ] <= P [ 5 ] ; for ( y = 0 ; y < 16 ; y ++ ) { for ( x = 0 ; x < 4 ; x ++ , flags >>= 2 ) * s -> pixel_ptr ++ = P [ flags & 0x03 ] ; if ( vert ) { s -> pixel_ptr += s -> stride - 4 ; if ( y == 7 ) s -> pixel_ptr -= 8 * s -> stride - 4 ; } else if ( y & 1 ) s -> pixel_ptr += s -> line_inc ; if ( y == 7 ) { memcpy ( P , P + 4 , 4 ) ; flags = bytestream2_get_le64 ( & s -> stream_ptr ) ; } } } return 0 ; }
6,667,142,528,452,942,000
debian
101
0
static my_bool get_one_option ( int optid , const struct my_option * opt __attribute__ ( ( unused ) ) , char * argument ) { switch ( optid ) { case 'p' : if ( argument == disabled_my_option ) argument = ( char * ) "" ; if ( argument ) { char * start = argument ; my_free ( opt_password ) ; opt_password = my_strdup ( argument , MYF ( MY_FAE ) ) ; while ( * argument ) * argument ++ = 'x' ; if ( * start ) start [ 1 ] = 0 ; tty_password = 0 ; } else tty_password = 1 ; break ; case 'r' : if ( ! ( md_result_file = my_fopen ( argument , O_WRONLY | FILE_BINARY , MYF ( MY_WME ) ) ) ) exit ( 1 ) ; break ; case 'W' : # ifdef __WIN__ opt_protocol = MYSQL_PROTOCOL_PIPE ; # endif break ; case 'N' : opt_set_charset = 0 ; break ; case 'T' : opt_disable_keys = 0 ; if ( strlen ( argument ) >= FN_REFLEN ) { die ( EX_USAGE , "Input filename too long: %s" , argument ) ; } break ; case '#' : DBUG_PUSH ( argument ? argument : default_dbug_option ) ; debug_check_flag = 1 ; break ; # include < sslopt - case . h > case 'V' : print_version ( ) ; exit ( 0 ) ; case 'X' : opt_xml = 1 ; extended_insert = opt_drop = opt_lock = opt_disable_keys = opt_autocommit = opt_create_db = 0 ; break ; case 'i' : opt_comments_used = 1 ; break ; case 'I' : case '?' : usage ( ) ; exit ( 0 ) ; case ( int ) OPT_MASTER_DATA : if ( ! argument ) opt_master_data = MYSQL_OPT_MASTER_DATA_EFFECTIVE_SQL ; break ; case ( int ) OPT_MYSQLDUMP_SLAVE_DATA : if ( ! argument ) opt_slave_data = MYSQL_OPT_SLAVE_DATA_EFFECTIVE_SQL ; break ; case ( int ) OPT_OPTIMIZE : extended_insert = opt_drop = opt_lock = quick = create_options = opt_disable_keys = lock_tables = opt_set_charset = 1 ; break ; case ( int ) OPT_SKIP_OPTIMIZATION : extended_insert = opt_drop = opt_lock = quick = create_options = opt_disable_keys = lock_tables = opt_set_charset = 0 ; break ; case ( int ) OPT_COMPACT : if ( opt_compact ) { opt_comments = opt_drop = opt_disable_keys = opt_lock = 0 ; opt_set_charset = 0 ; } break ; case ( int ) OPT_TABLES : opt_databases = 0 ; break ; case ( int ) OPT_IGNORE_TABLE : { if ( ! strchr ( argument , '.' ) ) { fprintf ( stderr , "Illegal use of option --ignore-table=<database>.<table>\n" ) ; exit ( 1 ) ; } if ( my_hash_insert ( & ignore_table , ( uchar * ) my_strdup ( argument , MYF ( 0 ) ) ) ) exit ( EX_EOM ) ; break ; } case ( int ) OPT_COMPATIBLE : { char buff [ 255 ] ; char * end = compatible_mode_normal_str ; int i ; ulong mode ; uint err_len ; opt_quoted = 1 ; opt_set_charset = 0 ; opt_compatible_mode_str = argument ; opt_compatible_mode = find_set ( & compatible_mode_typelib , argument , strlen ( argument ) , & err_ptr , & err_len ) ; if ( err_len ) { strmake ( buff , err_ptr , min ( sizeof ( buff ) - 1 , err_len ) ) ; fprintf ( stderr , "Invalid mode to --compatible: %s\n" , buff ) ; exit ( 1 ) ; } # if ! defined ( DBUG_OFF ) { size_t size_for_sql_mode = 0 ; const char * * ptr ; for ( ptr = compatible_mode_names ; * ptr ; ptr ++ ) size_for_sql_mode += strlen ( * ptr ) ; size_for_sql_mode += sizeof ( compatible_mode_names ) - 1 ; DBUG_ASSERT ( sizeof ( compatible_mode_normal_str ) >= size_for_sql_mode ) ; } # endif mode = opt_compatible_mode ; for ( i = 0 , mode = opt_compatible_mode ; mode ; mode >>= 1 , i ++ ) { if ( mode & 1 ) { end = strmov ( end , compatible_mode_names [ i ] ) ; end = strmov ( end , "," ) ; } } if ( end != compatible_mode_normal_str ) end [ - 1 ] = 0 ; if ( default_charset == mysql_universal_client_charset ) default_charset = ( char * ) MYSQL_DEFAULT_CHARSET_NAME ; break ; } case ( int ) OPT_MYSQL_PROTOCOL : opt_protocol = find_type_or_exit ( argument , & sql_protocol_typelib , opt -> name ) ; break ; } return 0 ; }
7,889,142,355,347,192,000
debian
28
0
int udpv6_queue_rcv_skb ( struct sock * sk , struct sk_buff * skb ) { struct udp_sock * up = udp_sk ( sk ) ; int rc ; int is_udplite = IS_UDPLITE ( sk ) ; if ( ! xfrm6_policy_check ( sk , XFRM_POLICY_IN , skb ) ) goto drop ; if ( ( is_udplite & UDPLITE_RECV_CC ) && UDP_SKB_CB ( skb ) -> partial_cov ) { if ( up -> pcrlen == 0 ) { LIMIT_NETDEBUG ( KERN_WARNING "UDPLITE6: partial coverage" " %d while full coverage %d requested\n" , UDP_SKB_CB ( skb ) -> cscov , skb -> len ) ; goto drop ; } if ( UDP_SKB_CB ( skb ) -> cscov < up -> pcrlen ) { LIMIT_NETDEBUG ( KERN_WARNING "UDPLITE6: coverage %d " "too small, need min %d\n" , UDP_SKB_CB ( skb ) -> cscov , up -> pcrlen ) ; goto drop ; } } if ( sk -> sk_filter ) { if ( udp_lib_checksum_complete ( skb ) ) goto drop ; } if ( ( rc = ip_queue_rcv_skb ( sk , skb ) ) < 0 ) { if ( rc == - ENOMEM ) UDP6_INC_STATS_BH ( sock_net ( sk ) , UDP_MIB_RCVBUFERRORS , is_udplite ) ; goto drop_no_sk_drops_inc ; } return 0 ; drop : atomic_inc ( & sk -> sk_drops ) ; drop_no_sk_drops_inc : UDP6_INC_STATS_BH ( sock_net ( sk ) , UDP_MIB_INERRORS , is_udplite ) ; kfree_skb ( skb ) ; return - 1 ; }
6,120,640,898,537,304,000
debian
95
0
static void pdf_process_extgstate ( fz_context * ctx , pdf_processor * proc , pdf_csi * csi , pdf_obj * dict ) { pdf_obj * obj ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_LW ) ; if ( pdf_is_number ( ctx , obj ) && proc -> op_w ) proc -> op_w ( ctx , proc , pdf_to_real ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_LC ) ; if ( pdf_is_int ( ctx , obj ) && proc -> op_J ) proc -> op_J ( ctx , proc , fz_clampi ( pdf_to_int ( ctx , obj ) , 0 , 2 ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_LJ ) ; if ( pdf_is_int ( ctx , obj ) && proc -> op_j ) proc -> op_j ( ctx , proc , fz_clampi ( pdf_to_int ( ctx , obj ) , 0 , 2 ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_ML ) ; if ( pdf_is_number ( ctx , obj ) && proc -> op_M ) proc -> op_M ( ctx , proc , pdf_to_real ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_D ) ; if ( pdf_is_array ( ctx , obj ) && proc -> op_d ) { pdf_obj * dash_array = pdf_array_get ( ctx , obj , 0 ) ; pdf_obj * dash_phase = pdf_array_get ( ctx , obj , 1 ) ; proc -> op_d ( ctx , proc , dash_array , pdf_to_real ( ctx , dash_phase ) ) ; } obj = pdf_dict_get ( ctx , dict , PDF_NAME_RI ) ; if ( pdf_is_name ( ctx , obj ) && proc -> op_ri ) proc -> op_ri ( ctx , proc , pdf_to_name ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_FL ) ; if ( pdf_is_number ( ctx , obj ) && proc -> op_i ) proc -> op_i ( ctx , proc , pdf_to_real ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_Font ) ; if ( pdf_is_array ( ctx , obj ) && proc -> op_Tf ) { pdf_obj * font_ref = pdf_array_get ( ctx , obj , 0 ) ; pdf_obj * font_size = pdf_array_get ( ctx , obj , 1 ) ; pdf_font_desc * font = load_font_or_hail_mary ( ctx , csi -> doc , csi -> rdb , font_ref , 0 , csi -> cookie ) ; fz_try ( ctx ) proc -> op_Tf ( ctx , proc , "ExtGState" , font , pdf_to_real ( ctx , font_size ) ) ; fz_always ( ctx ) pdf_drop_font ( ctx , font ) ; fz_catch ( ctx ) fz_rethrow ( ctx ) ; } obj = pdf_dict_get ( ctx , dict , PDF_NAME_OP ) ; if ( pdf_is_bool ( ctx , obj ) && proc -> op_gs_OP ) proc -> op_gs_OP ( ctx , proc , pdf_to_bool ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_op ) ; if ( pdf_is_bool ( ctx , obj ) && proc -> op_gs_op ) proc -> op_gs_op ( ctx , proc , pdf_to_bool ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_OPM ) ; if ( pdf_is_int ( ctx , obj ) && proc -> op_gs_OPM ) proc -> op_gs_OPM ( ctx , proc , pdf_to_int ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_UseBlackPtComp ) ; if ( pdf_is_name ( ctx , obj ) && proc -> op_gs_UseBlackPtComp ) proc -> op_gs_UseBlackPtComp ( ctx , proc , obj ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_TR2 ) ; if ( pdf_is_name ( ctx , obj ) ) if ( ! pdf_name_eq ( ctx , obj , PDF_NAME_Identity ) && ! pdf_name_eq ( ctx , obj , PDF_NAME_Default ) ) fz_warn ( ctx , "ignoring transfer function" ) ; if ( ! obj ) { pdf_obj * tr = pdf_dict_get ( ctx , dict , PDF_NAME_TR ) ; if ( pdf_is_name ( ctx , tr ) ) if ( ! pdf_name_eq ( ctx , tr , PDF_NAME_Identity ) ) fz_warn ( ctx , "ignoring transfer function" ) ; } obj = pdf_dict_get ( ctx , dict , PDF_NAME_CA ) ; if ( pdf_is_number ( ctx , obj ) && proc -> op_gs_CA ) proc -> op_gs_CA ( ctx , proc , pdf_to_real ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_ca ) ; if ( pdf_is_number ( ctx , obj ) && proc -> op_gs_ca ) proc -> op_gs_ca ( ctx , proc , pdf_to_real ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_BM ) ; if ( pdf_is_array ( ctx , obj ) ) obj = pdf_array_get ( ctx , obj , 0 ) ; if ( pdf_is_name ( ctx , obj ) && proc -> op_gs_BM ) proc -> op_gs_BM ( ctx , proc , pdf_to_name ( ctx , obj ) ) ; obj = pdf_dict_get ( ctx , dict , PDF_NAME_SMask ) ; if ( proc -> op_gs_SMask ) { if ( pdf_is_dict ( ctx , obj ) ) { pdf_xobject * xobj ; pdf_obj * group , * s , * bc , * tr ; float softmask_bc [ FZ_MAX_COLORS ] ; fz_colorspace * colorspace ; int colorspace_n = 1 ; int k , luminosity ; fz_var ( xobj ) ; group = pdf_dict_get ( ctx , obj , PDF_NAME_G ) ; xobj = pdf_load_xobject ( ctx , csi -> doc , group ) ; fz_try ( ctx ) { colorspace = pdf_xobject_colorspace ( ctx , xobj ) ; if ( colorspace ) colorspace_n = fz_colorspace_n ( ctx , colorspace ) ; for ( k = 0 ; k < colorspace_n ; k ++ ) softmask_bc [ k ] = 0 ; if ( fz_colorspace_is_cmyk ( ctx , colorspace ) ) softmask_bc [ 3 ] = 1.0f ; fz_drop_colorspace ( ctx , colorspace ) ; bc = pdf_dict_get ( ctx , obj , PDF_NAME_BC ) ; if ( pdf_is_array ( ctx , bc ) ) { for ( k = 0 ; k < colorspace_n ; k ++ ) softmask_bc [ k ] = pdf_to_real ( ctx , pdf_array_get ( ctx , bc , k ) ) ; } s = pdf_dict_get ( ctx , obj , PDF_NAME_S ) ; if ( pdf_name_eq ( ctx , s , PDF_NAME_Luminosity ) ) luminosity = 1 ; else luminosity = 0 ; tr = pdf_dict_get ( ctx , obj , PDF_NAME_TR ) ; if ( tr && ! pdf_name_eq ( ctx , tr , PDF_NAME_Identity ) ) fz_warn ( ctx , "ignoring transfer function" ) ; proc -> op_gs_SMask ( ctx , proc , xobj , csi -> rdb , softmask_bc , luminosity ) ; } fz_always ( ctx ) { pdf_drop_xobject ( ctx , xobj ) ; } fz_catch ( ctx ) { fz_rethrow ( ctx ) ; } } else if ( pdf_is_name ( ctx , obj ) && pdf_name_eq ( ctx , obj , PDF_NAME_None ) ) { proc -> op_gs_SMask ( ctx , proc , NULL , NULL , NULL , 0 ) ; } } }
2,546,373,479,020,365,300
debian
5
0
void mime_field_value_set_date ( HdrHeap * heap , MIMEHdrImpl * mh , MIMEField * field , time_t value ) { char buf [ 33 ] ; int len = mime_format_date ( buf , value ) ; mime_field_value_set ( heap , mh , field , buf , len , true ) ; }
-7,549,575,329,765,818,000
debian
14
0
char * curl_easy_unescape ( struct Curl_easy * data , const char * string , int length , int * olen ) { char * str = NULL ; if ( length >= 0 ) { size_t inputlen = length ; size_t outputlen ; CURLcode res = Curl_urldecode ( data , string , inputlen , & str , & outputlen , FALSE ) ; if ( res ) return NULL ; if ( olen ) { if ( outputlen <= ( size_t ) INT_MAX ) * olen = curlx_uztosi ( outputlen ) ; else Curl_safefree ( str ) ; } } return str ; }
3,668,456,668,028,960,000
debian
6
0
static VALUE cState_depth_set ( VALUE self , VALUE depth ) { GET_STATE ( self ) ; Check_Type ( depth , T_FIXNUM ) ; state -> depth = FIX2LONG ( depth ) ; return Qnil ; }
1,700,977,331,036,764,400
debian
4
0
int EVP_CipherUpdate ( EVP_CIPHER_CTX * ctx , unsigned char * out , int * outl , const unsigned char * in , int inl ) { if ( ctx -> encrypt ) return EVP_EncryptUpdate ( ctx , out , outl , in , inl ) ; else return EVP_DecryptUpdate ( ctx , out , outl , in , inl ) ; }
6,700,989,317,311,037,000
chrome
97
0
void vp9_set_speed_features ( VP9_COMP * cpi ) { SPEED_FEATURES * const sf = & cpi -> sf ; VP9_COMMON * const cm = & cpi -> common ; const VP9EncoderConfig * const oxcf = & cpi -> oxcf ; int i ; sf -> frame_parameter_update = 1 ; sf -> mv . search_method = NSTEP ; sf -> recode_loop = ALLOW_RECODE ; sf -> mv . subpel_search_method = SUBPEL_TREE ; sf -> mv . subpel_iters_per_step = 2 ; sf -> mv . subpel_force_stop = 0 ; sf -> optimize_coefficients = ! is_lossless_requested ( & cpi -> oxcf ) ; sf -> mv . reduce_first_step_size = 0 ; sf -> mv . auto_mv_step_size = 0 ; sf -> mv . fullpel_search_step_param = 6 ; sf -> comp_inter_joint_search_thresh = BLOCK_4X4 ; sf -> adaptive_rd_thresh = 0 ; sf -> use_lastframe_partitioning = LAST_FRAME_PARTITION_OFF ; sf -> tx_size_search_method = USE_FULL_RD ; sf -> use_lp32x32fdct = 0 ; sf -> adaptive_motion_search = 0 ; sf -> adaptive_pred_interp_filter = 0 ; sf -> adaptive_mode_search = 0 ; sf -> cb_pred_filter_search = 0 ; sf -> cb_partition_search = 0 ; sf -> motion_field_mode_search = 0 ; sf -> alt_ref_search_fp = 0 ; sf -> use_quant_fp = 0 ; sf -> reference_masking = 0 ; sf -> partition_search_type = SEARCH_PARTITION ; sf -> less_rectangular_check = 0 ; sf -> use_square_partition_only = 0 ; sf -> auto_min_max_partition_size = NOT_IN_USE ; sf -> max_partition_size = BLOCK_64X64 ; sf -> min_partition_size = BLOCK_4X4 ; sf -> adjust_partitioning_from_last_frame = 0 ; sf -> last_partitioning_redo_frequency = 4 ; sf -> constrain_copy_partition = 0 ; sf -> disable_split_mask = 0 ; sf -> mode_search_skip_flags = 0 ; sf -> force_frame_boost = 0 ; sf -> max_delta_qindex = 0 ; sf -> disable_filter_search_var_thresh = 0 ; sf -> adaptive_interp_filter_search = 0 ; for ( i = 0 ; i < TX_SIZES ; i ++ ) { sf -> intra_y_mode_mask [ i ] = INTRA_ALL ; sf -> intra_uv_mode_mask [ i ] = INTRA_ALL ; } sf -> use_rd_breakout = 0 ; sf -> skip_encode_sb = 0 ; sf -> use_uv_intra_rd_estimate = 0 ; sf -> allow_skip_recode = 0 ; sf -> lpf_pick = LPF_PICK_FROM_FULL_IMAGE ; sf -> use_fast_coef_updates = TWO_LOOP ; sf -> use_fast_coef_costing = 0 ; sf -> mode_skip_start = MAX_MODES ; sf -> schedule_mode_search = 0 ; sf -> use_nonrd_pick_mode = 0 ; for ( i = 0 ; i < BLOCK_SIZES ; ++ i ) sf -> inter_mode_mask [ i ] = INTER_ALL ; sf -> max_intra_bsize = BLOCK_64X64 ; sf -> reuse_inter_pred_sby = 0 ; sf -> always_this_block_size = BLOCK_16X16 ; sf -> search_type_check_frequency = 50 ; sf -> encode_breakout_thresh = 0 ; sf -> elevate_newmv_thresh = 0 ; sf -> recode_tolerance = 25 ; sf -> default_interp_filter = SWITCHABLE ; sf -> tx_size_search_breakout = 0 ; sf -> partition_search_breakout_dist_thr = 0 ; sf -> partition_search_breakout_rate_thr = 0 ; if ( oxcf -> mode == REALTIME ) set_rt_speed_feature ( cpi , sf , oxcf -> speed , oxcf -> content ) ; else if ( oxcf -> mode == GOOD ) set_good_speed_feature ( cpi , cm , sf , oxcf -> speed ) ; cpi -> full_search_sad = vp9_full_search_sad ; cpi -> diamond_search_sad = oxcf -> mode == BEST ? vp9_full_range_search : vp9_diamond_search_sad ; cpi -> refining_search_sad = vp9_refining_search_sad ; if ( oxcf -> pass == 1 ) sf -> optimize_coefficients = 0 ; if ( oxcf -> pass == 0 ) { sf -> recode_loop = DISALLOW_RECODE ; sf -> optimize_coefficients = 0 ; } if ( sf -> mv . subpel_search_method == SUBPEL_TREE ) { cpi -> find_fractional_mv_step = vp9_find_best_sub_pixel_tree ; } else if ( sf -> mv . subpel_search_method == SUBPEL_TREE_PRUNED ) { cpi -> find_fractional_mv_step = vp9_find_best_sub_pixel_tree_pruned ; } cpi -> mb . optimize = sf -> optimize_coefficients == 1 && oxcf -> pass != 1 ; if ( sf -> disable_split_mask == DISABLE_ALL_SPLIT ) sf -> adaptive_pred_interp_filter = 0 ; if ( ! cpi -> oxcf . frame_periodic_boost ) { sf -> max_delta_qindex = 0 ; } if ( cpi -> encode_breakout && oxcf -> mode == REALTIME && sf -> encode_breakout_thresh > cpi -> encode_breakout ) cpi -> encode_breakout = sf -> encode_breakout_thresh ; }
-2,648,356,651,055,439,400
debian
48
0
static void mcc_mnc_aux ( guint8 * octs , gchar * mcc , gchar * mnc ) { if ( ( octs [ 0 ] & 0x0f ) <= 9 ) { mcc [ 0 ] = Dgt_tbcd . out [ octs [ 0 ] & 0x0f ] ; } else { mcc [ 0 ] = ( octs [ 0 ] & 0x0f ) + 55 ; } if ( ( ( octs [ 0 ] & 0xf0 ) >> 4 ) <= 9 ) { mcc [ 1 ] = Dgt_tbcd . out [ ( octs [ 0 ] & 0xf0 ) >> 4 ] ; } else { mcc [ 1 ] = ( ( octs [ 0 ] & 0xf0 ) >> 4 ) + 55 ; } if ( ( octs [ 1 ] & 0x0f ) <= 9 ) { mcc [ 2 ] = Dgt_tbcd . out [ octs [ 1 ] & 0x0f ] ; } else { mcc [ 2 ] = ( octs [ 1 ] & 0x0f ) + 55 ; } mcc [ 3 ] = '\0' ; if ( ( ( octs [ 1 ] & 0xf0 ) >> 4 ) <= 9 ) { mnc [ 2 ] = Dgt_tbcd . out [ ( octs [ 1 ] & 0xf0 ) >> 4 ] ; } else { mnc [ 2 ] = ( ( octs [ 1 ] & 0xf0 ) >> 4 ) + 55 ; } if ( ( octs [ 2 ] & 0x0f ) <= 9 ) { mnc [ 0 ] = Dgt_tbcd . out [ octs [ 2 ] & 0x0f ] ; } else { mnc [ 0 ] = ( octs [ 2 ] & 0x0f ) + 55 ; } if ( ( ( octs [ 2 ] & 0xf0 ) >> 4 ) <= 9 ) { mnc [ 1 ] = Dgt_tbcd . out [ ( octs [ 2 ] & 0xf0 ) >> 4 ] ; } else { mnc [ 1 ] = ( ( octs [ 2 ] & 0xf0 ) >> 4 ) + 55 ; } if ( mnc [ 1 ] == 'F' ) { mnc [ 1 ] = '\0' ; } else if ( mnc [ 2 ] == 'F' ) { mnc [ 2 ] = '\0' ; } else { mnc [ 3 ] = '\0' ; } }
-6,228,844,445,714,760,000
debian
25
1
static void parse_content_disposition ( const char * content_disposition , const char * * filename_r ) { struct rfc822_parser_context parser ; const char * const * results , * filename2 ; string_t * str ; * filename_r = NULL ; if ( content_disposition == NULL ) return ; rfc822_parser_init ( & parser , ( const unsigned char * ) content_disposition , strlen ( content_disposition ) , NULL ) ; rfc822_skip_lwsp ( & parser ) ; str = t_str_new ( 32 ) ; if ( rfc822_parse_mime_token ( & parser , str ) < 0 ) return ; rfc2231_parse ( & parser , & results ) ; filename2 = NULL ; for ( ; * results != NULL ; results += 2 ) { if ( strcasecmp ( results [ 0 ] , "filename" ) == 0 ) { * filename_r = results [ 1 ] ; break ; } if ( strcasecmp ( results [ 0 ] , "filename*" ) == 0 ) filename2 = results [ 1 ] ; } if ( * filename_r == NULL ) { * filename_r = filename2 ; } }
-4,341,894,042,551,388,000
chrome
3
1
static void free_pred_buffer ( PRED_BUFFER * p ) { if ( p != NULL ) p -> in_use = 0 ; }
4,074,282,840,330,367,000
chrome
45
0
int main ( int argc , char * argv [ ] ) { static char buffer [ BUFFER_SIZE ] ; int32_t arg ; if ( argc <= 1 ) { printf ( "Usage: %s [filename]...\n" , argv [ 0 ] ) ; return - 1 ; } for ( arg = 1 ; arg < argc ; arg += 1 ) { FILE * file ; char * filename = argv [ arg ] ; int32_t inputLength , match , matchCount = 0 ; UCharsetDetector * csd ; const UCharsetMatch * * csm ; UErrorCode status = U_ZERO_ERROR ; if ( arg > 1 ) { printf ( "\n" ) ; } file = fopen ( filename , "rb" ) ; if ( file == NULL ) { printf ( "Cannot open file \"%s\"\n\n" , filename ) ; continue ; } printf ( "%s:\n" , filename ) ; inputLength = ( int32_t ) fread ( buffer , 1 , BUFFER_SIZE , file ) ; fclose ( file ) ; csd = ucsdet_open ( & status ) ; ucsdet_setText ( csd , buffer , inputLength , & status ) ; csm = ucsdet_detectAll ( csd , & matchCount , & status ) ; for ( match = 0 ; match < matchCount ; match += 1 ) { const char * name = ucsdet_getName ( csm [ match ] , & status ) ; const char * lang = ucsdet_getLanguage ( csm [ match ] , & status ) ; int32_t confidence = ucsdet_getConfidence ( csm [ match ] , & status ) ; if ( lang == NULL || strlen ( lang ) == 0 ) { lang = "**" ; } printf ( "%s (%s) %d\n" , name , lang , confidence ) ; } ucsdet_close ( csd ) ; } return 0 ; }
-1,983,921,383,858,884,000
debian
18
0
static int copy_from ( IpvideoContext * s , AVFrame * src , AVFrame * dst , int delta_x , int delta_y ) { int current_offset = s -> pixel_ptr - dst -> data [ 0 ] ; int motion_offset = current_offset + delta_y * dst -> linesize [ 0 ] + delta_x * ( 1 + s -> is_16bpp ) ; if ( motion_offset < 0 ) { av_log ( s -> avctx , AV_LOG_ERROR , " Interplay video: motion offset < 0 (%d)\n" , motion_offset ) ; return AVERROR_INVALIDDATA ; } else if ( motion_offset > s -> upper_motion_limit_offset ) { av_log ( s -> avctx , AV_LOG_ERROR , " Interplay video: motion offset above limit (%d >= %d)\n" , motion_offset , s -> upper_motion_limit_offset ) ; return AVERROR_INVALIDDATA ; } if ( src -> data [ 0 ] == NULL ) { av_log ( s -> avctx , AV_LOG_ERROR , "Invalid decode type, corrupted header?\n" ) ; return AVERROR ( EINVAL ) ; } s -> dsp . put_pixels_tab [ ! s -> is_16bpp ] [ 0 ] ( s -> pixel_ptr , src -> data [ 0 ] + motion_offset , dst -> linesize [ 0 ] , 8 ) ; return 0 ; }
825,216,912,438,754,600
debian
4
0
static int dissect_t38_Data_Field ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) { offset = dissect_per_sequence_of ( tvb , offset , actx , tree , hf_index , ett_t38_Data_Field , Data_Field_sequence_of ) ; return offset ; }
-2,127,895,299,879,503,400
debian
9
0
static void macio_ide_initfn ( Object * obj ) { SysBusDevice * d = SYS_BUS_DEVICE ( obj ) ; MACIOIDEState * s = MACIO_IDE ( obj ) ; ide_bus_new ( & s -> bus , sizeof ( s -> bus ) , DEVICE ( obj ) , 0 , 2 ) ; memory_region_init_io ( & s -> mem , obj , & pmac_ide_ops , s , "pmac-ide" , 0x1000 ) ; sysbus_init_mmio ( d , & s -> mem ) ; sysbus_init_irq ( d , & s -> irq ) ; sysbus_init_irq ( d , & s -> dma_irq ) ; }
5,658,404,386,336,979,000
debian
94
1
METHOD ( asn1_parser_t , iterate , bool , private_asn1_parser_t * this , int * objectID , chunk_t * object ) { chunk_t * blob , * blob1 ; u_char * start_ptr ; u_int level ; asn1Object_t obj ; * object = chunk_empty ; obj = this -> objects [ ++ ( this -> line ) ] ; if ( obj . flags & ASN1_EXIT ) { return FALSE ; } if ( obj . flags & ASN1_END ) { if ( this -> loopAddr [ obj . level ] && this -> blobs [ obj . level + 1 ] . len > 0 ) { this -> line = this -> loopAddr [ obj . level ] ; obj = this -> objects [ this -> line ] ; } else { this -> loopAddr [ obj . level ] = 0 ; goto end ; } } level = this -> level0 + obj . level ; blob = this -> blobs + obj . level ; blob1 = blob + 1 ; start_ptr = blob -> ptr ; if ( ( obj . flags & ASN1_DEF ) && ( blob -> len == 0 || * start_ptr != obj . type ) ) { DBG2 ( DBG_ASN , "L%d - %s:" , level , obj . name ) ; if ( obj . type & ASN1_CONSTRUCTED ) { this -> line ++ ; } goto end ; } if ( ( obj . flags & ASN1_OPT ) && ( blob -> len == 0 || * start_ptr != obj . type ) ) { do { this -> line ++ ; } while ( ! ( ( this -> objects [ this -> line ] . flags & ASN1_END ) && ( this -> objects [ this -> line ] . level == obj . level ) ) ) ; goto end ; } if ( blob -> len < 2 ) { DBG1 ( DBG_ASN , "L%d - %s: ASN.1 object smaller than 2 octets" , level , obj . name ) ; this -> success = FALSE ; goto end ; } blob1 -> len = asn1_length ( blob ) ; if ( blob1 -> len == ASN1_INVALID_LENGTH ) { DBG1 ( DBG_ASN , "L%d - %s: length of ASN.1 object invalid or too large" , level , obj . name ) ; this -> success = FALSE ; goto end ; } blob1 -> ptr = blob -> ptr ; blob -> ptr += blob1 -> len ; blob -> len -= blob1 -> len ; if ( obj . flags & ASN1_RAW ) { DBG2 ( DBG_ASN , "L%d - %s:" , level , obj . name ) ; object -> ptr = start_ptr ; object -> len = ( size_t ) ( blob -> ptr - start_ptr ) ; goto end ; } if ( * start_ptr != obj . type && ! ( this -> implicit && this -> line == 0 ) ) { DBG2 ( DBG_ASN , "L%d - %s: ASN1 tag 0x%02x expected, but is 0x%02x" , level , obj . name , obj . type , * start_ptr ) ; DBG3 ( DBG_ASN , "%b" , start_ptr , ( u_int ) ( blob -> ptr - start_ptr ) ) ; this -> success = FALSE ; goto end ; } DBG2 ( DBG_ASN , "L%d - %s:" , level , obj . name ) ; if ( obj . flags & ASN1_LOOP ) { if ( blob1 -> len > 0 ) { this -> loopAddr [ obj . level ] = this -> line + 1 ; } else { do { this -> line ++ ; } while ( ! ( ( this -> objects [ this -> line ] . flags & ASN1_END ) && ( this -> objects [ this -> line ] . level == obj . level ) ) ) ; goto end ; } } if ( obj . flags & ASN1_OBJ ) { object -> ptr = start_ptr ; object -> len = ( size_t ) ( blob -> ptr - start_ptr ) ; if ( this -> private ) { DBG4 ( DBG_ASN , "%B" , object ) ; } else { DBG3 ( DBG_ASN , "%B" , object ) ; } } else if ( obj . flags & ASN1_BODY ) { * object = * blob1 ; asn1_debug_simple_object ( * object , obj . type , this -> private ) ; } end : * objectID = this -> line ; return this -> success ; }
-5,992,472,514,718,425,000
debian
35
0
static bool do_init_cpuset_file ( struct cgroup_mount_point * mp , const char * path , const char * name ) { char value [ 1024 ] ; char * childfile , * parentfile = NULL , * tmp ; int ret ; bool ok = false ; childfile = cgroup_to_absolute_path ( mp , path , name ) ; if ( ! childfile ) return false ; ret = cgroup_read_from_file ( childfile , value , sizeof ( value ) ) ; if ( ret < 0 ) goto out ; if ( value [ 0 ] != '\0' && value [ 0 ] != '\n' ) { ok = true ; goto out ; } parentfile = strdup ( path ) ; if ( ! parentfile ) goto out ; tmp = strrchr ( parentfile , '/' ) ; if ( ! tmp ) goto out ; if ( tmp == parentfile ) tmp ++ ; * tmp = '\0' ; tmp = parentfile ; parentfile = cgroup_to_absolute_path ( mp , tmp , name ) ; free ( tmp ) ; if ( ! parentfile ) goto out ; ret = cgroup_read_from_file ( parentfile , value , sizeof ( value ) ) ; if ( ret < 0 ) goto out ; if ( ret == sizeof ( value ) ) { ERROR ( "parent cpuset value too long" ) ; goto out ; } ok = ( lxc_write_to_file ( childfile , value , strlen ( value ) , false ) >= 0 ) ; if ( ! ok ) SYSERROR ( "failed writing %s" , childfile ) ; out : free ( parentfile ) ; free ( childfile ) ; return ok ; }
4,489,017,523,191,997,000
debian
17
0
static int dissect_h225_DialedDigits ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) { # line 321 "./asn1/h225/h225.cnf" tvbuff_t * value_tvb = NULL ; guint len = 0 ; h225_packet_info * h225_pi ; offset = dissect_per_restricted_character_string ( tvb , offset , actx , tree , hf_index , 1 , 128 , FALSE , "0123456789#*," , 13 , & value_tvb ) ; h225_pi = ( h225_packet_info * ) p_get_proto_data ( wmem_packet_scope ( ) , actx -> pinfo , proto_h225 , 0 ) ; if ( h225_pi && h225_pi -> is_destinationInfo == TRUE ) { if ( value_tvb ) { len = tvb_reported_length ( value_tvb ) ; if ( len > sizeof h225_pi -> dialedDigits - 1 ) len = sizeof h225_pi -> dialedDigits - 1 ; tvb_memcpy ( value_tvb , ( guint8 * ) h225_pi -> dialedDigits , 0 , len ) ; } h225_pi -> dialedDigits [ len ] = '\0' ; h225_pi -> is_destinationInfo = FALSE ; } return offset ; }
1,760,449,185,745,615,400
debian
5
0
void TSVConnActiveTimeoutCancel ( TSVConn connp ) { sdk_assert ( sdk_sanity_check_iocore_structure ( connp ) == TS_SUCCESS ) ; NetVConnection * vc = ( NetVConnection * ) connp ; vc -> cancel_active_timeout ( ) ; }
-2,928,324,134,072,492,500
debian
4
0
static void free_iax2_info ( gpointer p ) { iax2_info_t * ii = ( iax2_info_t * ) p ; g_free ( ii ) ; }
7,295,169,435,648,525,000
debian
6
0
static int base_candidate ( BackendDB * be , Entry * e , ID * ids ) { Debug ( LDAP_DEBUG_ARGS , "base_candidates: base: \"%s\" (0x%08lx)\n" , e -> e_nname . bv_val , ( long ) e -> e_id , 0 ) ; ids [ 0 ] = 1 ; ids [ 1 ] = e -> e_id ; return 0 ; }
-1,929,262,071,302,712,000
debian
3
0
static void * Type_U16Fixed16_Dup ( struct _cms_typehandler_struct * self , const void * Ptr , cmsUInt32Number n ) { return _cmsDupMem ( self -> ContextID , Ptr , n * sizeof ( cmsFloat64Number ) ) ; }
589,395,864,685,553,800
debian
8
0
int armv7m_nvic_acknowledge_irq ( void * opaque ) { nvic_state * s = ( nvic_state * ) opaque ; uint32_t irq ; irq = gic_acknowledge_irq ( & s -> gic , 0 ) ; if ( irq == 1023 ) hw_error ( "Interrupt but no vector\n" ) ; if ( irq >= 32 ) irq -= 16 ; return irq ; }
229,962,612,204,197,000
debian
11
0
static void run_request_queue ( void ) { # ifdef USE_CURL_MULTI is_running_queue = 1 ; fill_active_slots ( ) ; add_fill_function ( NULL , fill_active_slot ) ; # endif do { finish_all_active_slots ( ) ; # ifdef USE_CURL_MULTI fill_active_slots ( ) ; # endif } while ( request_queue_head && ! aborted ) ; # ifdef USE_CURL_MULTI is_running_queue = 0 ; # endif }