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
|
---|---|---|---|---|
-2,751,047,985,690,578,400 | debian | 22 | 0 | static void test_keys ( ELG_secret_key * sk , unsigned int nbits ) {
ELG_public_key pk ;
MPI test = mpi_alloc ( 0 ) ;
MPI out1_a = mpi_alloc ( mpi_nlimb_hint_from_nbits ( nbits ) ) ;
MPI out1_b = mpi_alloc ( mpi_nlimb_hint_from_nbits ( nbits ) ) ;
MPI out2 = mpi_alloc ( mpi_nlimb_hint_from_nbits ( nbits ) ) ;
pk . p = sk -> p ;
pk . g = sk -> g ;
pk . y = sk -> y ;
{
char * p = get_random_bits ( nbits , 0 , 0 ) ;
mpi_set_buffer ( test , p , ( nbits + 7 ) / 8 , 0 ) ;
xfree ( p ) ;
}
do_encrypt ( out1_a , out1_b , test , & pk ) ;
decrypt ( out2 , out1_a , out1_b , sk ) ;
if ( mpi_cmp ( test , out2 ) ) log_fatal ( "Elgamal operation: encrypt, decrypt failed\n" ) ;
mpi_free ( test ) ;
mpi_free ( out1_a ) ;
mpi_free ( out1_b ) ;
mpi_free ( out2 ) ;
} |
-5,385,892,304,146,931,000 | debian | 16 | 0 | static void put_payload_header ( AVFormatContext * s , ASFStream * stream , int64_t presentation_time , int m_obj_size , int m_obj_offset , int payload_len , int flags ) {
ASFContext * asf = s -> priv_data ;
AVIOContext * pb = & asf -> pb ;
int val ;
val = stream -> num ;
if ( flags & AV_PKT_FLAG_KEY ) val |= ASF_PL_FLAG_KEY_FRAME ;
avio_w8 ( pb , val ) ;
avio_w8 ( pb , stream -> seq ) ;
avio_wl32 ( pb , m_obj_offset ) ;
avio_w8 ( pb , ASF_PAYLOAD_REPLICATED_DATA_LENGTH ) ;
avio_wl32 ( pb , m_obj_size ) ;
avio_wl32 ( pb , ( uint32_t ) presentation_time ) ;
if ( asf -> multi_payloads_present ) {
avio_wl16 ( pb , payload_len ) ;
}
} |
214,341,372,476,109,920 | debian | 10 | 0 | static void copy_subdir_files ( char * subdir ) {
char old_path [ MAXPGPATH ] ;
char new_path [ MAXPGPATH ] ;
remove_new_subdir ( subdir , true ) ;
snprintf ( old_path , sizeof ( old_path ) , "%s/%s" , old_cluster . pgdata , subdir ) ;
snprintf ( new_path , sizeof ( new_path ) , "%s/%s" , new_cluster . pgdata , subdir ) ;
prep_status ( "Copying old %s to new server" , subdir ) ;
exec_prog ( UTILITY_LOG_FILE , NULL , true , # ifndef WIN32 "cp -Rf \"%s\" \"%s\"" , # else "xcopy /e /y /q /r \"%s\" \"%s\\\"" , # endif old_path , new_path ) ;
check_ok ( ) ;
} |
3,919,646,340,804,521,500 | debian | 43 | 0 | static void get_object_list ( int ac , const char * * av ) {
struct rev_info revs ;
char line [ 1000 ] ;
int flags = 0 ;
init_revisions ( & revs , NULL ) ;
save_commit_buffer = 0 ;
setup_revisions ( ac , av , & revs , NULL ) ;
is_repository_shallow ( ) ;
while ( fgets ( line , sizeof ( line ) , stdin ) != NULL ) {
int len = strlen ( line ) ;
if ( len && line [ len - 1 ] == '\n' ) line [ -- len ] = 0 ;
if ( ! len ) break ;
if ( * line == '-' ) {
if ( ! strcmp ( line , "--not" ) ) {
flags ^= UNINTERESTING ;
write_bitmap_index = 0 ;
continue ;
}
if ( starts_with ( line , "--shallow " ) ) {
unsigned char sha1 [ 20 ] ;
if ( get_sha1_hex ( line + 10 , sha1 ) ) die ( "not an SHA-1 '%s'" , line + 10 ) ;
register_shallow ( sha1 ) ;
use_bitmap_index = 0 ;
continue ;
}
die ( "not a rev '%s'" , line ) ;
}
if ( handle_revision_arg ( line , & revs , flags , REVARG_CANNOT_BE_FILENAME ) ) die ( "bad revision '%s'" , line ) ;
}
if ( use_bitmap_index && ! get_object_list_from_bitmap ( & revs ) ) return ;
if ( prepare_revision_walk ( & revs ) ) die ( "revision walk setup failed" ) ;
mark_edges_uninteresting ( & revs , show_edge ) ;
traverse_commit_list ( & revs , show_commit , show_object , NULL ) ;
if ( unpack_unreachable_expiration ) {
revs . ignore_missing_links = 1 ;
if ( add_unseen_recent_objects_to_traversal ( & revs , unpack_unreachable_expiration ) ) die ( "unable to add recent objects" ) ;
if ( prepare_revision_walk ( & revs ) ) die ( "revision walk setup failed" ) ;
traverse_commit_list ( & revs , record_recent_commit , record_recent_object , NULL ) ;
}
if ( keep_unreachable ) add_objects_in_unpacked_packs ( & revs ) ;
if ( unpack_unreachable ) loosen_unused_packed_objects ( & revs ) ;
sha1_array_clear ( & recent_objects ) ;
} |
7,909,110,399,479,437,000 | chrome | 3 | 0 | hb_set_t * hb_set_reference ( hb_set_t * set ) {
return hb_object_reference ( set ) ;
} |
8,461,266,595,329,035,000 | chrome | 14 | 0 | static int gettime ( struct event_base * base , struct timeval * tp ) {
if ( base -> tv_cache . tv_sec ) {
* tp = base -> tv_cache ;
return ( 0 ) ;
}
# if defined ( HAVE_CLOCK_GETTIME ) && defined ( CLOCK_MONOTONIC ) struct timespec ts ;
if ( use_monotonic && clock_gettime ( CLOCK_MONOTONIC , & ts ) == 0 ) {
tp -> tv_sec = ts . tv_sec ;
tp -> tv_usec = ts . tv_nsec / 1000 ;
return ( 0 ) ;
}
# endif use_monotonic = 0 ;
return ( evutil_gettimeofday ( tp , NULL ) ) ;
} |
6,336,384,260,629,386,000 | debian | 6 | 0 | void proto_reg_handoff_zbee_zcl_basic ( void ) {
dissector_handle_t basic_handle ;
basic_handle = find_dissector ( ZBEE_PROTOABBREV_ZCL_BASIC ) ;
dissector_add_uint ( "zbee.zcl.cluster" , ZBEE_ZCL_CID_BASIC , basic_handle ) ;
zbee_zcl_init_cluster ( proto_zbee_zcl_basic , ett_zbee_zcl_basic , ZBEE_ZCL_CID_BASIC , hf_zbee_zcl_basic_attr_id , hf_zbee_zcl_basic_srv_rx_cmd_id , - 1 , ( zbee_zcl_fn_attr_data ) dissect_zcl_basic_attr_data ) ;
} |
2,713,698,759,296,604,700 | debian | 43 | 0 | static void draw_line ( uint8_t * buf , int sx , int sy , int ex , int ey , int w , int h , int stride , int color ) {
int x , y , fr , f ;
sx = av_clip ( sx , 0 , w - 1 ) ;
sy = av_clip ( sy , 0 , h - 1 ) ;
ex = av_clip ( ex , 0 , w - 1 ) ;
ey = av_clip ( ey , 0 , h - 1 ) ;
buf [ sy * stride + sx ] += color ;
if ( FFABS ( ex - sx ) > FFABS ( ey - sy ) ) {
if ( sx > ex ) {
FFSWAP ( int , sx , ex ) ;
FFSWAP ( int , sy , ey ) ;
}
buf += sx + sy * stride ;
ex -= sx ;
f = ( ( ey - sy ) << 16 ) / ex ;
for ( x = 0 ;
x <= ex ;
x ++ ) {
y = ( x * f ) >> 16 ;
fr = ( x * f ) & 0xFFFF ;
buf [ y * stride + x ] += ( color * ( 0x10000 - fr ) ) >> 16 ;
buf [ ( y + 1 ) * stride + x ] += ( color * fr ) >> 16 ;
}
}
else {
if ( sy > ey ) {
FFSWAP ( int , sx , ex ) ;
FFSWAP ( int , sy , ey ) ;
}
buf += sx + sy * stride ;
ey -= sy ;
if ( ey ) f = ( ( ex - sx ) << 16 ) / ey ;
else f = 0 ;
for ( y = 0 ;
y = ey ;
y ++ ) {
x = ( y * f ) >> 16 ;
fr = ( y * f ) & 0xFFFF ;
buf [ y * stride + x ] += ( color * ( 0x10000 - fr ) ) >> 16 ;
buf [ y * stride + x + 1 ] += ( color * fr ) >> 16 ;
}
}
} |
-2,385,618,084,223,928,300 | debian | 4 | 0 | static void decode_flush ( AVCodecContext * avctx ) {
RALFContext * ctx = avctx -> priv_data ;
ctx -> has_pkt = 0 ;
} |
-1,055,531,103,257,174,900 | debian | 11 | 0 | static GList * completion_joinlist ( GList * list1 , GList * list2 ) {
GList * old ;
old = list2 ;
while ( list2 != NULL ) {
if ( ! glist_find_icase_string ( list1 , list2 -> data ) ) list1 = g_list_append ( list1 , list2 -> data ) ;
else g_free ( list2 -> data ) ;
list2 = list2 -> next ;
}
g_list_free ( old ) ;
return list1 ;
} |
2,713,698,759,296,604,700 | debian | 22 | 0 | static void dct_unquantize_h263_inter_c ( MpegEncContext * s , int16_t * block , int n , int qscale ) {
int i , level , qmul , qadd ;
int nCoeffs ;
assert ( s -> block_last_index [ n ] >= 0 ) ;
qadd = ( qscale - 1 ) | 1 ;
qmul = qscale << 1 ;
nCoeffs = s -> inter_scantable . raster_end [ s -> block_last_index [ n ] ] ;
for ( i = 0 ;
i <= nCoeffs ;
i ++ ) {
level = block [ i ] ;
if ( level ) {
if ( level < 0 ) {
level = level * qmul - qadd ;
}
else {
level = level * qmul + qadd ;
}
block [ i ] = level ;
}
}
} |
-3,740,862,514,502,467,000 | debian | 11 | 0 | static unsigned int hashname ( const char * name ) {
unsigned int hash = 0 ;
while ( * name ) {
unsigned int extra = ( hash >> 27 ) ;
hash <<= 5 ;
hash += * name & 0x1f ;
hash ^= extra ;
++ name ;
}
return ( hash % 257 ) ;
} |
7,039,307,292,471,245,000 | debian | 9 | 0 | static guint16 de_nw_call_ctrl_cap ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len _U_ , gchar * add_string _U_ , int string_len _U_ ) {
guint32 curr_offset ;
curr_offset = offset ;
proto_tree_add_bits_item ( tree , hf_gsm_a_spare_bits , tvb , ( curr_offset << 3 ) , 7 , ENC_BIG_ENDIAN ) ;
proto_tree_add_item ( tree , hf_gsm_a_dtap_mcs , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
curr_offset ++ ;
EXTRANEOUS_DATA_CHECK ( len , curr_offset - offset , pinfo , & ei_gsm_a_dtap_extraneous_data ) ;
return ( len ) ;
} |
-1,055,531,103,257,174,900 | debian | 6 | 0 | static void sig_complete_unalias ( GList * * list , WINDOW_REC * window , const char * word , const char * line , int * want_space ) {
g_return_if_fail ( list != NULL ) ;
g_return_if_fail ( word != NULL ) ;
* list = completion_get_aliases ( word ) ;
if ( * list != NULL ) signal_stop ( ) ;
} |
-5,615,323,818,347,734,000 | debian | 25 | 0 | static void init_sql_statement_names ( ) {
char * first_com = ( char * ) offsetof ( STATUS_VAR , com_stat [ 0 ] ) ;
char * last_com = ( char * ) offsetof ( STATUS_VAR , com_stat [ ( uint ) SQLCOM_END ] ) ;
int record_size = ( char * ) offsetof ( STATUS_VAR , com_stat [ 1 ] ) - ( char * ) offsetof ( STATUS_VAR , com_stat [ 0 ] ) ;
char * ptr ;
uint i ;
uint com_index ;
for ( i = 0 ;
i < ( ( uint ) SQLCOM_END + 1 ) ;
i ++ ) sql_statement_names [ i ] = empty_lex_str ;
SHOW_VAR * var = & com_status_vars [ 0 ] ;
while ( var -> name != NULL ) {
ptr = var -> value ;
if ( ( first_com <= ptr ) && ( ptr <= last_com ) ) {
com_index = ( ( int ) ( ptr - first_com ) ) / record_size ;
DBUG_ASSERT ( com_index < ( uint ) SQLCOM_END ) ;
sql_statement_names [ com_index ] . str = const_cast < char * > ( var -> name ) ;
sql_statement_names [ com_index ] . length = strlen ( var -> name ) ;
}
var ++ ;
}
DBUG_ASSERT ( strcmp ( sql_statement_names [ ( uint ) SQLCOM_SELECT ] . str , "select" ) == 0 ) ;
DBUG_ASSERT ( strcmp ( sql_statement_names [ ( uint ) SQLCOM_SIGNAL ] . str , "signal" ) == 0 ) ;
sql_statement_names [ ( uint ) SQLCOM_END ] . str = const_cast < char * > ( "error" ) ;
} |
-5,640,788,001,150,418,000 | debian | 16 | 0 | void show_setup_info ( tvbuff_t * tvb , proto_tree * tree , t38_conv * p_t38_conversation ) {
proto_tree * t38_setup_tree ;
proto_item * ti ;
if ( ! p_t38_conversation || p_t38_conversation -> setup_frame_number == 0 ) {
return ;
}
ti = proto_tree_add_string_format ( tree , hf_t38_setup , tvb , 0 , 0 , "" , "Stream setup by %s (frame %u)" , p_t38_conversation -> setup_method , p_t38_conversation -> setup_frame_number ) ;
PROTO_ITEM_SET_GENERATED ( ti ) ;
t38_setup_tree = proto_item_add_subtree ( ti , ett_t38_setup ) ;
if ( t38_setup_tree ) {
proto_item * item = proto_tree_add_uint ( t38_setup_tree , hf_t38_setup_frame , tvb , 0 , 0 , p_t38_conversation -> setup_frame_number ) ;
PROTO_ITEM_SET_GENERATED ( item ) ;
item = proto_tree_add_string ( t38_setup_tree , hf_t38_setup_method , tvb , 0 , 0 , p_t38_conversation -> setup_method ) ;
PROTO_ITEM_SET_GENERATED ( item ) ;
}
} |
-6,552,851,419,396,579,000 | debian | 14 | 0 | static int SpoolssSetForm_q ( tvbuff_t * tvb , int offset , packet_info * pinfo , proto_tree * tree , dcerpc_info * di , guint8 * drep _U_ ) {
char * name = NULL ;
guint32 level ;
proto_item * hidden_item ;
hidden_item = proto_tree_add_uint ( tree , hf_form , tvb , offset , 0 , 1 ) ;
PROTO_ITEM_SET_HIDDEN ( hidden_item ) ;
offset = dissect_nt_policy_hnd ( tvb , offset , pinfo , tree , di , drep , hf_hnd , NULL , NULL , FALSE , FALSE ) ;
offset = dissect_ndr_cvstring ( tvb , offset , pinfo , tree , di , drep , sizeof ( guint16 ) , hf_form_name , TRUE , & name ) ;
if ( name ) col_append_fstr ( pinfo -> cinfo , COL_INFO , ", %s" , name ) ;
offset = dissect_ndr_uint32 ( tvb , offset , pinfo , tree , di , drep , hf_form_level , & level ) ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , ", level %d" , level ) ;
offset = dissect_FORM_CTR ( tvb , offset , pinfo , tree , di , drep ) ;
return offset ;
} |
3,804,373,597,256,531,000 | debian | 3 | 0 | inline GRANT_COLUMN * column_hash_search ( GRANT_TABLE * t , const char * cname , uint length ) {
return ( GRANT_COLUMN * ) hash_search ( & t -> hash_columns , ( uchar * ) cname , length ) ;
} |
-2,908,211,205,972,632,000 | debian | 15 | 0 | void mainwindow_destroy ( MAIN_WINDOW_REC * window ) {
g_return_if_fail ( window != NULL ) ;
mainwindows = g_slist_remove ( mainwindows , window ) ;
signal_emit ( "mainwindow destroyed" , 1 , window ) ;
term_window_destroy ( window -> screen_win ) ;
if ( mainwindows != NULL ) {
gui_windows_remove_parent ( window ) ;
if ( ! quitting ) {
mainwindows_add_space ( window ) ;
mainwindows_redraw ( ) ;
}
}
g_free ( window ) ;
if ( active_mainwin == window ) active_mainwin = NULL ;
} |
6,250,095,321,513,210,000 | debian | 21 | 0 | rfbBool rfbFilenameTranslate2UNIX ( rfbClientPtr cl , char * path , char * unixPath , size_t unixPathMaxLen ) {
int x ;
char * home = NULL ;
FILEXFER_ALLOWED_OR_CLOSE_AND_RETURN ( "" , cl , FALSE ) ;
if ( strlen ( path ) >= unixPathMaxLen ) return FALSE ;
if ( path [ 0 ] == 'C' && path [ 1 ] == ':' ) strcpy ( unixPath , & path [ 2 ] ) ;
else {
home = getenv ( "HOME" ) ;
if ( home != NULL ) {
if ( ( strlen ( path ) + strlen ( home ) + 1 ) >= unixPathMaxLen ) return FALSE ;
strcpy ( unixPath , home ) ;
strcat ( unixPath , "/" ) ;
strcat ( unixPath , path ) ;
}
else strcpy ( unixPath , path ) ;
}
for ( x = 0 ;
x < strlen ( unixPath ) ;
x ++ ) if ( unixPath [ x ] == '\\' ) unixPath [ x ] = '/' ;
return TRUE ;
} |
-1,315,695,702,746,584,300 | debian | 21 | 0 | void proto_item_prepend_text ( proto_item * pi , const char * format , ... ) {
field_info * fi = NULL ;
char representation [ ITEM_LABEL_LENGTH ] ;
va_list ap ;
TRY_TO_FAKE_THIS_REPR_VOID ( pi ) ;
fi = PITEM_FINFO ( pi ) ;
if ( fi == NULL ) {
return ;
}
if ( ! PROTO_ITEM_IS_HIDDEN ( pi ) ) {
if ( fi -> rep == NULL ) {
ITEM_LABEL_NEW ( PNODE_POOL ( pi ) , fi -> rep ) ;
proto_item_fill_label ( fi , representation ) ;
}
else g_strlcpy ( representation , fi -> rep -> representation , ITEM_LABEL_LENGTH ) ;
va_start ( ap , format ) ;
g_vsnprintf ( fi -> rep -> representation , ITEM_LABEL_LENGTH , format , ap ) ;
va_end ( ap ) ;
g_strlcat ( fi -> rep -> representation , representation , ITEM_LABEL_LENGTH ) ;
}
} |
4,313,735,399,044,135,400 | debian | 23 | 1 | sf_count_t psf_fwrite ( const void * ptr , sf_count_t bytes , sf_count_t items , SF_PRIVATE * psf ) {
sf_count_t total = 0 ;
ssize_t count ;
if ( psf -> virtual_io ) return psf -> vio . write ( ptr , bytes * items , psf -> vio_user_data ) / bytes ;
items *= bytes ;
if ( items <= 0 ) return 0 ;
while ( items > 0 ) {
count = ( items > SENSIBLE_SIZE ) ? SENSIBLE_SIZE : items ;
count = write ( psf -> file . filedes , ( ( const char * ) ptr ) + total , count ) ;
if ( count == - 1 ) {
if ( errno == EINTR ) continue ;
psf_log_syserr ( psf , errno ) ;
break ;
}
;
if ( count == 0 ) break ;
total += count ;
items -= count ;
}
;
if ( psf -> is_pipe ) psf -> pipeoffset += total ;
return total / bytes ;
} |
1,245,821,301,839,614,700 | debian | 7 | 0 | static void mark_desktop_file_executable_task_thread_func ( GTask * task , gpointer source_object , gpointer task_data , GCancellable * cancellable ) {
MarkTrustedJob * job = task_data ;
CommonJob * common ;
common = ( CommonJob * ) job ;
nautilus_progress_info_start ( job -> common . progress ) ;
mark_desktop_file_executable ( common , cancellable , job -> file , job -> interactive ) ;
} |
4,980,785,414,205,851,000 | chrome | 22 | 0 | IN_PROC_BROWSER_TEST_F ( FramebustBlockBrowserTest , ModelAllowsRedirection ) {
const GURL blocked_urls [ ] = {
GURL ( chrome : : kChromeUIHistoryURL ) , GURL ( chrome : : kChromeUISettingsURL ) , GURL ( chrome : : kChromeUIVersionURL ) , }
;
auto * helper = GetFramebustTabHelper ( ) ;
for ( const GURL & url : blocked_urls ) {
helper -> AddBlockedUrl ( url , base : : BindOnce ( & FramebustBlockBrowserTest : : OnClick , base : : Unretained ( this ) ) ) ;
}
EXPECT_TRUE ( helper -> HasBlockedUrls ( ) ) ;
ContentSettingFramebustBlockBubbleModel framebust_block_bubble_model ( browser ( ) -> content_setting_bubble_model_delegate ( ) , GetWebContents ( ) , browser ( ) -> profile ( ) ) ;
EXPECT_FALSE ( clicked_index_ . has_value ( ) ) ;
EXPECT_FALSE ( clicked_url_ . has_value ( ) ) ;
content : : TestNavigationObserver observer ( GetWebContents ( ) ) ;
framebust_block_bubble_model . OnListItemClicked ( 1 , ui : : EF_LEFT_MOUSE_BUTTON ) ;
observer . Wait ( ) ;
EXPECT_TRUE ( clicked_index_ . has_value ( ) ) ;
EXPECT_TRUE ( clicked_url_ . has_value ( ) ) ;
EXPECT_EQ ( 1u , clicked_index_ . value ( ) ) ;
EXPECT_EQ ( GURL ( chrome : : kChromeUISettingsURL ) , clicked_url_ . value ( ) ) ;
EXPECT_FALSE ( helper -> HasBlockedUrls ( ) ) ;
EXPECT_EQ ( blocked_urls [ 1 ] , GetWebContents ( ) -> GetLastCommittedURL ( ) ) ;
} |
-1,315,695,702,746,584,300 | debian | 5 | 0 | gint proto_registrar_get_length ( const int n ) {
header_field_info * hfinfo ;
PROTO_REGISTRAR_GET_NTH ( n , hfinfo ) ;
return ftype_length ( hfinfo -> type ) ;
} |
-2,928,324,134,072,492,500 | debian | 12 | 0 | void VoIPcalls_init_tap ( void ) {
GString * error_string ;
if ( have_voip_tap_listener == FALSE ) {
error_string = register_tap_listener ( "voip" , & ( the_tapinfo_struct . voip_dummy ) , NULL , 0 , voip_calls_dlg_reset , VoIPcalls_packet , voip_calls_dlg_draw ) ;
if ( error_string != NULL ) {
simple_dialog ( ESD_TYPE_ERROR , ESD_BTN_OK , "%s" , error_string -> str ) ;
g_string_free ( error_string , TRUE ) ;
exit ( 1 ) ;
}
have_voip_tap_listener = TRUE ;
}
} |
-643,892,134,151,497,100 | debian | 14 | 0 | static int seqvideo_decode_frame ( AVCodecContext * avctx , void * data , int * got_frame , AVPacket * avpkt ) {
const uint8_t * buf = avpkt -> data ;
int buf_size = avpkt -> size ;
int ret ;
SeqVideoContext * seq = avctx -> priv_data ;
if ( ( ret = ff_reget_buffer ( avctx , & seq -> frame ) ) < 0 ) {
av_log ( seq -> avctx , AV_LOG_ERROR , "tiertexseqvideo: reget_buffer() failed\n" ) ;
return ret ;
}
if ( seqvideo_decode ( seq , buf , buf_size ) ) return AVERROR_INVALIDDATA ;
if ( ( ret = av_frame_ref ( data , & seq -> frame ) ) < 0 ) return ret ;
* got_frame = 1 ;
return buf_size ;
} |
6,249,489,553,242,543,000 | debian | 17 | 0 | static void config_phone ( config_tree * ptree ) {
int i ;
string_node * sn ;
i = 0 ;
sn = HEAD_PFIFO ( ptree -> phone ) ;
for ( ;
sn != NULL ;
sn = sn -> link ) {
if ( i < COUNTOF ( sys_phone ) - 1 ) {
sys_phone [ i ++ ] = estrdup ( sn -> s ) ;
sys_phone [ i ] = NULL ;
}
else {
msyslog ( LOG_INFO , "phone: Number of phone entries exceeds %lu. Ignoring phone %s..." , ( u_long ) ( COUNTOF ( sys_phone ) - 1 ) , sn -> s ) ;
}
}
} |
237,530,479,040,685,470 | chrome | 134 | 0 | static void U_CALLCONV UConverter_fromUnicode_HZ_OFFSETS_LOGIC ( UConverterFromUnicodeArgs * args , UErrorCode * err ) {
const UChar * mySource = args -> source ;
char * myTarget = args -> target ;
int32_t * offsets = args -> offsets ;
int32_t mySourceIndex = 0 ;
int32_t myTargetIndex = 0 ;
int32_t targetLength = ( int32_t ) ( args -> targetLimit - myTarget ) ;
int32_t mySourceLength = ( int32_t ) ( args -> sourceLimit - args -> source ) ;
uint32_t targetUniChar = 0x0000 ;
UChar32 mySourceChar = 0x0000 ;
UConverterDataHZ * myConverterData = ( UConverterDataHZ * ) args -> converter -> extraInfo ;
UBool isTargetUCharDBCS = ( UBool ) myConverterData -> isTargetUCharDBCS ;
UBool oldIsTargetUCharDBCS ;
int len = 0 ;
const char * escSeq = NULL ;
if ( args -> converter -> fromUChar32 != 0 && myTargetIndex < targetLength ) {
goto getTrail ;
}
while ( mySourceIndex < mySourceLength ) {
targetUniChar = missingCharMarker ;
if ( myTargetIndex < targetLength ) {
mySourceChar = ( UChar ) mySource [ mySourceIndex ++ ] ;
oldIsTargetUCharDBCS = isTargetUCharDBCS ;
if ( mySourceChar == UCNV_TILDE ) {
len = ESC_LEN ;
escSeq = TILDE_ESCAPE ;
CONCAT_ESCAPE_MACRO ( args , myTargetIndex , targetLength , escSeq , err , len , mySourceIndex ) ;
continue ;
}
else if ( mySourceChar <= 0x7f ) {
targetUniChar = mySourceChar ;
}
else {
int32_t length = ucnv_MBCSFromUChar32 ( myConverterData -> gbConverter -> sharedData , mySourceChar , & targetUniChar , args -> converter -> useFallback ) ;
if ( length == 2 && ( uint16_t ) ( targetUniChar - 0xa1a1 ) <= ( 0xfdfe - 0xa1a1 ) && ( uint8_t ) ( targetUniChar - 0xa1 ) <= ( 0xfe - 0xa1 ) ) {
targetUniChar -= 0x8080 ;
}
else {
targetUniChar = missingCharMarker ;
}
}
if ( targetUniChar != missingCharMarker ) {
myConverterData -> isTargetUCharDBCS = isTargetUCharDBCS = ( UBool ) ( targetUniChar > 0x00FF ) ;
if ( oldIsTargetUCharDBCS != isTargetUCharDBCS || ! myConverterData -> isEscapeAppended ) {
if ( ! isTargetUCharDBCS ) {
len = ESC_LEN ;
escSeq = SB_ESCAPE ;
CONCAT_ESCAPE_MACRO ( args , myTargetIndex , targetLength , escSeq , err , len , mySourceIndex ) ;
myConverterData -> isEscapeAppended = TRUE ;
}
else {
len = ESC_LEN ;
escSeq = DB_ESCAPE ;
CONCAT_ESCAPE_MACRO ( args , myTargetIndex , targetLength , escSeq , err , len , mySourceIndex ) ;
myConverterData -> isEscapeAppended = TRUE ;
}
}
if ( isTargetUCharDBCS ) {
if ( myTargetIndex < targetLength ) {
myTarget [ myTargetIndex ++ ] = ( char ) ( targetUniChar >> 8 ) ;
if ( offsets ) {
* ( offsets ++ ) = mySourceIndex - 1 ;
}
if ( myTargetIndex < targetLength ) {
myTarget [ myTargetIndex ++ ] = ( char ) targetUniChar ;
if ( offsets ) {
* ( offsets ++ ) = mySourceIndex - 1 ;
}
}
else {
args -> converter -> charErrorBuffer [ args -> converter -> charErrorBufferLength ++ ] = ( char ) targetUniChar ;
* err = U_BUFFER_OVERFLOW_ERROR ;
}
}
else {
args -> converter -> charErrorBuffer [ args -> converter -> charErrorBufferLength ++ ] = ( char ) ( targetUniChar >> 8 ) ;
args -> converter -> charErrorBuffer [ args -> converter -> charErrorBufferLength ++ ] = ( char ) targetUniChar ;
* err = U_BUFFER_OVERFLOW_ERROR ;
}
}
else {
if ( myTargetIndex < targetLength ) {
myTarget [ myTargetIndex ++ ] = ( char ) ( targetUniChar ) ;
if ( offsets ) {
* ( offsets ++ ) = mySourceIndex - 1 ;
}
}
else {
args -> converter -> charErrorBuffer [ args -> converter -> charErrorBufferLength ++ ] = ( char ) targetUniChar ;
* err = U_BUFFER_OVERFLOW_ERROR ;
}
}
}
else {
if ( U16_IS_SURROGATE ( mySourceChar ) ) {
if ( U16_IS_SURROGATE_LEAD ( mySourceChar ) ) {
args -> converter -> fromUChar32 = mySourceChar ;
getTrail : if ( mySourceIndex < mySourceLength ) {
UChar trail = ( UChar ) args -> source [ mySourceIndex ] ;
if ( U16_IS_TRAIL ( trail ) ) {
++ mySourceIndex ;
mySourceChar = U16_GET_SUPPLEMENTARY ( args -> converter -> fromUChar32 , trail ) ;
args -> converter -> fromUChar32 = 0x00 ;
* err = U_INVALID_CHAR_FOUND ;
}
else {
* err = U_ILLEGAL_CHAR_FOUND ;
}
}
else {
* err = U_ZERO_ERROR ;
}
}
else {
* err = U_ILLEGAL_CHAR_FOUND ;
}
}
else {
* err = U_INVALID_CHAR_FOUND ;
}
args -> converter -> fromUChar32 = mySourceChar ;
break ;
}
}
else {
* err = U_BUFFER_OVERFLOW_ERROR ;
break ;
}
targetUniChar = missingCharMarker ;
}
args -> target += myTargetIndex ;
args -> source += mySourceIndex ;
myConverterData -> isTargetUCharDBCS = isTargetUCharDBCS ;
} |
1,161,306,432,039,958,300 | chrome | 11 | 0 | static int reassociate ( struct evport_data * epdp , struct fd_info * fdip , int fd ) {
int sysevents = FDI_TO_SYSEVENTS ( fdip ) ;
if ( sysevents != 0 ) {
if ( port_associate ( epdp -> ed_port , PORT_SOURCE_FD , fd , sysevents , NULL ) == - 1 ) {
event_warn ( "port_associate" ) ;
return ( - 1 ) ;
}
}
check_evportop ( epdp ) ;
return ( 0 ) ;
} |
-1,102,844,685,921,778,700 | debian | 6 | 0 | static const char * default_iconv_charset ( const char * charset ) {
if ( charset != NULL && charset [ 0 ] != '\0' ) return charset ;
# if HAVE_LOCALE_CHARSET && ! defined ( __APPLE__ ) return locale_charset ( ) ;
# elif HAVE_NL_LANGINFO return nl_langinfo ( CODESET ) ;
# else return "" ;
# endif } |
-7,034,148,853,749,334,000 | debian | 70 | 0 | static YYSIZE_T yysyntax_error ( char * yyresult , int yystate , int yychar ) {
int yyn = yypact [ yystate ] ;
if ( ! ( YYPACT_NINF < yyn && yyn <= YYLAST ) ) return 0 ;
else {
int yytype = YYTRANSLATE ( yychar ) ;
YYSIZE_T yysize0 = yytnamerr ( 0 , yytname [ yytype ] ) ;
YYSIZE_T yysize = yysize0 ;
YYSIZE_T yysize1 ;
int yysize_overflow = 0 ;
enum {
YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }
;
char const * yyarg [ YYERROR_VERBOSE_ARGS_MAXIMUM ] ;
int yyx ;
# if 0 YY_ ( "syntax error, unexpected %s" ) ;
YY_ ( "syntax error, unexpected %s, expecting %s" ) ;
YY_ ( "syntax error, unexpected %s, expecting %s or %s" ) ;
YY_ ( "syntax error, unexpected %s, expecting %s or %s or %s" ) ;
YY_ ( "syntax error, unexpected %s, expecting %s or %s or %s or %s" ) ;
# endif char * yyfmt ;
char const * yyf ;
static char const yyunexpected [ ] = "syntax error, unexpected %s" ;
static char const yyexpecting [ ] = ", expecting %s" ;
static char const yyor [ ] = " or %s" ;
char yyformat [ sizeof yyunexpected + sizeof yyexpecting - 1 + ( ( YYERROR_VERBOSE_ARGS_MAXIMUM - 2 ) * ( sizeof yyor - 1 ) ) ] ;
char const * yyprefix = yyexpecting ;
int yyxbegin = yyn < 0 ? - yyn : 0 ;
int yychecklim = YYLAST - yyn + 1 ;
int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS ;
int yycount = 1 ;
yyarg [ 0 ] = yytname [ yytype ] ;
yyfmt = yystpcpy ( yyformat , yyunexpected ) ;
for ( yyx = yyxbegin ;
yyx < yyxend ;
++ yyx ) if ( yycheck [ yyx + yyn ] == yyx && yyx != YYTERROR ) {
if ( yycount == YYERROR_VERBOSE_ARGS_MAXIMUM ) {
yycount = 1 ;
yysize = yysize0 ;
yyformat [ sizeof yyunexpected - 1 ] = '\0' ;
break ;
}
yyarg [ yycount ++ ] = yytname [ yyx ] ;
yysize1 = yysize + yytnamerr ( 0 , yytname [ yyx ] ) ;
yysize_overflow |= ( yysize1 < yysize ) ;
yysize = yysize1 ;
yyfmt = yystpcpy ( yyfmt , yyprefix ) ;
yyprefix = yyor ;
}
yyf = YY_ ( yyformat ) ;
yysize1 = yysize + yystrlen ( yyf ) ;
yysize_overflow |= ( yysize1 < yysize ) ;
yysize = yysize1 ;
if ( yysize_overflow ) return YYSIZE_MAXIMUM ;
if ( yyresult ) {
char * yyp = yyresult ;
int yyi = 0 ;
while ( ( * yyp = * yyf ) != '\0' ) {
if ( * yyp == '%' && yyf [ 1 ] == 's' && yyi < yycount ) {
yyp += yytnamerr ( yyp , yyarg [ yyi ++ ] ) ;
yyf += 2 ;
}
else {
yyp ++ ;
yyf ++ ;
}
}
}
return yysize ;
}
} |
3,599,206,110,384,554,500 | debian | 45 | 1 | static ossl_inline int sk_ ## t1 ## _push ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_push ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _unshift ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_unshift ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _pop ( STACK_OF ( t1 ) * sk ) {
return ( t2 * ) OPENSSL_sk_pop ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _shift ( STACK_OF ( t1 ) * sk ) {
return ( t2 * ) OPENSSL_sk_shift ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline void sk_ ## t1 ## _pop_free ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _freefunc freefunc ) {
OPENSSL_sk_pop_free ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline int sk_ ## t1 ## _insert ( STACK_OF ( t1 ) * sk , t2 * ptr , int idx ) {
return OPENSSL_sk_insert ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr , idx ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _set ( STACK_OF ( t1 ) * sk , int idx , t2 * ptr ) {
return ( t2 * ) OPENSSL_sk_set ( ( OPENSSL_STACK * ) sk , idx , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _find ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_find ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _find_ex ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_find_ex ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline void sk_ ## t1 ## _sort ( STACK_OF ( t1 ) * sk ) {
OPENSSL_sk_sort ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline int sk_ ## t1 ## _is_sorted ( const STACK_OF ( t1 ) * sk ) {
return OPENSSL_sk_is_sorted ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _dup ( const STACK_OF ( t1 ) * sk ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_dup ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _deep_copy ( const STACK_OF ( t1 ) * sk , sk_ ## t1 ## _copyfunc copyfunc , sk_ ## t1 ## _freefunc freefunc ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_deep_copy ( ( const OPENSSL_STACK * ) sk , ( OPENSSL_sk_copyfunc ) copyfunc , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline sk_ ## t1 ## _compfunc sk_ ## t1 ## _set_cmp_func ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _compfunc compare ) {
return ( sk_ ## t1 ## _compfunc ) OPENSSL_sk_set_cmp_func ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_compfunc ) compare ) ;
}
# define DEFINE_SPECIAL_STACK_OF ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , t2 , t2 ) # define DEFINE_STACK_OF ( t ) SKM_DEFINE_STACK_OF ( t , t , t ) # define DEFINE_SPECIAL_STACK_OF_CONST ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , const t2 , t2 ) # define DEFINE_STACK_OF_CONST ( t ) SKM_DEFINE_STACK_OF ( t , const t , t ) typedef char * OPENSSL_STRING ;
typedef const char * OPENSSL_CSTRING ;
DEFINE_SPECIAL_STACK_OF ( OPENSSL_STRING , char ) DEFINE_SPECIAL_STACK_OF_CONST ( OPENSSL_CSTRING , char ) |
-2,420,110,701,634,682,000 | debian | 26 | 0 | static void test_rfc2231_parser ( void ) {
const char * input = ";
key4*=us-ascii''foo" ";
key*2=ba%" ";
key2*0=a" ";
key3*0*=us-ascii'en'xyz" ";
key*0=\"foo\"" ";
key2*1*=b%25" ";
key3*1=plop%" ";
key*1=baz" ;
const char * output [ ] = {
"key" , "foobazba%" , "key2*" , "''ab%25" , "key3*" , "us-ascii'en'xyzplop%25" , "key4*" , "us-ascii''foo" , NULL }
;
struct rfc822_parser_context parser ;
const char * const * result ;
unsigned int i ;
test_begin ( "rfc2231 parser" ) ;
rfc822_parser_init ( & parser , ( const void * ) input , strlen ( input ) , NULL ) ;
test_assert ( rfc2231_parse ( & parser , & result ) == 0 ) ;
for ( i = 0 ;
output [ i ] != NULL && result [ i ] != NULL ;
i ++ ) test_assert ( strcmp ( output [ i ] , result [ i ] ) == 0 ) ;
rfc822_parser_deinit ( & parser ) ;
test_assert ( output [ i ] == NULL && result [ i ] == NULL ) ;
test_end ( ) ;
} |
-4,527,380,754,569,408,000 | chrome | 6 | 1 | static hb_feature_t * feature_reference ( hb_feature_t * g ) {
hb_feature_t * c = ( hb_feature_t * ) calloc ( 1 , sizeof ( hb_feature_t ) ) ;
if ( unlikely ( ! c ) ) return NULL ;
* c = * g ;
return c ;
} |
6,458,694,302,493,204,000 | debian | 31 | 0 | static Datum ExecEvalConvertRowtype ( ConvertRowtypeExprState * cstate , ExprContext * econtext , bool * isNull , ExprDoneCond * isDone ) {
ConvertRowtypeExpr * convert = ( ConvertRowtypeExpr * ) cstate -> xprstate . expr ;
HeapTuple result ;
Datum tupDatum ;
HeapTupleHeader tuple ;
HeapTupleData tmptup ;
tupDatum = ExecEvalExpr ( cstate -> arg , econtext , isNull , isDone ) ;
if ( * isNull ) return tupDatum ;
tuple = DatumGetHeapTupleHeader ( tupDatum ) ;
if ( cstate -> indesc == NULL ) {
get_cached_rowtype ( exprType ( ( Node * ) convert -> arg ) , - 1 , & cstate -> indesc , econtext ) ;
cstate -> initialized = false ;
}
if ( cstate -> outdesc == NULL ) {
get_cached_rowtype ( convert -> resulttype , - 1 , & cstate -> outdesc , econtext ) ;
cstate -> initialized = false ;
}
Assert ( HeapTupleHeaderGetTypeId ( tuple ) == cstate -> indesc -> tdtypeid || HeapTupleHeaderGetTypeId ( tuple ) == RECORDOID ) ;
if ( ! cstate -> initialized ) {
MemoryContext old_cxt ;
old_cxt = MemoryContextSwitchTo ( econtext -> ecxt_per_query_memory ) ;
cstate -> map = convert_tuples_by_name ( cstate -> indesc , cstate -> outdesc , gettext_noop ( "could not convert row type" ) ) ;
cstate -> initialized = true ;
MemoryContextSwitchTo ( old_cxt ) ;
}
if ( cstate -> map == NULL ) return tupDatum ;
tmptup . t_len = HeapTupleHeaderGetDatumLength ( tuple ) ;
tmptup . t_data = tuple ;
result = do_convert_tuple ( & tmptup , cstate -> map ) ;
return HeapTupleGetDatum ( result ) ;
} |
7,651,945,086,108,393,000 | debian | 31 | 0 | static int qemuMonitorJSONGetBlockJobInfoOne ( virJSONValuePtr entry , const char * device , virDomainBlockJobInfoPtr info ) {
const char * this_dev ;
const char * type ;
unsigned long long speed_bytes ;
if ( ( this_dev = virJSONValueObjectGetString ( entry , "device" ) ) == NULL ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "entry was missing 'device'" ) ) ;
return - 1 ;
}
if ( ! STREQ ( this_dev , device ) ) return - 1 ;
type = virJSONValueObjectGetString ( entry , "type" ) ;
if ( ! type ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "entry was missing 'type'" ) ) ;
return - 1 ;
}
if ( STREQ ( type , "stream" ) ) info -> type = VIR_DOMAIN_BLOCK_JOB_TYPE_PULL ;
else info -> type = VIR_DOMAIN_BLOCK_JOB_TYPE_UNKNOWN ;
if ( virJSONValueObjectGetNumberUlong ( entry , "speed" , & speed_bytes ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "entry was missing 'speed'" ) ) ;
return - 1 ;
}
info -> bandwidth = speed_bytes / 1024ULL / 1024ULL ;
if ( virJSONValueObjectGetNumberUlong ( entry , "offset" , & info -> cur ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "entry was missing 'offset'" ) ) ;
return - 1 ;
}
if ( virJSONValueObjectGetNumberUlong ( entry , "len" , & info -> end ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "entry was missing 'len'" ) ) ;
return - 1 ;
}
return 0 ;
} |
8,461,266,595,329,035,000 | chrome | 29 | 1 | static void event_process_active ( struct event_base * base ) {
struct event * ev ;
struct event_list * activeq = NULL ;
int i ;
short ncalls ;
for ( i = 0 ;
i < base -> nactivequeues ;
++ i ) {
if ( TAILQ_FIRST ( base -> activequeues [ i ] ) != NULL ) {
activeq = base -> activequeues [ i ] ;
break ;
}
}
assert ( activeq != NULL ) ;
for ( ev = TAILQ_FIRST ( activeq ) ;
ev ;
ev = TAILQ_FIRST ( activeq ) ) {
if ( ev -> ev_events & EV_PERSIST ) event_queue_remove ( base , ev , EVLIST_ACTIVE ) ;
else event_del ( ev ) ;
ncalls = ev -> ev_ncalls ;
ev -> ev_pncalls = & ncalls ;
while ( ncalls ) {
ncalls -- ;
ev -> ev_ncalls = ncalls ;
( * ev -> ev_callback ) ( ( int ) ev -> ev_fd , ev -> ev_res , ev -> ev_arg ) ;
if ( base -> event_break ) return ;
}
}
} |
8,458,201,026,073,747,000 | debian | 28 | 0 | int jbig2_decode_generic_region ( Jbig2Ctx * ctx , Jbig2Segment * segment , const Jbig2GenericRegionParams * params , Jbig2ArithState * as , Jbig2Image * image , Jbig2ArithCx * GB_stats ) {
const int8_t * gbat = params -> gbat ;
if ( image -> stride * image -> height > ( 1 << 24 ) && segment -> data_length < image -> stride * image -> height / 256 ) {
return jbig2_error ( ctx , JBIG2_SEVERITY_FATAL , segment -> number , "region is far larger than data provided (%d << %d), aborting to prevent DOS" , segment -> data_length , image -> stride * image -> height ) ;
}
if ( ! params -> MMR && params -> TPGDON ) return jbig2_decode_generic_region_TPGDON ( ctx , segment , params , as , image , GB_stats ) ;
if ( ! params -> MMR && params -> GBTEMPLATE == 0 ) {
if ( gbat [ 0 ] == + 3 && gbat [ 1 ] == - 1 && gbat [ 2 ] == - 3 && gbat [ 3 ] == - 1 && gbat [ 4 ] == + 2 && gbat [ 5 ] == - 2 && gbat [ 6 ] == - 2 && gbat [ 7 ] == - 2 ) return jbig2_decode_generic_template0 ( ctx , segment , params , as , image , GB_stats ) ;
else return jbig2_decode_generic_template0_unopt ( ctx , segment , params , as , image , GB_stats ) ;
}
else if ( ! params -> MMR && params -> GBTEMPLATE == 1 ) return jbig2_decode_generic_template1 ( ctx , segment , params , as , image , GB_stats ) ;
else if ( ! params -> MMR && params -> GBTEMPLATE == 2 ) {
if ( gbat [ 0 ] == 3 && gbat [ 1 ] == - 1 ) return jbig2_decode_generic_template2a ( ctx , segment , params , as , image , GB_stats ) ;
else return jbig2_decode_generic_template2 ( ctx , segment , params , as , image , GB_stats ) ;
}
else if ( ! params -> MMR && params -> GBTEMPLATE == 3 ) {
if ( gbat [ 0 ] == 2 && gbat [ 1 ] == - 1 ) return jbig2_decode_generic_template3_unopt ( ctx , segment , params , as , image , GB_stats ) ;
else return jbig2_decode_generic_template3_unopt ( ctx , segment , params , as , image , GB_stats ) ;
}
{
int i ;
for ( i = 0 ;
i < 8 ;
i ++ ) jbig2_error ( ctx , JBIG2_SEVERITY_DEBUG , segment -> number , "gbat[%d] = %d" , i , params -> gbat [ i ] ) ;
}
jbig2_error ( ctx , JBIG2_SEVERITY_WARNING , segment -> number , "decode_generic_region: MMR=%d, GBTEMPLATE=%d NYI" , params -> MMR , params -> GBTEMPLATE ) ;
return - 1 ;
} |
-5,511,323,081,862,746,000 | debian | 7 | 0 | static gboolean destroy_srcdsc ( gpointer k _U_ , gpointer v , gpointer p _U_ ) {
k12_src_desc_t * rec = ( k12_src_desc_t * ) v ;
g_free ( rec -> input_name ) ;
g_free ( rec -> stack_file ) ;
g_free ( rec ) ;
return TRUE ;
} |
-1,315,695,702,746,584,300 | debian | 7 | 0 | int proto_get_first_protocol ( void * * cookie ) {
protocol_t * protocol ;
if ( protocols == NULL ) return - 1 ;
* cookie = protocols ;
protocol = ( protocol_t * ) protocols -> data ;
return protocol -> proto_id ;
} |
3,599,206,110,384,554,500 | debian | 42 | 0 | static ossl_inline int sk_ ## t1 ## _unshift ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_unshift ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _pop ( STACK_OF ( t1 ) * sk ) {
return ( t2 * ) OPENSSL_sk_pop ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _shift ( STACK_OF ( t1 ) * sk ) {
return ( t2 * ) OPENSSL_sk_shift ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline void sk_ ## t1 ## _pop_free ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _freefunc freefunc ) {
OPENSSL_sk_pop_free ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline int sk_ ## t1 ## _insert ( STACK_OF ( t1 ) * sk , t2 * ptr , int idx ) {
return OPENSSL_sk_insert ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr , idx ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _set ( STACK_OF ( t1 ) * sk , int idx , t2 * ptr ) {
return ( t2 * ) OPENSSL_sk_set ( ( OPENSSL_STACK * ) sk , idx , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _find ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_find ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _find_ex ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_find_ex ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline void sk_ ## t1 ## _sort ( STACK_OF ( t1 ) * sk ) {
OPENSSL_sk_sort ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline int sk_ ## t1 ## _is_sorted ( const STACK_OF ( t1 ) * sk ) {
return OPENSSL_sk_is_sorted ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _dup ( const STACK_OF ( t1 ) * sk ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_dup ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _deep_copy ( const STACK_OF ( t1 ) * sk , sk_ ## t1 ## _copyfunc copyfunc , sk_ ## t1 ## _freefunc freefunc ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_deep_copy ( ( const OPENSSL_STACK * ) sk , ( OPENSSL_sk_copyfunc ) copyfunc , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline sk_ ## t1 ## _compfunc sk_ ## t1 ## _set_cmp_func ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _compfunc compare ) {
return ( sk_ ## t1 ## _compfunc ) OPENSSL_sk_set_cmp_func ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_compfunc ) compare ) ;
}
# define DEFINE_SPECIAL_STACK_OF ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , t2 , t2 ) # define DEFINE_STACK_OF ( t ) SKM_DEFINE_STACK_OF ( t , t , t ) # define DEFINE_SPECIAL_STACK_OF_CONST ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , const t2 , t2 ) # define DEFINE_STACK_OF_CONST ( t ) SKM_DEFINE_STACK_OF ( t , const t , t ) typedef char * OPENSSL_STRING ;
typedef const char * OPENSSL_CSTRING ;
DEFINE_SPECIAL_STACK_OF ( OPENSSL_STRING , char ) |
-2,127,895,299,879,503,400 | debian | 10 | 0 | void macio_ide_init_drives ( MACIOIDEState * s , DriveInfo * * hd_table ) {
int i ;
for ( i = 0 ;
i < 2 ;
i ++ ) {
if ( hd_table [ i ] ) {
ide_create_drive ( & s -> bus , i , hd_table [ i ] ) ;
}
}
} |
-2,607,754,285,145,856,500 | debian | 3 | 0 | static inline void set_num_712 ( unsigned char * p , char value ) {
* ( ( char * ) p ) = value ;
} |
-7,670,127,399,145,951,000 | debian | 18 | 0 | int gs_pop_string ( gs_main_instance * minst , gs_string * result ) {
i_ctx_t * i_ctx_p = minst -> i_ctx_p ;
ref vref ;
int code = pop_value ( i_ctx_p , & vref ) ;
if ( code < 0 ) return code ;
switch ( r_type ( & vref ) ) {
case t_name : name_string_ref ( minst -> heap , & vref , & vref ) ;
code = 1 ;
goto rstr ;
case t_string : code = ( r_has_attr ( & vref , a_write ) ? 0 : 1 ) ;
rstr : result -> data = vref . value . bytes ;
result -> size = r_size ( & vref ) ;
break ;
default : return_error ( gs_error_typecheck ) ;
}
ref_stack_pop ( & o_stack , 1 ) ;
return code ;
} |
-4,055,702,019,813,177,000 | debian | 15 | 0 | static call_list * call_list_append ( call_list * list , guint16 scallno ) {
call_list * node = wmem_new0 ( wmem_packet_scope ( ) , call_list ) ;
node -> scallno = scallno ;
if ( list ) {
call_list * cur = list ;
while ( cur -> next ) {
cur = cur -> next ;
}
cur -> next = node ;
return list ;
}
else {
return node ;
}
} |
3,919,646,340,804,521,500 | debian | 3 | 0 | static int pack_options_allow_reuse ( void ) {
return allow_ofs_delta ;
} |
229,962,612,204,197,000 | debian | 22 | 0 | static void handle_new_lock_ctx ( struct xml_ctx * ctx , int tag_closed ) {
struct remote_lock * lock = ( struct remote_lock * ) ctx -> userData ;
git_SHA_CTX sha_ctx ;
unsigned char lock_token_sha1 [ 20 ] ;
if ( tag_closed && ctx -> cdata ) {
if ( ! strcmp ( ctx -> name , DAV_ACTIVELOCK_OWNER ) ) {
lock -> owner = xstrdup ( ctx -> cdata ) ;
}
else if ( ! strcmp ( ctx -> name , DAV_ACTIVELOCK_TIMEOUT ) ) {
const char * arg ;
if ( skip_prefix ( ctx -> cdata , "Second-" , & arg ) ) lock -> timeout = strtol ( arg , NULL , 10 ) ;
}
else if ( ! strcmp ( ctx -> name , DAV_ACTIVELOCK_TOKEN ) ) {
lock -> token = xstrdup ( ctx -> cdata ) ;
git_SHA1_Init ( & sha_ctx ) ;
git_SHA1_Update ( & sha_ctx , lock -> token , strlen ( lock -> token ) ) ;
git_SHA1_Final ( lock_token_sha1 , & sha_ctx ) ;
lock -> tmpfile_suffix [ 0 ] = '_' ;
memcpy ( lock -> tmpfile_suffix + 1 , sha1_to_hex ( lock_token_sha1 ) , 40 ) ;
}
}
} |
-866,921,002,076,081,900 | debian | 116 | 0 | REGRESSION_TEST ( SDK_API_ENCODING ) ( RegressionTest * test , int , int * pstatus ) {
const char * url = "http://www.example.com/foo?fie= \"#%<>[]\\^`{
}
~&bar={
test}
&fum=Apache Traffic Server" ;
const char * url_encoded = "http://www.example.com/foo?fie=%20%22%23%25%3C%3E%5B%5D%5C%5E%60%7B%7D%7E&bar=%7Btest%7D&fum=Apache%20Traffic%20Server" ;
const char * url_base64 = "aHR0cDovL3d3dy5leGFtcGxlLmNvbS9mb28/ZmllPSAiIyU8PltdXF5ge31+JmJhcj17dGVzdH0mZnVtPUFwYWNoZSBUcmFmZmljIFNlcnZlcg==" ;
const char * url2 = "http://www.example.com/" ;
const char * url3 = "https://www.thisisoneexampleofastringoflengtheightyasciilowercasecharacters.com/" ;
char buf [ 1024 ] ;
size_t length ;
bool success = true ;
if ( TS_SUCCESS != TSStringPercentEncode ( url , strlen ( url ) , buf , sizeof ( buf ) , & length , nullptr ) ) {
SDK_RPRINT ( test , "TSStringPercentEncode" , "TestCase1" , TC_FAIL , "Failed on %s" , url ) ;
success = false ;
}
else {
if ( strcmp ( buf , url_encoded ) ) {
SDK_RPRINT ( test , "TSStringPercentEncode" , "TestCase1" , TC_FAIL , "Failed on %s != %s" , buf , url_encoded ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSStringPercentEncode" , "TestCase1" , TC_PASS , "ok" ) ;
}
}
if ( TS_SUCCESS != TSStringPercentEncode ( url2 , strlen ( url2 ) , buf , sizeof ( buf ) , & length , nullptr ) ) {
SDK_RPRINT ( test , "TSStringPercentEncode" , "TestCase2" , TC_FAIL , "Failed on %s" , url2 ) ;
success = false ;
}
else {
if ( strcmp ( buf , url2 ) ) {
SDK_RPRINT ( test , "TSStringPercentEncode" , "TestCase2" , TC_FAIL , "Failed on %s != %s" , buf , url2 ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSStringPercentEncode" , "TestCase2" , TC_PASS , "ok" ) ;
}
}
if ( TS_SUCCESS != TSStringPercentDecode ( url_encoded , strlen ( url_encoded ) , buf , sizeof ( buf ) , & length ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase1" , TC_FAIL , "Failed on %s" , url_encoded ) ;
success = false ;
}
else {
if ( length != strlen ( url ) || strcmp ( buf , url ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase1" , TC_FAIL , "Failed on %s != %s" , buf , url ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase1" , TC_PASS , "ok" ) ;
}
}
if ( TS_SUCCESS != TSStringPercentDecode ( url2 , strlen ( url2 ) , buf , sizeof ( buf ) , & length ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase2" , TC_FAIL , "Failed on %s" , url2 ) ;
success = false ;
}
else {
if ( length != strlen ( url2 ) || strcmp ( buf , url2 ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase2" , TC_FAIL , "Failed on %s != %s" , buf , url2 ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase2" , TC_PASS , "ok" ) ;
}
}
const size_t buf_len = strlen ( url3 ) + 1 ;
strncpy ( buf , url3 , buf_len - 1 ) ;
const char canary = 0xFF ;
buf [ buf_len - 1 ] = canary ;
const char * url3_clipped = "https://www.thisisoneexampleofastringoflengtheightyasciilowercasecharacters.com" ;
if ( TS_SUCCESS != TSStringPercentDecode ( buf , buf_len - 1 , buf , buf_len - 1 , & length ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase3" , TC_FAIL , "Failed on %s" , url3 ) ;
success = false ;
}
else {
if ( memcmp ( buf + buf_len - 1 , & canary , 1 ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase3" , TC_FAIL , "Failed on %s overwrites buffer" , url3 ) ;
success = false ;
}
else if ( length != strlen ( url3_clipped ) || strcmp ( buf , url3_clipped ) ) {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase3" , TC_FAIL , "Failed on %s != %s" , buf , url3_clipped ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSStringPercentDecode" , "TestCase3" , TC_PASS , "ok" ) ;
}
}
if ( TS_SUCCESS != TSBase64Encode ( url , strlen ( url ) , buf , sizeof ( buf ) , & length ) ) {
SDK_RPRINT ( test , "TSBase64Encode" , "TestCase1" , TC_FAIL , "Failed on %s" , url ) ;
success = false ;
}
else {
if ( length != strlen ( url_base64 ) || strcmp ( buf , url_base64 ) ) {
SDK_RPRINT ( test , "TSBase64Encode" , "TestCase1" , TC_FAIL , "Failed on %s != %s" , buf , url_base64 ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSBase64Encode" , "TestCase1" , TC_PASS , "ok" ) ;
}
}
if ( TS_SUCCESS != TSBase64Decode ( url_base64 , strlen ( url_base64 ) , ( unsigned char * ) buf , sizeof ( buf ) , & length ) ) {
SDK_RPRINT ( test , "TSBase64Decode" , "TestCase1" , TC_FAIL , "Failed on %s" , url_base64 ) ;
success = false ;
}
else {
if ( length != strlen ( url ) || strcmp ( buf , url ) ) {
SDK_RPRINT ( test , "TSBase64Decode" , "TestCase1" , TC_FAIL , "Failed on %s != %s" , buf , url ) ;
success = false ;
}
else {
SDK_RPRINT ( test , "TSBase64Decode" , "TestCase1" , TC_PASS , "ok" ) ;
}
}
* pstatus = success ? REGRESSION_TEST_PASSED : REGRESSION_TEST_FAILED ;
return ;
} |
6,302,861,533,225,985,000 | debian | 17 | 0 | static void pxa2xx_i2c_event ( I2CSlave * i2c , enum i2c_event event ) {
PXA2xxI2CSlaveState * slave = FROM_I2C_SLAVE ( PXA2xxI2CSlaveState , i2c ) ;
PXA2xxI2CState * s = slave -> host ;
switch ( event ) {
case I2C_START_SEND : s -> status |= ( 1 << 9 ) ;
s -> status &= ~ ( 1 << 0 ) ;
break ;
case I2C_START_RECV : s -> status |= ( 1 << 9 ) ;
s -> status |= 1 << 0 ;
break ;
case I2C_FINISH : s -> status |= ( 1 << 4 ) ;
break ;
case I2C_NACK : s -> status |= 1 << 1 ;
break ;
}
pxa2xx_i2c_update ( s ) ;
} |
2,100,112,064,176,019,200 | chrome | 29 | 0 | xsltDocumentPtr xsltLoadDocument ( xsltTransformContextPtr ctxt , const xmlChar * URI ) {
xsltDocumentPtr ret ;
xmlDocPtr doc ;
if ( ( ctxt == NULL ) || ( URI == NULL ) ) return ( NULL ) ;
if ( ctxt -> sec != NULL ) {
int res ;
res = xsltCheckRead ( ctxt -> sec , ctxt , URI ) ;
if ( res == 0 ) {
xsltTransformError ( ctxt , NULL , NULL , "xsltLoadDocument: read rights for %s denied\n" , URI ) ;
return ( NULL ) ;
}
}
ret = ctxt -> docList ;
while ( ret != NULL ) {
if ( ( ret -> doc != NULL ) && ( ret -> doc -> URL != NULL ) && ( xmlStrEqual ( ret -> doc -> URL , URI ) ) ) return ( ret ) ;
ret = ret -> next ;
}
doc = xsltDocDefaultLoader ( URI , ctxt -> dict , ctxt -> parserOptions , ( void * ) ctxt , XSLT_LOAD_DOCUMENT ) ;
if ( doc == NULL ) return ( NULL ) ;
if ( ctxt -> xinclude != 0 ) {
# ifdef LIBXML_XINCLUDE_ENABLED # if LIBXML_VERSION >= 20603 xmlXIncludeProcessFlags ( doc , ctxt -> parserOptions ) ;
# else xmlXIncludeProcess ( doc ) ;
# endif # else xsltTransformError ( ctxt , NULL , NULL , "xsltLoadDocument(%s) : XInclude processing not compiled in\n" , URI ) ;
# endif }
if ( xsltNeedElemSpaceHandling ( ctxt ) ) xsltApplyStripSpaces ( ctxt , xmlDocGetRootElement ( doc ) ) ;
if ( ctxt -> debugStatus == XSLT_DEBUG_NONE ) xmlXPathOrderDocElems ( doc ) ;
ret = xsltNewDocument ( ctxt , doc ) ;
return ( ret ) ;
} |
6,298,409,723,927,571,000 | chrome | 2 | 1 | static void initial_reordering_non_myanmar_cluster ( const hb_ot_shape_plan_t * plan HB_UNUSED , hb_face_t * face HB_UNUSED , hb_buffer_t * buffer HB_UNUSED , unsigned int start HB_UNUSED , unsigned int end HB_UNUSED ) {
} |
8,461,782,184,979,846,000 | chrome | 7 | 0 | TEST_F ( ProtocolHandlerRegistryTest , TestDisablePreventsHandling ) {
ProtocolHandler ph1 = CreateProtocolHandler ( "test" , "test1" ) ;
registry ( ) -> OnAcceptRegisterProtocolHandler ( ph1 ) ;
ASSERT_TRUE ( registry ( ) -> IsHandledProtocol ( "test" ) ) ;
registry ( ) -> Disable ( ) ;
ASSERT_FALSE ( registry ( ) -> IsHandledProtocol ( "test" ) ) ;
} |
-7,795,592,811,940,875,000 | debian | 69 | 0 | static gcry_err_code_t pkcs1_encode_for_encryption ( gcry_mpi_t * r_result , unsigned int nbits , const unsigned char * value , size_t valuelen , const unsigned char * random_override , size_t random_override_len ) {
gcry_err_code_t rc = 0 ;
gcry_error_t err ;
unsigned char * frame = NULL ;
size_t nframe = ( nbits + 7 ) / 8 ;
int i ;
size_t n ;
unsigned char * p ;
if ( valuelen + 7 > nframe || ! nframe ) {
return GPG_ERR_TOO_SHORT ;
}
if ( ! ( frame = gcry_malloc_secure ( nframe ) ) ) return gpg_err_code_from_syserror ( ) ;
n = 0 ;
frame [ n ++ ] = 0 ;
frame [ n ++ ] = 2 ;
i = nframe - 3 - valuelen ;
gcry_assert ( i > 0 ) ;
if ( random_override ) {
int j ;
if ( random_override_len != i ) {
gcry_free ( frame ) ;
return GPG_ERR_INV_ARG ;
}
for ( j = 0 ;
j < random_override_len ;
j ++ ) if ( ! random_override [ j ] ) {
gcry_free ( frame ) ;
return GPG_ERR_INV_ARG ;
}
memcpy ( frame + n , random_override , random_override_len ) ;
n += random_override_len ;
}
else {
p = gcry_random_bytes_secure ( i , GCRY_STRONG_RANDOM ) ;
for ( ;
;
) {
int j , k ;
unsigned char * pp ;
for ( j = k = 0 ;
j < i ;
j ++ ) {
if ( ! p [ j ] ) k ++ ;
}
if ( ! k ) break ;
k += k / 128 + 3 ;
pp = gcry_random_bytes_secure ( k , GCRY_STRONG_RANDOM ) ;
for ( j = 0 ;
j < i && k ;
) {
if ( ! p [ j ] ) p [ j ] = pp [ -- k ] ;
if ( p [ j ] ) j ++ ;
}
gcry_free ( pp ) ;
}
memcpy ( frame + n , p , i ) ;
n += i ;
gcry_free ( p ) ;
}
frame [ n ++ ] = 0 ;
memcpy ( frame + n , value , valuelen ) ;
n += valuelen ;
gcry_assert ( n == nframe ) ;
err = gcry_mpi_scan ( r_result , GCRYMPI_FMT_USG , frame , n , & nframe ) ;
if ( err ) rc = gcry_err_code ( err ) ;
else if ( DBG_CIPHER ) log_mpidump ( "PKCS#1 block type 2 encoded data" , * r_result ) ;
gcry_free ( frame ) ;
return rc ;
} |
-1,102,844,685,921,778,700 | debian | 13 | 0 | struct archive_string * archive_strncat ( struct archive_string * as , const void * _p , size_t n ) {
size_t s ;
const char * p , * pp ;
p = ( const char * ) _p ;
s = 0 ;
pp = p ;
while ( s < n && * pp ) {
pp ++ ;
s ++ ;
}
if ( ( as = archive_string_append ( as , p , s ) ) == NULL ) __archive_errx ( 1 , "Out of memory" ) ;
return ( as ) ;
} |
-4,341,894,042,551,388,000 | chrome | 58 | 1 | static int combined_motion_search ( VP9_COMP * cpi , MACROBLOCK * x , BLOCK_SIZE bsize , int mi_row , int mi_col , int_mv * tmp_mv , int * rate_mv , int64_t best_rd_sofar ) {
MACROBLOCKD * xd = & x -> e_mbd ;
MB_MODE_INFO * mbmi = & xd -> mi [ 0 ] -> mbmi ;
struct buf_2d backup_yv12 [ MAX_MB_PLANE ] = {
{
0 , 0 }
}
;
const int step_param = cpi -> sf . mv . fullpel_search_step_param ;
const int sadpb = x -> sadperbit16 ;
MV mvp_full ;
const int ref = mbmi -> ref_frame [ 0 ] ;
const MV ref_mv = mbmi -> ref_mvs [ ref ] [ 0 ] . as_mv ;
int dis ;
int rate_mode ;
const int tmp_col_min = x -> mv_col_min ;
const int tmp_col_max = x -> mv_col_max ;
const int tmp_row_min = x -> mv_row_min ;
const int tmp_row_max = x -> mv_row_max ;
int rv = 0 ;
int sad_list [ 5 ] ;
const YV12_BUFFER_CONFIG * scaled_ref_frame = vp9_get_scaled_ref_frame ( cpi , ref ) ;
if ( cpi -> common . show_frame && ( x -> pred_mv_sad [ ref ] >> 3 ) > x -> pred_mv_sad [ LAST_FRAME ] ) return rv ;
if ( scaled_ref_frame ) {
int i ;
for ( i = 0 ;
i < MAX_MB_PLANE ;
i ++ ) backup_yv12 [ i ] = xd -> plane [ i ] . pre [ 0 ] ;
vp9_setup_pre_planes ( xd , 0 , scaled_ref_frame , mi_row , mi_col , NULL ) ;
}
vp9_set_mv_search_range ( x , & ref_mv ) ;
assert ( x -> mv_best_ref_index [ ref ] <= 2 ) ;
if ( x -> mv_best_ref_index [ ref ] < 2 ) mvp_full = mbmi -> ref_mvs [ ref ] [ x -> mv_best_ref_index [ ref ] ] . as_mv ;
else mvp_full = x -> pred_mv [ ref ] ;
mvp_full . col >>= 3 ;
mvp_full . row >>= 3 ;
vp9_full_pixel_search ( cpi , x , bsize , & mvp_full , step_param , sadpb , cond_sad_list ( cpi , sad_list ) , & ref_mv , & tmp_mv -> as_mv , INT_MAX , 0 ) ;
x -> mv_col_min = tmp_col_min ;
x -> mv_col_max = tmp_col_max ;
x -> mv_row_min = tmp_row_min ;
x -> mv_row_max = tmp_row_max ;
mvp_full . row = tmp_mv -> as_mv . row * 8 ;
mvp_full . col = tmp_mv -> as_mv . col * 8 ;
* rate_mv = vp9_mv_bit_cost ( & mvp_full , & ref_mv , x -> nmvjointcost , x -> mvcost , MV_COST_WEIGHT ) ;
rate_mode = cpi -> inter_mode_cost [ mbmi -> mode_context [ ref ] ] [ INTER_OFFSET ( NEWMV ) ] ;
rv = ! ( RDCOST ( x -> rdmult , x -> rddiv , ( * rate_mv + rate_mode ) , 0 ) > best_rd_sofar ) ;
if ( rv ) {
cpi -> find_fractional_mv_step ( x , & tmp_mv -> as_mv , & ref_mv , cpi -> common . allow_high_precision_mv , x -> errorperbit , & cpi -> fn_ptr [ bsize ] , cpi -> sf . mv . subpel_force_stop , cpi -> sf . mv . subpel_iters_per_step , cond_sad_list ( cpi , sad_list ) , x -> nmvjointcost , x -> mvcost , & dis , & x -> pred_sse [ ref ] , NULL , 0 , 0 ) ;
x -> pred_mv [ ref ] = tmp_mv -> as_mv ;
}
if ( scaled_ref_frame ) {
int i ;
for ( i = 0 ;
i < MAX_MB_PLANE ;
i ++ ) xd -> plane [ i ] . pre [ 0 ] = backup_yv12 [ i ] ;
}
return rv ;
} |
6,453,796,474,132,806,000 | chrome | 9 | 1 | static void _UTF7Open ( UConverter * cnv , UConverterLoadArgs * pArgs , UErrorCode * pErrorCode ) {
if ( UCNV_GET_VERSION ( cnv ) <= 1 ) {
cnv -> fromUnicodeStatus = UCNV_GET_VERSION ( cnv ) << 28 ;
_UTF7Reset ( cnv , UCNV_RESET_BOTH ) ;
}
else {
* pErrorCode = U_ILLEGAL_ARGUMENT_ERROR ;
}
} |
-5,697,857,125,570,094,000 | chrome | 9 | 0 | static UBool _isPrivateuseVariantSubtag ( const char * s , int32_t len ) {
if ( len < 0 ) {
len = ( int32_t ) uprv_strlen ( s ) ;
}
if ( len >= 1 && len <= 8 && _isAlphaNumericString ( s , len ) ) {
return TRUE ;
}
return FALSE ;
} |
1,366,214,969,540,455,700 | debian | 97 | 1 | int i2d_ ## name ( type * a , unsigned char * * out ) ;
DECLARE_ASN1_ITEM ( itname ) # define DECLARE_ASN1_ENCODE_FUNCTIONS_const ( type , name ) type * d2i_ ## name ( type * * a , const unsigned char * * in , long len ) ;
int i2d_ ## name ( const type * a , unsigned char * * out ) ;
DECLARE_ASN1_ITEM ( name ) # define DECLARE_ASN1_NDEF_FUNCTION ( name ) int i2d_ ## name ## _NDEF ( name * a , unsigned char * * out ) ;
# define DECLARE_ASN1_FUNCTIONS_const ( name ) DECLARE_ASN1_ALLOC_FUNCTIONS ( name ) DECLARE_ASN1_ENCODE_FUNCTIONS_const ( name , name ) # define DECLARE_ASN1_ALLOC_FUNCTIONS_name ( type , name ) type * name ## _new ( void ) ;
void name ## _free ( type * a ) ;
# define DECLARE_ASN1_PRINT_FUNCTION ( stname ) DECLARE_ASN1_PRINT_FUNCTION_fname ( stname , stname ) # define DECLARE_ASN1_PRINT_FUNCTION_fname ( stname , fname ) int fname ## _print_ctx ( BIO * out , stname * x , int indent , const ASN1_PCTX * pctx ) ;
# define D2I_OF ( type ) type * ( * ) ( type * * , const unsigned char * * , long ) # define I2D_OF ( type ) int ( * ) ( type * , unsigned char * * ) # define I2D_OF_const ( type ) int ( * ) ( const type * , unsigned char * * ) # define CHECKED_D2I_OF ( type , d2i ) ( ( d2i_of_void * ) ( 1 ? d2i : ( ( D2I_OF ( type ) ) 0 ) ) ) # define CHECKED_I2D_OF ( type , i2d ) ( ( i2d_of_void * ) ( 1 ? i2d : ( ( I2D_OF ( type ) ) 0 ) ) ) # define CHECKED_NEW_OF ( type , xnew ) ( ( void * ( * ) ( void ) ) ( 1 ? xnew : ( ( type * ( * ) ( void ) ) 0 ) ) ) # define CHECKED_PTR_OF ( type , p ) ( ( void * ) ( 1 ? p : ( type * ) 0 ) ) # define CHECKED_PPTR_OF ( type , p ) ( ( void * * ) ( 1 ? p : ( type * * ) 0 ) ) # define TYPEDEF_D2I_OF ( type ) typedef type * d2i_of_ ## type ( type * * , const unsigned char * * , long ) # define TYPEDEF_I2D_OF ( type ) typedef int i2d_of_ ## type ( type * , unsigned char * * ) # define TYPEDEF_D2I2D_OF ( type ) TYPEDEF_D2I_OF ( type ) ;
TYPEDEF_I2D_OF ( type ) TYPEDEF_D2I2D_OF ( void ) ;
# ifndef OPENSSL_EXPORT_VAR_AS_FUNCTION typedef const ASN1_ITEM ASN1_ITEM_EXP ;
# define ASN1_ITEM_ptr ( iptr ) ( iptr ) # define ASN1_ITEM_ref ( iptr ) ( & ( iptr ## _it ) ) # define ASN1_ITEM_rptr ( ref ) ( & ( ref ## _it ) ) # define DECLARE_ASN1_ITEM ( name ) OPENSSL_EXTERN const ASN1_ITEM name ## _it ;
# else typedef const ASN1_ITEM * ASN1_ITEM_EXP ( void ) ;
# define ASN1_ITEM_ptr ( iptr ) ( iptr ( ) ) # define ASN1_ITEM_ref ( iptr ) ( iptr ## _it ) # define ASN1_ITEM_rptr ( ref ) ( ref ## _it ( ) ) # define DECLARE_ASN1_ITEM ( name ) const ASN1_ITEM * name ## _it ( void ) ;
# endif # define ASN1_STRFLGS_ESC_2253 1 # define ASN1_STRFLGS_ESC_CTRL 2 # define ASN1_STRFLGS_ESC_MSB 4 # define ASN1_STRFLGS_ESC_QUOTE 8 # define CHARTYPE_PRINTABLESTRING 0x10 # define CHARTYPE_FIRST_ESC_2253 0x20 # define CHARTYPE_LAST_ESC_2253 0x40 # define ASN1_STRFLGS_UTF8_CONVERT 0x10 # define ASN1_STRFLGS_IGNORE_TYPE 0x20 # define ASN1_STRFLGS_SHOW_TYPE 0x40 # define ASN1_STRFLGS_DUMP_ALL 0x80 # define ASN1_STRFLGS_DUMP_UNKNOWN 0x100 # define ASN1_STRFLGS_DUMP_DER 0x200 # define ASN1_STRFLGS_ESC_2254 0x400 # define ASN1_STRFLGS_RFC2253 ( ASN1_STRFLGS_ESC_2253 | ASN1_STRFLGS_ESC_CTRL | ASN1_STRFLGS_ESC_MSB | ASN1_STRFLGS_UTF8_CONVERT | ASN1_STRFLGS_DUMP_UNKNOWN | ASN1_STRFLGS_DUMP_DER ) DEFINE_STACK_OF ( ASN1_INTEGER ) DEFINE_STACK_OF ( ASN1_GENERALSTRING ) DEFINE_STACK_OF ( ASN1_UTF8STRING ) typedef struct asn1_type_st {
int type ;
union {
char * ptr ;
ASN1_BOOLEAN boolean ;
ASN1_STRING * asn1_string ;
ASN1_OBJECT * object ;
ASN1_INTEGER * integer ;
ASN1_ENUMERATED * enumerated ;
ASN1_BIT_STRING * bit_string ;
ASN1_OCTET_STRING * octet_string ;
ASN1_PRINTABLESTRING * printablestring ;
ASN1_T61STRING * t61string ;
ASN1_IA5STRING * ia5string ;
ASN1_GENERALSTRING * generalstring ;
ASN1_BMPSTRING * bmpstring ;
ASN1_UNIVERSALSTRING * universalstring ;
ASN1_UTCTIME * utctime ;
ASN1_GENERALIZEDTIME * generalizedtime ;
ASN1_VISIBLESTRING * visiblestring ;
ASN1_UTF8STRING * utf8string ;
ASN1_STRING * set ;
ASN1_STRING * sequence ;
ASN1_VALUE * asn1_value ;
}
value ;
}
ASN1_TYPE ;
DEFINE_STACK_OF ( ASN1_TYPE ) typedef STACK_OF ( ASN1_TYPE ) ASN1_SEQUENCE_ANY ;
DECLARE_ASN1_ENCODE_FUNCTIONS_const ( ASN1_SEQUENCE_ANY , ASN1_SEQUENCE_ANY ) DECLARE_ASN1_ENCODE_FUNCTIONS_const ( ASN1_SEQUENCE_ANY , ASN1_SET_ANY ) typedef struct BIT_STRING_BITNAME_st {
int bitnum ;
const char * lname ;
const char * sname ;
}
BIT_STRING_BITNAME ;
# define B_ASN1_TIME B_ASN1_UTCTIME | B_ASN1_GENERALIZEDTIME # define B_ASN1_PRINTABLE B_ASN1_NUMERICSTRING | B_ASN1_PRINTABLESTRING | B_ASN1_T61STRING | B_ASN1_IA5STRING | B_ASN1_BIT_STRING | B_ASN1_UNIVERSALSTRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING | B_ASN1_SEQUENCE | B_ASN1_UNKNOWN # define B_ASN1_DIRECTORYSTRING B_ASN1_PRINTABLESTRING | B_ASN1_TELETEXSTRING | B_ASN1_BMPSTRING | B_ASN1_UNIVERSALSTRING | B_ASN1_UTF8STRING # define B_ASN1_DISPLAYTEXT B_ASN1_IA5STRING | B_ASN1_VISIBLESTRING | B_ASN1_BMPSTRING | B_ASN1_UTF8STRING DECLARE_ASN1_FUNCTIONS_fname ( ASN1_TYPE , ASN1_ANY , ASN1_TYPE ) int ASN1_TYPE_get ( const ASN1_TYPE * a ) ;
void ASN1_TYPE_set ( ASN1_TYPE * a , int type , void * value ) ;
int ASN1_TYPE_set1 ( ASN1_TYPE * a , int type , const void * value ) ;
int ASN1_TYPE_cmp ( const ASN1_TYPE * a , const ASN1_TYPE * b ) ;
ASN1_TYPE * ASN1_TYPE_pack_sequence ( const ASN1_ITEM * it , void * s , ASN1_TYPE * * t ) ;
void * ASN1_TYPE_unpack_sequence ( const ASN1_ITEM * it , const ASN1_TYPE * t ) ;
ASN1_OBJECT * ASN1_OBJECT_new ( void ) ;
void ASN1_OBJECT_free ( ASN1_OBJECT * a ) ;
int i2d_ASN1_OBJECT ( const ASN1_OBJECT * a , unsigned char * * pp ) ;
ASN1_OBJECT * d2i_ASN1_OBJECT ( ASN1_OBJECT * * a , const unsigned char * * pp , long length ) ;
DECLARE_ASN1_ITEM ( ASN1_OBJECT ) DEFINE_STACK_OF ( ASN1_OBJECT ) ASN1_STRING * ASN1_STRING_new ( void ) ;
void ASN1_STRING_free ( ASN1_STRING * a ) ;
void ASN1_STRING_clear_free ( ASN1_STRING * a ) ;
int ASN1_STRING_copy ( ASN1_STRING * dst , const ASN1_STRING * str ) ;
ASN1_STRING * ASN1_STRING_dup ( const ASN1_STRING * a ) ;
ASN1_STRING * ASN1_STRING_type_new ( int type ) ;
int ASN1_STRING_cmp ( const ASN1_STRING * a , const ASN1_STRING * b ) ;
int ASN1_STRING_set ( ASN1_STRING * str , const void * data , int len ) ;
void ASN1_STRING_set0 ( ASN1_STRING * str , void * data , int len ) ;
int ASN1_STRING_length ( const ASN1_STRING * x ) ;
void ASN1_STRING_length_set ( ASN1_STRING * x , int n ) ;
int ASN1_STRING_type ( const ASN1_STRING * x ) ;
DEPRECATEDIN_1_1_0 ( unsigned char * ASN1_STRING_data ( ASN1_STRING * x ) ) const unsigned char * ASN1_STRING_get0_data ( const ASN1_STRING * x ) ;
DECLARE_ASN1_FUNCTIONS ( ASN1_BIT_STRING ) int ASN1_BIT_STRING_set ( ASN1_BIT_STRING * a , unsigned char * d , int length ) ;
int ASN1_BIT_STRING_set_bit ( ASN1_BIT_STRING * a , int n , int value ) ;
int ASN1_BIT_STRING_get_bit ( const ASN1_BIT_STRING * a , int n ) ;
int ASN1_BIT_STRING_check ( const ASN1_BIT_STRING * a , const unsigned char * flags , int flags_len ) ;
int ASN1_BIT_STRING_name_print ( BIO * out , ASN1_BIT_STRING * bs , BIT_STRING_BITNAME * tbl , int indent ) ;
int ASN1_BIT_STRING_num_asc ( const char * name , BIT_STRING_BITNAME * tbl ) ;
int ASN1_BIT_STRING_set_asc ( ASN1_BIT_STRING * bs , const char * name , int value , BIT_STRING_BITNAME * tbl ) ;
DECLARE_ASN1_FUNCTIONS ( ASN1_INTEGER ) ASN1_INTEGER * d2i_ASN1_UINTEGER ( ASN1_INTEGER * * a , const unsigned char * * pp , long length ) ;
ASN1_INTEGER * ASN1_INTEGER_dup ( const ASN1_INTEGER * x ) ;
int ASN1_INTEGER_cmp ( const ASN1_INTEGER * x , const ASN1_INTEGER * y ) ;
DECLARE_ASN1_FUNCTIONS ( ASN1_ENUMERATED ) int ASN1_UTCTIME_check ( const ASN1_UTCTIME * a ) ;
ASN1_UTCTIME * ASN1_UTCTIME_set ( ASN1_UTCTIME * s , time_t t ) ;
ASN1_UTCTIME * ASN1_UTCTIME_adj ( ASN1_UTCTIME * s , time_t t , int offset_day , long offset_sec ) ;
int ASN1_UTCTIME_set_string ( ASN1_UTCTIME * s , const char * str ) ;
int ASN1_UTCTIME_cmp_time_t ( const ASN1_UTCTIME * s , time_t t ) ;
int ASN1_GENERALIZEDTIME_check ( const ASN1_GENERALIZEDTIME * a ) ;
ASN1_GENERALIZEDTIME * ASN1_GENERALIZEDTIME_set ( ASN1_GENERALIZEDTIME * s , time_t t ) ;
ASN1_GENERALIZEDTIME * ASN1_GENERALIZEDTIME_adj ( ASN1_GENERALIZEDTIME * s , time_t t , int offset_day , long offset_sec ) ;
int ASN1_GENERALIZEDTIME_set_string ( ASN1_GENERALIZEDTIME * s , const char * str ) ;
int ASN1_TIME_diff ( int * pday , int * psec , const ASN1_TIME * from , const ASN1_TIME * to ) ;
DECLARE_ASN1_FUNCTIONS ( ASN1_OCTET_STRING ) ASN1_OCTET_STRING * ASN1_OCTET_STRING_dup ( const ASN1_OCTET_STRING * a ) ;
int ASN1_OCTET_STRING_cmp ( const ASN1_OCTET_STRING * a , const ASN1_OCTET_STRING * b ) ;
int ASN1_OCTET_STRING_set ( ASN1_OCTET_STRING * str , const unsigned char * data , int len ) ;
DECLARE_ASN1_FUNCTIONS ( ASN1_VISIBLESTRING ) DECLARE_ASN1_FUNCTIONS ( ASN1_UNIVERSALSTRING ) DECLARE_ASN1_FUNCTIONS ( ASN1_UTF8STRING ) DECLARE_ASN1_FUNCTIONS ( ASN1_NULL ) DECLARE_ASN1_FUNCTIONS ( ASN1_BMPSTRING ) int UTF8_getc ( const unsigned char * str , int len , unsigned long * val ) ;
int UTF8_putc ( unsigned char * str , int len , unsigned long value ) ;
DECLARE_ASN1_FUNCTIONS_name ( ASN1_STRING , ASN1_PRINTABLE ) |
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 ) |
-5,861,712,607,647,761,000 | debian | 37 | 0 | void _zip_dirent_torrent_normalize ( struct zip_dirent * de ) {
static struct tm torrenttime ;
static time_t last_mod = 0 ;
if ( last_mod == 0 ) {
# ifdef HAVE_STRUCT_TM_TM_ZONE time_t now ;
struct tm * l ;
# endif torrenttime . tm_sec = 0 ;
torrenttime . tm_min = 32 ;
torrenttime . tm_hour = 23 ;
torrenttime . tm_mday = 24 ;
torrenttime . tm_mon = 11 ;
torrenttime . tm_year = 96 ;
torrenttime . tm_wday = 0 ;
torrenttime . tm_yday = 0 ;
torrenttime . tm_isdst = 0 ;
# ifdef HAVE_STRUCT_TM_TM_ZONE time ( & now ) ;
l = localtime ( & now ) ;
torrenttime . tm_gmtoff = l -> tm_gmtoff ;
torrenttime . tm_zone = l -> tm_zone ;
# endif last_mod = mktime ( & torrenttime ) ;
}
de -> version_madeby = 0 ;
de -> version_needed = 20 ;
de -> bitflags = 2 ;
de -> comp_method = ZIP_CM_DEFLATE ;
de -> last_mod = last_mod ;
de -> disk_number = 0 ;
de -> int_attrib = 0 ;
de -> ext_attrib = 0 ;
de -> offset = 0 ;
free ( de -> extrafield ) ;
de -> extrafield = NULL ;
de -> extrafield_len = 0 ;
free ( de -> comment ) ;
de -> comment = NULL ;
de -> comment_len = 0 ;
} |
-5,268,859,819,325,808,000 | debian | 16 | 0 | static void directory_load_cancel ( NautilusDirectory * directory ) {
NautilusFile * file ;
DirectoryLoadState * state ;
state = directory -> details -> directory_load_in_progress ;
if ( state != NULL ) {
file = state -> load_directory_file ;
file -> details -> loading_directory = FALSE ;
if ( file -> details -> directory != directory ) {
nautilus_directory_async_state_changed ( file -> details -> directory ) ;
}
g_cancellable_cancel ( state -> cancellable ) ;
state -> directory = NULL ;
directory -> details -> directory_load_in_progress = NULL ;
async_job_end ( directory , "file list" ) ;
}
} |
-4,635,544,075,321,012,000 | debian | 25 | 0 | size_t Curl_FormReader ( char * buffer , size_t size , size_t nitems , FILE * mydata ) {
struct Form * form ;
size_t wantedsize ;
size_t gotsize = 0 ;
form = ( struct Form * ) mydata ;
wantedsize = size * nitems ;
if ( ! form -> data ) return 0 ;
if ( ( form -> data -> type == FORM_FILE ) || ( form -> data -> type == FORM_CALLBACK ) ) {
gotsize = readfromfile ( form , buffer , wantedsize ) ;
if ( gotsize ) return gotsize ;
}
do {
if ( ( form -> data -> length - form -> sent ) > wantedsize - gotsize ) {
memcpy ( buffer + gotsize , form -> data -> line + form -> sent , wantedsize - gotsize ) ;
form -> sent += wantedsize - gotsize ;
return wantedsize ;
}
memcpy ( buffer + gotsize , form -> data -> line + form -> sent , ( form -> data -> length - form -> sent ) ) ;
gotsize += form -> data -> length - form -> sent ;
form -> sent = 0 ;
form -> data = form -> data -> next ;
}
while ( form -> data && ( form -> data -> type < FORM_CALLBACK ) ) ;
return gotsize ;
} |
-6,032,494,406,888,258,000 | chrome | 72 | 0 | static int32_t U_CALLCONV lenient8IteratorGetIndex ( UCharIterator * iter , UCharIteratorOrigin origin ) {
switch ( origin ) {
case UITER_ZERO : case UITER_START : return 0 ;
case UITER_CURRENT : if ( iter -> index < 0 ) {
const uint8_t * s ;
UChar32 c ;
int32_t i , limit , index ;
s = ( const uint8_t * ) iter -> context ;
i = index = 0 ;
limit = iter -> start ;
while ( i < limit ) {
L8_NEXT ( s , i , limit , c ) ;
if ( c <= 0xffff ) {
++ index ;
}
else {
index += 2 ;
}
}
iter -> start = i ;
if ( i == iter -> limit ) {
iter -> length = index ;
}
if ( iter -> reservedField != 0 ) {
-- index ;
}
iter -> index = index ;
}
return iter -> index ;
case UITER_LIMIT : case UITER_LENGTH : if ( iter -> length < 0 ) {
const uint8_t * s ;
UChar32 c ;
int32_t i , limit , length ;
s = ( const uint8_t * ) iter -> context ;
if ( iter -> index < 0 ) {
i = length = 0 ;
limit = iter -> start ;
while ( i < limit ) {
L8_NEXT ( s , i , limit , c ) ;
if ( c <= 0xffff ) {
++ length ;
}
else {
length += 2 ;
}
}
iter -> start = i ;
iter -> index = iter -> reservedField != 0 ? length - 1 : length ;
}
else {
i = iter -> start ;
length = iter -> index ;
if ( iter -> reservedField != 0 ) {
++ length ;
}
}
limit = iter -> limit ;
while ( i < limit ) {
L8_NEXT ( s , i , limit , c ) ;
if ( c <= 0xffff ) {
++ length ;
}
else {
length += 2 ;
}
}
iter -> length = length ;
}
return iter -> length ;
default : return - 1 ;
}
} |
1,760,449,185,745,615,400 | debian | 16 | 0 | TSReturnCode TSHttpTxnServerPacketMarkSet ( TSHttpTxn txnp , int mark ) {
sdk_assert ( sdk_sanity_check_txn ( txnp ) == TS_SUCCESS ) ;
HttpSM * sm = ( HttpSM * ) txnp ;
if ( nullptr != sm -> ua_session ) {
HttpServerSession * ssn = sm -> ua_session -> get_server_session ( ) ;
if ( nullptr != ssn ) {
NetVConnection * vc = ssn -> get_netvc ( ) ;
if ( vc != nullptr ) {
vc -> options . packet_mark = ( uint32_t ) mark ;
vc -> apply_options ( ) ;
}
}
}
TSHttpTxnConfigIntSet ( txnp , TS_CONFIG_NET_SOCK_PACKET_MARK_OUT , mark ) ;
return TS_SUCCESS ;
} |
-5,706,788,925,640,467,000 | chrome | 19 | 0 | static void copy_partitioning ( VP9_COMMON * cm , MODE_INFO * mi_8x8 , MODE_INFO * prev_mi_8x8 ) {
const int mis = cm -> mi_stride ;
int block_row , block_col ;
for ( block_row = 0 ;
block_row < 8 ;
++ block_row ) {
for ( block_col = 0 ;
block_col < 8 ;
++ block_col ) {
MODE_INFO * const prev_mi = prev_mi_8x8 [ block_row * mis + block_col ] . src_mi ;
const BLOCK_SIZE sb_type = prev_mi ? prev_mi -> mbmi . sb_type : 0 ;
if ( prev_mi ) {
const ptrdiff_t offset = prev_mi - cm -> prev_mi ;
mi_8x8 [ block_row * mis + block_col ] . src_mi = cm -> mi + offset ;
mi_8x8 [ block_row * mis + block_col ] . src_mi -> mbmi . sb_type = sb_type ;
}
}
}
} |
-4,295,537,452,468,300,300 | debian | 35 | 0 | static int ir2_decode_frame ( AVCodecContext * avctx , void * data , int * got_frame , AVPacket * avpkt ) {
Ir2Context * const s = avctx -> priv_data ;
const uint8_t * buf = avpkt -> data ;
int buf_size = avpkt -> size ;
AVFrame * picture = data ;
AVFrame * const p = & s -> picture ;
int start , ret ;
if ( ( ret = ff_reget_buffer ( avctx , p ) ) < 0 ) {
av_log ( s -> avctx , AV_LOG_ERROR , "reget_buffer() failed\n" ) ;
return ret ;
}
start = 48 ;
if ( start >= buf_size ) {
av_log ( s -> avctx , AV_LOG_ERROR , "input buffer size too small (%d)\n" , buf_size ) ;
return AVERROR_INVALIDDATA ;
}
s -> decode_delta = buf [ 18 ] ;
# ifndef BITSTREAM_READER_LE for ( i = 0 ;
i < buf_size ;
i ++ ) buf [ i ] = ff_reverse [ buf [ i ] ] ;
# endif init_get_bits ( & s -> gb , buf + start , ( buf_size - start ) * 8 ) ;
if ( s -> decode_delta ) {
if ( ( ret = ir2_decode_plane ( s , avctx -> width , avctx -> height , s -> picture . data [ 0 ] , s -> picture . linesize [ 0 ] , ir2_luma_table ) ) < 0 ) return ret ;
if ( ( ret = ir2_decode_plane ( s , avctx -> width >> 2 , avctx -> height >> 2 , s -> picture . data [ 2 ] , s -> picture . linesize [ 2 ] , ir2_luma_table ) ) < 0 ) return ret ;
if ( ( ret = ir2_decode_plane ( s , avctx -> width >> 2 , avctx -> height >> 2 , s -> picture . data [ 1 ] , s -> picture . linesize [ 1 ] , ir2_luma_table ) ) < 0 ) return ret ;
}
else {
if ( ( ret = ir2_decode_plane_inter ( s , avctx -> width , avctx -> height , s -> picture . data [ 0 ] , s -> picture . linesize [ 0 ] , ir2_luma_table ) ) < 0 ) return ret ;
if ( ( ret = ir2_decode_plane_inter ( s , avctx -> width >> 2 , avctx -> height >> 2 , s -> picture . data [ 2 ] , s -> picture . linesize [ 2 ] , ir2_luma_table ) ) < 0 ) return ret ;
if ( ( ret = ir2_decode_plane_inter ( s , avctx -> width >> 2 , avctx -> height >> 2 , s -> picture . data [ 1 ] , s -> picture . linesize [ 1 ] , ir2_luma_table ) ) < 0 ) return ret ;
}
if ( ( ret = av_frame_ref ( picture , & s -> picture ) ) < 0 ) return ret ;
* got_frame = 1 ;
return buf_size ;
} |
6,600,620,671,673,715,000 | debian | 35 | 0 | gs_ref_memory_t * ialloc_alloc_state ( gs_memory_t * parent , uint clump_size ) {
clump_t * cp ;
gs_ref_memory_t * iimem = ialloc_solo ( parent , & st_ref_memory , & cp ) ;
if ( iimem == 0 ) return 0 ;
iimem -> stable_memory = ( gs_memory_t * ) iimem ;
iimem -> procs = gs_ref_memory_procs ;
iimem -> gs_lib_ctx = parent -> gs_lib_ctx ;
iimem -> non_gc_memory = parent ;
iimem -> thread_safe_memory = parent -> thread_safe_memory ;
iimem -> clump_size = clump_size ;
# ifdef MEMENTO iimem -> large_size = 1 ;
# else iimem -> large_size = ( ( clump_size / 4 ) & - obj_align_mod ) + 1 ;
# endif iimem -> is_controlled = false ;
iimem -> gc_status . vm_threshold = clump_size * 3L ;
iimem -> gc_status . max_vm = max_long ;
iimem -> gc_status . signal_value = 0 ;
iimem -> gc_status . enabled = false ;
iimem -> gc_status . requested = 0 ;
iimem -> gc_allocated = 0 ;
iimem -> previous_status . allocated = 0 ;
iimem -> previous_status . used = 0 ;
ialloc_reset ( iimem ) ;
iimem -> root = cp ;
ialloc_set_limit ( iimem ) ;
iimem -> cc = NULL ;
iimem -> save_level = 0 ;
iimem -> new_mask = 0 ;
iimem -> test_mask = ~ 0 ;
iimem -> streams = 0 ;
iimem -> names_array = 0 ;
iimem -> roots = 0 ;
iimem -> num_contexts = 0 ;
iimem -> saved = 0 ;
return iimem ;
} |
4,976,989,049,001,280,000 | debian | 38 | 0 | ParseResult validate_hdr_host ( HTTPHdrImpl * hh ) {
ParseResult ret = PARSE_RESULT_DONE ;
MIMEField * host_field = mime_hdr_field_find ( hh -> m_fields_impl , MIME_FIELD_HOST , MIME_LEN_HOST ) ;
if ( host_field ) {
if ( host_field -> has_dups ( ) ) {
ret = PARSE_RESULT_ERROR ;
}
else {
int host_len = 0 ;
const char * host_val = host_field -> value_get ( & host_len ) ;
ts : : ConstBuffer addr , port , rest , host ( host_val , host_len ) ;
if ( 0 == ats_ip_parse ( host , & addr , & port , & rest ) ) {
if ( port ) {
if ( port . size ( ) > 5 ) {
return PARSE_RESULT_ERROR ;
}
int port_i = ink_atoi ( port . data ( ) , port . size ( ) ) ;
if ( port_i >= 65536 || port_i <= 0 ) {
return PARSE_RESULT_ERROR ;
}
}
if ( ! validate_host_name ( addr ) ) {
return PARSE_RESULT_ERROR ;
}
while ( rest && PARSE_RESULT_DONE == ret ) {
if ( ! ParseRules : : is_ws ( * rest ) ) {
return PARSE_RESULT_ERROR ;
}
++ rest ;
}
}
else {
ret = PARSE_RESULT_ERROR ;
}
}
}
return ret ;
} |
-5,927,738,579,069,083,000 | debian | 173 | 1 | void xps_parse_path ( xps_document * doc , const fz_matrix * ctm , char * base_uri , xps_resource * dict , fz_xml * root ) {
fz_xml * node ;
char * fill_uri ;
char * stroke_uri ;
char * opacity_mask_uri ;
char * transform_att ;
char * clip_att ;
char * data_att ;
char * fill_att ;
char * stroke_att ;
char * opacity_att ;
char * opacity_mask_att ;
fz_xml * transform_tag = NULL ;
fz_xml * clip_tag = NULL ;
fz_xml * data_tag = NULL ;
fz_xml * fill_tag = NULL ;
fz_xml * stroke_tag = NULL ;
fz_xml * opacity_mask_tag = NULL ;
char * fill_opacity_att = NULL ;
char * stroke_opacity_att = NULL ;
char * stroke_dash_array_att ;
char * stroke_dash_cap_att ;
char * stroke_dash_offset_att ;
char * stroke_end_line_cap_att ;
char * stroke_start_line_cap_att ;
char * stroke_line_join_att ;
char * stroke_miter_limit_att ;
char * stroke_thickness_att ;
char * navigate_uri_att ;
fz_stroke_state * stroke = NULL ;
fz_matrix transform ;
float samples [ 32 ] ;
fz_colorspace * colorspace ;
fz_path * path = NULL ;
fz_path * stroke_path = NULL ;
fz_rect area ;
int fill_rule ;
int dash_len = 0 ;
fz_matrix local_ctm ;
transform_att = fz_xml_att ( root , "RenderTransform" ) ;
clip_att = fz_xml_att ( root , "Clip" ) ;
data_att = fz_xml_att ( root , "Data" ) ;
fill_att = fz_xml_att ( root , "Fill" ) ;
stroke_att = fz_xml_att ( root , "Stroke" ) ;
opacity_att = fz_xml_att ( root , "Opacity" ) ;
opacity_mask_att = fz_xml_att ( root , "OpacityMask" ) ;
stroke_dash_array_att = fz_xml_att ( root , "StrokeDashArray" ) ;
stroke_dash_cap_att = fz_xml_att ( root , "StrokeDashCap" ) ;
stroke_dash_offset_att = fz_xml_att ( root , "StrokeDashOffset" ) ;
stroke_end_line_cap_att = fz_xml_att ( root , "StrokeEndLineCap" ) ;
stroke_start_line_cap_att = fz_xml_att ( root , "StrokeStartLineCap" ) ;
stroke_line_join_att = fz_xml_att ( root , "StrokeLineJoin" ) ;
stroke_miter_limit_att = fz_xml_att ( root , "StrokeMiterLimit" ) ;
stroke_thickness_att = fz_xml_att ( root , "StrokeThickness" ) ;
navigate_uri_att = fz_xml_att ( root , "FixedPage.NavigateUri" ) ;
for ( node = fz_xml_down ( root ) ;
node ;
node = fz_xml_next ( node ) ) {
if ( ! strcmp ( fz_xml_tag ( node ) , "Path.RenderTransform" ) ) transform_tag = fz_xml_down ( node ) ;
if ( ! strcmp ( fz_xml_tag ( node ) , "Path.OpacityMask" ) ) opacity_mask_tag = fz_xml_down ( node ) ;
if ( ! strcmp ( fz_xml_tag ( node ) , "Path.Clip" ) ) clip_tag = fz_xml_down ( node ) ;
if ( ! strcmp ( fz_xml_tag ( node ) , "Path.Fill" ) ) fill_tag = fz_xml_down ( node ) ;
if ( ! strcmp ( fz_xml_tag ( node ) , "Path.Stroke" ) ) stroke_tag = fz_xml_down ( node ) ;
if ( ! strcmp ( fz_xml_tag ( node ) , "Path.Data" ) ) data_tag = fz_xml_down ( node ) ;
}
fill_uri = base_uri ;
stroke_uri = base_uri ;
opacity_mask_uri = base_uri ;
xps_resolve_resource_reference ( doc , dict , & data_att , & data_tag , NULL ) ;
xps_resolve_resource_reference ( doc , dict , & clip_att , & clip_tag , NULL ) ;
xps_resolve_resource_reference ( doc , dict , & transform_att , & transform_tag , NULL ) ;
xps_resolve_resource_reference ( doc , dict , & fill_att , & fill_tag , & fill_uri ) ;
xps_resolve_resource_reference ( doc , dict , & stroke_att , & stroke_tag , & stroke_uri ) ;
xps_resolve_resource_reference ( doc , dict , & opacity_mask_att , & opacity_mask_tag , & opacity_mask_uri ) ;
if ( ! data_att && ! data_tag ) return ;
if ( fill_tag && ! strcmp ( fz_xml_tag ( fill_tag ) , "SolidColorBrush" ) ) {
fill_opacity_att = fz_xml_att ( fill_tag , "Opacity" ) ;
fill_att = fz_xml_att ( fill_tag , "Color" ) ;
fill_tag = NULL ;
}
if ( stroke_tag && ! strcmp ( fz_xml_tag ( stroke_tag ) , "SolidColorBrush" ) ) {
stroke_opacity_att = fz_xml_att ( stroke_tag , "Opacity" ) ;
stroke_att = fz_xml_att ( stroke_tag , "Color" ) ;
stroke_tag = NULL ;
}
if ( stroke_att || stroke_tag ) {
if ( stroke_dash_array_att ) {
char * s = stroke_dash_array_att ;
while ( * s ) {
while ( * s == ' ' ) s ++ ;
if ( * s ) dash_len ++ ;
while ( * s && * s != ' ' ) s ++ ;
}
}
stroke = fz_new_stroke_state_with_dash_len ( doc -> ctx , dash_len ) ;
stroke -> start_cap = xps_parse_line_cap ( stroke_start_line_cap_att ) ;
stroke -> dash_cap = xps_parse_line_cap ( stroke_dash_cap_att ) ;
stroke -> end_cap = xps_parse_line_cap ( stroke_end_line_cap_att ) ;
stroke -> linejoin = FZ_LINEJOIN_MITER_XPS ;
if ( stroke_line_join_att ) {
if ( ! strcmp ( stroke_line_join_att , "Miter" ) ) stroke -> linejoin = FZ_LINEJOIN_MITER_XPS ;
if ( ! strcmp ( stroke_line_join_att , "Round" ) ) stroke -> linejoin = FZ_LINEJOIN_ROUND ;
if ( ! strcmp ( stroke_line_join_att , "Bevel" ) ) stroke -> linejoin = FZ_LINEJOIN_BEVEL ;
}
stroke -> miterlimit = 10 ;
if ( stroke_miter_limit_att ) stroke -> miterlimit = fz_atof ( stroke_miter_limit_att ) ;
stroke -> linewidth = 1 ;
if ( stroke_thickness_att ) stroke -> linewidth = fz_atof ( stroke_thickness_att ) ;
stroke -> dash_phase = 0 ;
stroke -> dash_len = 0 ;
if ( stroke_dash_array_att ) {
char * s = stroke_dash_array_att ;
if ( stroke_dash_offset_att ) stroke -> dash_phase = fz_atof ( stroke_dash_offset_att ) * stroke -> linewidth ;
while ( * s ) {
while ( * s == ' ' ) s ++ ;
if ( * s ) stroke -> dash_list [ stroke -> dash_len ++ ] = fz_atof ( s ) * stroke -> linewidth ;
while ( * s && * s != ' ' ) s ++ ;
}
stroke -> dash_len = dash_len ;
}
}
transform = fz_identity ;
if ( transform_att ) xps_parse_render_transform ( doc , transform_att , & transform ) ;
if ( transform_tag ) xps_parse_matrix_transform ( doc , transform_tag , & transform ) ;
fz_concat ( & local_ctm , & transform , ctm ) ;
if ( clip_att || clip_tag ) xps_clip ( doc , & local_ctm , dict , clip_att , clip_tag ) ;
fill_rule = 0 ;
if ( data_att ) path = xps_parse_abbreviated_geometry ( doc , data_att , & fill_rule ) ;
else if ( data_tag ) {
path = xps_parse_path_geometry ( doc , dict , data_tag , 0 , & fill_rule ) ;
if ( stroke_att || stroke_tag ) stroke_path = xps_parse_path_geometry ( doc , dict , data_tag , 1 , & fill_rule ) ;
}
if ( ! stroke_path ) stroke_path = path ;
if ( stroke_att || stroke_tag ) {
fz_bound_path ( doc -> ctx , stroke_path , stroke , & local_ctm , & area ) ;
if ( stroke_path != path && ( fill_att || fill_tag ) ) {
fz_rect bounds ;
fz_bound_path ( doc -> ctx , path , NULL , & local_ctm , & bounds ) ;
fz_union_rect ( & area , & bounds ) ;
}
}
else fz_bound_path ( doc -> ctx , path , NULL , & local_ctm , & area ) ;
if ( navigate_uri_att ) xps_add_link ( doc , & area , base_uri , navigate_uri_att ) ;
xps_begin_opacity ( doc , & local_ctm , & area , opacity_mask_uri , dict , opacity_att , opacity_mask_tag ) ;
if ( fill_att ) {
xps_parse_color ( doc , base_uri , fill_att , & colorspace , samples ) ;
if ( fill_opacity_att ) samples [ 0 ] *= fz_atof ( fill_opacity_att ) ;
xps_set_color ( doc , colorspace , samples ) ;
fz_fill_path ( doc -> dev , path , fill_rule == 0 , & local_ctm , doc -> colorspace , doc -> color , doc -> alpha ) ;
}
if ( fill_tag ) {
fz_clip_path ( doc -> dev , path , & area , fill_rule == 0 , & local_ctm ) ;
xps_parse_brush ( doc , & local_ctm , & area , fill_uri , dict , fill_tag ) ;
fz_pop_clip ( doc -> dev ) ;
}
if ( stroke_att ) {
xps_parse_color ( doc , base_uri , stroke_att , & colorspace , samples ) ;
if ( stroke_opacity_att ) samples [ 0 ] *= fz_atof ( stroke_opacity_att ) ;
xps_set_color ( doc , colorspace , samples ) ;
fz_stroke_path ( doc -> dev , stroke_path , stroke , & local_ctm , doc -> colorspace , doc -> color , doc -> alpha ) ;
}
if ( stroke_tag ) {
fz_clip_stroke_path ( doc -> dev , stroke_path , & area , stroke , & local_ctm ) ;
xps_parse_brush ( doc , & local_ctm , & area , stroke_uri , dict , stroke_tag ) ;
fz_pop_clip ( doc -> dev ) ;
}
xps_end_opacity ( doc , opacity_mask_uri , dict , opacity_att , opacity_mask_tag ) ;
if ( stroke_path != path ) fz_free_path ( doc -> ctx , stroke_path ) ;
fz_free_path ( doc -> ctx , path ) ;
path = NULL ;
fz_drop_stroke_state ( doc -> ctx , stroke ) ;
if ( clip_att || clip_tag ) fz_pop_clip ( doc -> dev ) ;
} |
6,250,095,321,513,210,000 | debian | 15 | 1 | rfbBool rfbSendXvp ( rfbClientPtr cl , uint8_t version , uint8_t code ) {
rfbXvpMsg xvp ;
xvp . type = rfbXvp ;
xvp . pad = 0 ;
xvp . version = version ;
xvp . code = code ;
LOCK ( cl -> sendMutex ) ;
if ( rfbWriteExact ( cl , ( char * ) & xvp , sz_rfbXvpMsg ) < 0 ) {
rfbLogPerror ( "rfbSendXvp: write" ) ;
rfbCloseClient ( cl ) ;
}
UNLOCK ( cl -> sendMutex ) ;
rfbStatRecordMessageSent ( cl , rfbXvp , sz_rfbXvpMsg , sz_rfbXvpMsg ) ;
return TRUE ;
} |
2,917,602,761,308,156,400 | debian | 17 | 0 | static Asn1Generic * DecodeAsn1DerNull ( const unsigned char * buffer , uint32_t size , uint8_t depth , uint32_t * errcode ) {
const unsigned char * d_ptr = buffer ;
uint8_t numbytes ;
uint32_t value ;
Asn1Generic * a ;
numbytes = d_ptr [ 1 ] ;
d_ptr += 2 ;
if ( DecodeAsn1BuildValue ( & d_ptr , & value , numbytes , errcode ) == - 1 ) {
return NULL ;
}
a = Asn1GenericNew ( ) ;
if ( a == NULL ) return NULL ;
a -> type = ASN1_NULL ;
a -> length = ( d_ptr - buffer ) ;
a -> value = 0 ;
return a ;
} |
8,693,230,691,624,197,000 | chrome | 15 | 0 | IN_PROC_BROWSER_TEST_F ( ExtensionPreferenceApiTest , SessionOnlyIncognito ) {
PrefService * prefs = profile_ -> GetPrefs ( ) ;
prefs -> SetBoolean ( prefs : : kBlockThirdPartyCookies , false ) ;
EXPECT_TRUE ( RunExtensionTestIncognito ( "preference/session_only_incognito" ) ) << message_ ;
EXPECT_TRUE ( profile_ -> HasOffTheRecordProfile ( ) ) ;
PrefService * otr_prefs = profile_ -> GetOffTheRecordProfile ( ) -> GetPrefs ( ) ;
const PrefService : : Preference * pref = otr_prefs -> FindPreference ( prefs : : kBlockThirdPartyCookies ) ;
ASSERT_TRUE ( pref ) ;
EXPECT_TRUE ( pref -> IsExtensionControlled ( ) ) ;
EXPECT_FALSE ( otr_prefs -> GetBoolean ( prefs : : kBlockThirdPartyCookies ) ) ;
pref = prefs -> FindPreference ( prefs : : kBlockThirdPartyCookies ) ;
ASSERT_TRUE ( pref ) ;
EXPECT_FALSE ( pref -> IsExtensionControlled ( ) ) ;
EXPECT_FALSE ( prefs -> GetBoolean ( prefs : : kBlockThirdPartyCookies ) ) ;
} |
-1,894,649,941,813,935,600 | chrome | 8 | 0 | TEST_F ( BudgetManagerTest , TestInsecureOrigin ) {
const blink : : mojom : : BudgetOperationType type = blink : : mojom : : BudgetOperationType : : SILENT_PUSH ;
SetOrigin ( url : : Origin ( GURL ( "http://example.com" ) ) ) ;
SetSiteEngagementScore ( kTestSES ) ;
ASSERT_FALSE ( ReserveBudget ( type ) ) ;
ASSERT_EQ ( blink : : mojom : : BudgetServiceErrorType : : NOT_SUPPORTED , error_ ) ;
ASSERT_FALSE ( ConsumeBudget ( type ) ) ;
} |
-6,704,066,512,670,389,000 | debian | 6 | 0 | static void passphrase_free ( char * ppbuff ) {
if ( ppbuff != NULL ) {
memset ( ppbuff , 0 , PPBUFF_SIZE ) ;
free ( ppbuff ) ;
}
} |
7,092,216,800,726,730,000 | debian | 4 | 0 | static int dissect_h245_Cmd_clockRecovery ( 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_Cmd_clockRecovery , Cmd_clockRecovery_choice , NULL ) ;
return offset ;
} |
7,651,945,086,108,393,000 | debian | 11 | 0 | int qemuMonitorJSONSystemReset ( qemuMonitorPtr mon ) {
int ret ;
virJSONValuePtr cmd = qemuMonitorJSONMakeCommand ( "system_reset" , NULL ) ;
virJSONValuePtr reply = NULL ;
if ( ! cmd ) return - 1 ;
ret = qemuMonitorJSONCommand ( mon , cmd , & reply ) ;
if ( ret == 0 ) ret = qemuMonitorJSONCheckError ( cmd , reply ) ;
virJSONValueFree ( cmd ) ;
virJSONValueFree ( reply ) ;
return ret ;
} |
2,709,342,705,526,909,400 | debian | 27 | 0 | int ssl_choose_client_version ( SSL * s , int version ) {
const version_info * vent ;
const version_info * table ;
switch ( s -> method -> version ) {
default : if ( version != s -> version ) return SSL_R_WRONG_SSL_VERSION ;
return 0 ;
case TLS_ANY_VERSION : table = tls_version_table ;
break ;
case DTLS_ANY_VERSION : table = dtls_version_table ;
break ;
}
for ( vent = table ;
vent -> version != 0 ;
++ vent ) {
const SSL_METHOD * method ;
int err ;
if ( version != vent -> version ) continue ;
if ( vent -> cmeth == NULL ) break ;
method = vent -> cmeth ( ) ;
err = ssl_method_error ( s , method ) ;
if ( err != 0 ) return err ;
s -> method = method ;
s -> version = version ;
return 0 ;
}
return SSL_R_UNSUPPORTED_PROTOCOL ;
} |
-5,268,859,819,325,808,000 | debian | 45 | 0 | static void start_or_stop_io ( NautilusDirectory * directory ) {
NautilusFile * file ;
gboolean doing_io ;
file_list_start_or_stop ( directory ) ;
file_info_stop ( directory ) ;
directory_count_stop ( directory ) ;
deep_count_stop ( directory ) ;
mime_list_stop ( directory ) ;
link_info_stop ( directory ) ;
extension_info_stop ( directory ) ;
mount_stop ( directory ) ;
thumbnail_stop ( directory ) ;
filesystem_info_stop ( directory ) ;
doing_io = FALSE ;
while ( ! nautilus_file_queue_is_empty ( directory -> details -> high_priority_queue ) ) {
file = nautilus_file_queue_head ( directory -> details -> high_priority_queue ) ;
file_info_start ( directory , file , & doing_io ) ;
link_info_start ( directory , file , & doing_io ) ;
if ( doing_io ) {
return ;
}
move_file_to_low_priority_queue ( directory , file ) ;
}
while ( ! nautilus_file_queue_is_empty ( directory -> details -> low_priority_queue ) ) {
file = nautilus_file_queue_head ( directory -> details -> low_priority_queue ) ;
mount_start ( directory , file , & doing_io ) ;
directory_count_start ( directory , file , & doing_io ) ;
deep_count_start ( directory , file , & doing_io ) ;
mime_list_start ( directory , file , & doing_io ) ;
thumbnail_start ( directory , file , & doing_io ) ;
filesystem_info_start ( directory , file , & doing_io ) ;
if ( doing_io ) {
return ;
}
move_file_to_extension_queue ( directory , file ) ;
}
while ( ! nautilus_file_queue_is_empty ( directory -> details -> extension_queue ) ) {
file = nautilus_file_queue_head ( directory -> details -> extension_queue ) ;
extension_info_start ( directory , file , & doing_io ) ;
if ( doing_io ) {
return ;
}
nautilus_directory_remove_file_from_work_queue ( directory , file ) ;
}
} |
1,353,431,100,313,404,400 | chrome | 17 | 0 | static void predict_and_reconstruct_intra_block ( int plane , int block , BLOCK_SIZE plane_bsize , TX_SIZE tx_size , void * arg ) {
struct intra_args * const args = ( struct intra_args * ) arg ;
VP9_COMMON * const cm = args -> cm ;
MACROBLOCKD * const xd = args -> xd ;
struct macroblockd_plane * const pd = & xd -> plane [ plane ] ;
MODE_INFO * const mi = xd -> mi [ 0 ] . src_mi ;
const PREDICTION_MODE mode = ( plane == 0 ) ? get_y_mode ( mi , block ) : mi -> mbmi . uv_mode ;
int x , y ;
uint8_t * dst ;
txfrm_block_to_raster_xy ( plane_bsize , tx_size , block , & x , & y ) ;
dst = & pd -> dst . buf [ 4 * y * pd -> dst . stride + 4 * x ] ;
vp9_predict_intra_block ( xd , block >> ( tx_size << 1 ) , b_width_log2 ( plane_bsize ) , tx_size , mode , dst , pd -> dst . stride , dst , pd -> dst . stride , x , y , plane ) ;
if ( ! mi -> mbmi . skip ) {
const int eob = vp9_decode_block_tokens ( cm , xd , plane , block , plane_bsize , x , y , tx_size , args -> r ) ;
inverse_transform_block ( xd , plane , block , tx_size , dst , pd -> dst . stride , eob ) ;
}
} |
1,760,449,185,745,615,400 | debian | 481 | 1 | TSReturnCode TSHttpTxnConfigFind ( const char * name , int length , TSOverridableConfigKey * conf , TSRecordDataType * type ) {
sdk_assert ( sdk_sanity_check_null_ptr ( ( void * ) name ) == TS_SUCCESS ) ;
sdk_assert ( sdk_sanity_check_null_ptr ( ( void * ) conf ) == TS_SUCCESS ) ;
TSOverridableConfigKey cnf = TS_CONFIG_NULL ;
TSRecordDataType typ = TS_RECORDDATATYPE_INT ;
if ( length == - 1 ) {
length = strlen ( name ) ;
}
switch ( length ) {
case 24 : if ( ! strncmp ( name , "proxy.config.srv_enabled" , length ) ) {
cnf = TS_CONFIG_SRV_ENABLED ;
}
break ;
case 28 : if ( ! strncmp ( name , "proxy.config.http.cache.http" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_HTTP ;
}
break ;
case 29 : if ( ! strncmp ( name , "proxy.config.ssl.hsts_max_age" , length ) ) {
cnf = TS_CONFIG_SSL_HSTS_MAX_AGE ;
}
break ;
case 31 : if ( ! strncmp ( name , "proxy.config.http.chunking.size" , length ) ) {
cnf = TS_CONFIG_HTTP_CHUNKING_SIZE ;
}
break ;
case 33 : if ( ! strncmp ( name , "proxy.config.http.cache.fuzz.time" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_FUZZ_TIME ;
}
else if ( ! strncmp ( name , "proxy.config.ssl.client.cert.path" , length ) ) {
cnf = TS_CONFIG_SSL_CERT_FILEPATH ;
typ = TS_RECORDDATATYPE_STRING ;
}
break ;
case 34 : if ( ! strncmp ( name , "proxy.config.http.chunking_enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_CHUNKING_ENABLED ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.generation" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_GENERATION ;
}
else if ( ! strncmp ( name , "proxy.config.http.insert_client_ip" , length ) ) {
cnf = TS_CONFIG_HTTP_ANONYMIZE_INSERT_CLIENT_IP ;
}
break ;
case 35 : switch ( name [ length - 1 ] ) {
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.range.write" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_RANGE_WRITE ;
}
break ;
case 'p' : if ( ! strncmp ( name , "proxy.config.http.normalize_ae_gzip" , length ) ) {
cnf = TS_CONFIG_HTTP_NORMALIZE_AE_GZIP ;
}
break ;
}
break ;
case 36 : switch ( name [ length - 1 ] ) {
case 'p' : if ( ! strncmp ( name , "proxy.config.http.cache.range.lookup" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_RANGE_LOOKUP ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.net.sock_packet_tos_out" , length ) ) {
cnf = TS_CONFIG_NET_SOCK_PACKET_TOS_OUT ;
}
break ;
case 'd' : if ( ! strncmp ( name , "proxy.config.http.slow.log.threshold" , length ) ) {
cnf = TS_CONFIG_HTTP_SLOW_LOG_THRESHOLD ;
}
break ;
}
break ;
case 37 : switch ( name [ length - 1 ] ) {
case 'd' : if ( ! strncmp ( name , "proxy.config.http.redirection_enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_ENABLE_REDIRECTION ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.max_stale_age" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_MAX_STALE_AGE ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.fuzz.min_time" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_FUZZ_MIN_TIME ;
}
else if ( ! strncmp ( name , "proxy.config.http.default_buffer_size" , length ) ) {
cnf = TS_CONFIG_HTTP_DEFAULT_BUFFER_SIZE ;
}
else if ( ! strncmp ( name , "proxy.config.ssl.client.cert.filename" , length ) ) {
cnf = TS_CONFIG_SSL_CERT_FILENAME ;
typ = TS_RECORDDATATYPE_STRING ;
}
break ;
case 'r' : if ( ! strncmp ( name , "proxy.config.http.response_server_str" , length ) ) {
cnf = TS_CONFIG_HTTP_RESPONSE_SERVER_STR ;
typ = TS_RECORDDATATYPE_STRING ;
}
else if ( ! strncmp ( name , "proxy.config.ssl.client.verify.server" , length ) ) {
cnf = TS_CONFIG_SSL_CLIENT_VERIFY_SERVER ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.http.keep_alive_post_out" , length ) ) {
cnf = TS_CONFIG_HTTP_KEEP_ALIVE_POST_OUT ;
}
else if ( ! strncmp ( name , "proxy.config.net.sock_option_flag_out" , length ) ) {
cnf = TS_CONFIG_NET_SOCK_OPTION_FLAG_OUT ;
}
else if ( ! strncmp ( name , "proxy.config.net.sock_packet_mark_out" , length ) ) {
cnf = TS_CONFIG_NET_SOCK_PACKET_MARK_OUT ;
}
else if ( ! strncmp ( name , "proxy.config.websocket.active_timeout" , length ) ) {
cnf = TS_CONFIG_WEBSOCKET_ACTIVE_TIMEOUT ;
}
break ;
}
break ;
case 38 : switch ( name [ length - 1 ] ) {
case 'd' : if ( ! strncmp ( name , "proxy.config.http.server_tcp_init_cwnd" , length ) ) {
cnf = TS_CONFIG_HTTP_SERVER_TCP_INIT_CWND ;
}
else if ( ! strncmp ( name , "proxy.config.http.flow_control.enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_FLOW_CONTROL_ENABLED ;
}
break ;
break ;
case 's' : if ( ! strncmp ( name , "proxy.config.http.send_http11_requests" , length ) ) {
cnf = TS_CONFIG_HTTP_SEND_HTTP11_REQUESTS ;
}
break ;
}
break ;
case 39 : switch ( name [ length - 1 ] ) {
case 'e' : if ( ! strncmp ( name , "proxy.config.body_factory.template_base" , length ) ) {
cnf = TS_CONFIG_BODY_FACTORY_TEMPLATE_BASE ;
typ = TS_RECORDDATATYPE_STRING ;
}
break ;
case 'm' : if ( ! strncmp ( name , "proxy.config.http.anonymize_remove_from" , length ) ) {
cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_FROM ;
}
break ;
case 'n' : if ( ! strncmp ( name , "proxy.config.http.keep_alive_enabled_in" , length ) ) {
cnf = TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_IN ;
}
break ;
case 's' : if ( ! strncmp ( name , "proxy.config.http.doc_in_cache_skip_dns" , length ) ) {
cnf = TS_CONFIG_HTTP_DOC_IN_CACHE_SKIP_DNS ;
}
break ;
}
break ;
case 40 : switch ( name [ length - 1 ] ) {
case 'd' : if ( ! strncmp ( name , "proxy.config.http.forward_connect_method" , length ) ) {
cnf = TS_CONFIG_HTTP_FORWARD_CONNECT_METHOD ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.down_server.cache_time" , length ) ) {
cnf = TS_CONFIG_HTTP_DOWN_SERVER_CACHE_TIME ;
}
else if ( ! strncmp ( name , "proxy.config.http.insert_age_in_response" , length ) ) {
cnf = TS_CONFIG_HTTP_INSERT_AGE_IN_RESPONSE ;
}
break ;
case 'r' : if ( ! strncmp ( name , "proxy.config.url_remap.pristine_host_hdr" , length ) ) {
cnf = TS_CONFIG_URL_REMAP_PRISTINE_HOST_HDR ;
}
else if ( ! strncmp ( name , "proxy.config.http.insert_request_via_str" , length ) ) {
cnf = TS_CONFIG_HTTP_INSERT_REQUEST_VIA_STR ;
}
else if ( ! strncmp ( name , "proxy.config.http.flow_control.low_water" , length ) ) {
cnf = TS_CONFIG_HTTP_FLOW_CONTROL_LOW_WATER_MARK ;
}
break ;
case 's' : if ( ! strncmp ( name , "proxy.config.http.origin_max_connections" , length ) ) {
cnf = TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.required_headers" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_REQUIRED_HEADERS ;
}
else if ( ! strncmp ( name , "proxy.config.ssl.hsts_include_subdomains" , length ) ) {
cnf = TS_CONFIG_SSL_HSTS_INCLUDE_SUBDOMAINS ;
}
else if ( ! strncmp ( name , "proxy.config.http.number_of_redirections" , length ) ) {
cnf = TS_CONFIG_HTTP_NUMBER_OF_REDIRECTIONS ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.http.keep_alive_enabled_out" , length ) ) {
cnf = TS_CONFIG_HTTP_KEEP_ALIVE_ENABLED_OUT ;
}
break ;
case 'y' : if ( ! strncmp ( name , "proxy.config.http.cache.fuzz.probability" , length ) ) {
typ = TS_RECORDDATATYPE_FLOAT ;
cnf = TS_CONFIG_HTTP_CACHE_FUZZ_PROBABILITY ;
}
break ;
}
break ;
case 41 : switch ( name [ length - 1 ] ) {
case 'd' : if ( ! strncmp ( name , "proxy.config.http.response_server_enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_RESPONSE_SERVER_ENABLED ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.anonymize_remove_cookie" , length ) ) {
cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_COOKIE ;
}
else if ( ! strncmp ( name , "proxy.config.http.request_header_max_size" , length ) ) {
cnf = TS_CONFIG_HTTP_REQUEST_HEADER_MAX_SIZE ;
}
else if ( ! strncmp ( name , "proxy.config.http.safe_requests_retryable" , length ) ) {
cnf = TS_CONFIG_HTTP_SAFE_REQUESTS_RETRYABLE ;
}
else if ( ! strncmp ( name , "proxy.config.http.parent_proxy.retry_time" , length ) ) {
cnf = TS_CONFIG_HTTP_PARENT_PROXY_RETRY_TIME ;
}
break ;
case 'r' : if ( ! strncmp ( name , "proxy.config.http.insert_response_via_str" , length ) ) {
cnf = TS_CONFIG_HTTP_INSERT_RESPONSE_VIA_STR ;
}
else if ( ! strncmp ( name , "proxy.config.http.flow_control.high_water" , length ) ) {
cnf = TS_CONFIG_HTTP_FLOW_CONTROL_HIGH_WATER_MARK ;
}
break ;
}
break ;
case 42 : switch ( name [ length - 1 ] ) {
case 'd' : if ( ! strncmp ( name , "proxy.config.http.negative_caching_enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_NEGATIVE_CACHING_ENABLED ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.when_to_revalidate" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_WHEN_TO_REVALIDATE ;
}
else if ( ! strncmp ( name , "proxy.config.http.response_header_max_size" , length ) ) {
cnf = TS_CONFIG_HTTP_RESPONSE_HEADER_MAX_SIZE ;
}
break ;
case 'r' : if ( ! strncmp ( name , "proxy.config.http.anonymize_remove_referer" , length ) ) {
cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_REFERER ;
}
else if ( ! strncmp ( name , "proxy.config.http.global_user_agent_header" , length ) ) {
cnf = TS_CONFIG_HTTP_GLOBAL_USER_AGENT_HEADER ;
typ = TS_RECORDDATATYPE_STRING ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.net.sock_recv_buffer_size_out" , length ) ) {
cnf = TS_CONFIG_NET_SOCK_RECV_BUFFER_SIZE_OUT ;
}
else if ( ! strncmp ( name , "proxy.config.net.sock_send_buffer_size_out" , length ) ) {
cnf = TS_CONFIG_NET_SOCK_SEND_BUFFER_SIZE_OUT ;
}
else if ( ! strncmp ( name , "proxy.config.http.connect_attempts_timeout" , length ) ) {
cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_TIMEOUT ;
}
else if ( ! strncmp ( name , "proxy.config.websocket.no_activity_timeout" , length ) ) {
cnf = TS_CONFIG_WEBSOCKET_NO_ACTIVITY_TIMEOUT ;
}
break ;
}
break ;
case 43 : switch ( name [ length - 1 ] ) {
case 'e' : if ( ! strncmp ( name , "proxy.config.http.negative_caching_lifetime" , length ) ) {
cnf = TS_CONFIG_HTTP_NEGATIVE_CACHING_LIFETIME ;
}
break ;
case 'k' : if ( ! strncmp ( name , "proxy.config.http.default_buffer_water_mark" , length ) ) {
cnf = TS_CONFIG_HTTP_DEFAULT_BUFFER_WATER_MARK ;
}
break ;
case 'l' : if ( ! strncmp ( name , "proxy.config.http.cache.cluster_cache_local" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_CLUSTER_CACHE_LOCAL ;
}
break ;
case 'r' : if ( ! strncmp ( name , "proxy.config.http.cache.heuristic_lm_factor" , length ) ) {
typ = TS_RECORDDATATYPE_FLOAT ;
cnf = TS_CONFIG_HTTP_CACHE_HEURISTIC_LM_FACTOR ;
}
break ;
}
break ;
case 44 : switch ( name [ length - 1 ] ) {
case 'p' : if ( ! strncmp ( name , "proxy.config.http.anonymize_remove_client_ip" , length ) ) {
cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_CLIENT_IP ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.open_read_retry_time" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_OPEN_READ_RETRY_TIME ;
}
break ;
}
break ;
case 45 : switch ( name [ length - 1 ] ) {
case 'd' : if ( ! strncmp ( name , "proxy.config.http.down_server.abort_threshold" , length ) ) {
cnf = TS_CONFIG_HTTP_DOWN_SERVER_ABORT_THRESHOLD ;
}
else if ( ! strncmp ( name , "proxy.config.http.parent_proxy.fail_threshold" , length ) ) {
cnf = TS_CONFIG_HTTP_PARENT_PROXY_FAIL_THRESHOLD ;
}
break ;
case 'n' : if ( ! strncmp ( name , "proxy.config.http.cache.ignore_authentication" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_IGNORE_AUTHENTICATION ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.http.anonymize_remove_user_agent" , length ) ) {
cnf = TS_CONFIG_HTTP_ANONYMIZE_REMOVE_USER_AGENT ;
}
break ;
case 's' : if ( ! strncmp ( name , "proxy.config.http.connect_attempts_rr_retries" , length ) ) {
cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_RR_RETRIES ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.max_open_read_retries" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_MAX_OPEN_READ_RETRIES ;
}
break ;
case 'e' : if ( 0 == strncmp ( name , "proxy.config.http.auth_server_session_private" , length ) ) {
cnf = TS_CONFIG_HTTP_AUTH_SERVER_SESSION_PRIVATE ;
}
break ;
case 'y' : if ( ! strncmp ( name , "proxy.config.http.redirect_use_orig_cache_key" , length ) ) {
cnf = TS_CONFIG_HTTP_REDIRECT_USE_ORIG_CACHE_KEY ;
}
break ;
}
break ;
case 46 : switch ( name [ length - 1 ] ) {
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.ignore_client_no_cache" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_NO_CACHE ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.ims_on_client_no_cache" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_IMS_ON_CLIENT_NO_CACHE ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.ignore_server_no_cache" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_IGNORE_SERVER_NO_CACHE ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.heuristic_min_lifetime" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_HEURISTIC_MIN_LIFETIME ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.heuristic_max_lifetime" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_HEURISTIC_MAX_LIFETIME ;
}
else if ( ! strncmp ( name , "proxy.config.http.origin_max_connections_queue" , length ) ) {
cnf = TS_CONFIG_HTTP_ORIGIN_MAX_CONNECTIONS_QUEUE ;
}
break ;
case 'r' : if ( ! strncmp ( name , "proxy.config.http.insert_squid_x_forwarded_for" , length ) ) {
cnf = TS_CONFIG_HTTP_INSERT_SQUID_X_FORWARDED_FOR ;
}
break ;
case 's' : if ( ! strncmp ( name , "proxy.config.http.connect_attempts_max_retries" , length ) ) {
cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.max_open_write_retries" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_MAX_OPEN_WRITE_RETRIES ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.http.forward.proxy_auth_to_parent" , length ) ) {
cnf = TS_CONFIG_HTTP_FORWARD_PROXY_AUTH_TO_PARENT ;
}
break ;
case 'h' : if ( 0 == strncmp ( name , "proxy.config.http.server_session_sharing.match" , length ) ) {
cnf = TS_CONFIG_HTTP_SERVER_SESSION_SHARING_MATCH ;
}
break ;
case 'n' : if ( ! strncmp ( name , "proxy.config.http.cache.open_write_fail_action" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_OPEN_WRITE_FAIL_ACTION ;
}
break ;
}
break ;
case 47 : switch ( name [ length - 1 ] ) {
case 'b' : if ( ! strncmp ( name , "proxy.config.http.parent_proxy.mark_down_hostdb" , length ) ) {
cnf = TS_CONFIG_PARENT_FAILURES_UPDATE_HOSTDB ;
}
break ;
case 'd' : if ( ! strncmp ( name , "proxy.config.http.negative_revalidating_enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_ENABLED ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.guaranteed_min_lifetime" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_GUARANTEED_MIN_LIFETIME ;
}
else if ( ! strncmp ( name , "proxy.config.http.cache.guaranteed_max_lifetime" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_GUARANTEED_MAX_LIFETIME ;
}
break ;
case 'n' : if ( ! strncmp ( name , "proxy.config.http.transaction_active_timeout_in" , length ) ) {
cnf = TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_IN ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.http.post_connect_attempts_timeout" , length ) ) {
cnf = TS_CONFIG_HTTP_POST_CONNECT_ATTEMPTS_TIMEOUT ;
}
break ;
}
break ;
case 48 : switch ( name [ length - 1 ] ) {
case 'e' : if ( ! strncmp ( name , "proxy.config.http.cache.ignore_client_cc_max_age" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_IGNORE_CLIENT_CC_MAX_AGE ;
}
else if ( ! strncmp ( name , "proxy.config.http.negative_revalidating_lifetime" , length ) ) {
cnf = TS_CONFIG_HTTP_NEGATIVE_REVALIDATING_LIFETIME ;
}
break ;
case 't' : switch ( name [ length - 4 ] ) {
case '_' : if ( ! strncmp ( name , "proxy.config.http.transaction_active_timeout_out" , length ) ) {
cnf = TS_CONFIG_HTTP_TRANSACTION_ACTIVE_TIMEOUT_OUT ;
}
break ;
case 'e' : if ( ! strncmp ( name , "proxy.config.http.background_fill_active_timeout" , length ) ) {
cnf = TS_CONFIG_HTTP_BACKGROUND_FILL_ACTIVE_TIMEOUT ;
}
break ;
}
break ;
}
break ;
case 49 : if ( ! strncmp ( name , "proxy.config.http.attach_server_session_to_client" , length ) ) {
cnf = TS_CONFIG_HTTP_ATTACH_SERVER_SESSION_TO_CLIENT ;
}
break ;
case 50 : if ( ! strncmp ( name , "proxy.config.http.cache.cache_responses_to_cookies" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_CACHE_RESPONSES_TO_COOKIES ;
}
break ;
case 51 : switch ( name [ length - 1 ] ) {
case 'n' : if ( ! strncmp ( name , "proxy.config.http.keep_alive_no_activity_timeout_in" , length ) ) {
cnf = TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_IN ;
}
break ;
case 'd' : if ( ! strncmp ( name , "proxy.config.http.post.check.content_length.enabled" , length ) ) {
cnf = TS_CONFIG_HTTP_POST_CHECK_CONTENT_LENGTH_ENABLED ;
}
break ;
}
break ;
case 52 : switch ( name [ length - 1 ] ) {
case 'c' : if ( ! strncmp ( name , "proxy.config.http.cache.cache_urls_that_look_dynamic" , length ) ) {
cnf = TS_CONFIG_HTTP_CACHE_CACHE_URLS_THAT_LOOK_DYNAMIC ;
}
break ;
case 'n' : if ( ! strncmp ( name , "proxy.config.http.transaction_no_activity_timeout_in" , length ) ) {
cnf = TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_IN ;
}
break ;
case 't' : if ( ! strncmp ( name , "proxy.config.http.keep_alive_no_activity_timeout_out" , length ) ) {
cnf = TS_CONFIG_HTTP_KEEP_ALIVE_NO_ACTIVITY_TIMEOUT_OUT ;
}
else if ( ! strncmp ( name , "proxy.config.http.uncacheable_requests_bypass_parent" , length ) ) {
cnf = TS_CONFIG_HTTP_UNCACHEABLE_REQUESTS_BYPASS_PARENT ;
}
break ;
}
break ;
case 53 : switch ( name [ length - 1 ] ) {
case 't' : if ( ! strncmp ( name , "proxy.config.http.transaction_no_activity_timeout_out" , length ) ) {
cnf = TS_CONFIG_HTTP_TRANSACTION_NO_ACTIVITY_TIMEOUT_OUT ;
}
break ;
case 'd' : if ( ! strncmp ( name , "proxy.config.http.background_fill_completed_threshold" , length ) ) {
typ = TS_RECORDDATATYPE_FLOAT ;
cnf = TS_CONFIG_HTTP_BACKGROUND_FILL_COMPLETED_THRESHOLD ;
}
break ;
case 's' : if ( ! strncmp ( name , "proxy.config.http.parent_proxy.total_connect_attempts" , length ) ) {
cnf = TS_CONFIG_HTTP_PARENT_PROXY_TOTAL_CONNECT_ATTEMPTS ;
}
break ;
}
break ;
case 55 : if ( ! strncmp ( name , "proxy.config.http.parent_proxy.connect_attempts_timeout" , length ) ) {
cnf = TS_CONFIG_HTTP_PARENT_CONNECT_ATTEMPT_TIMEOUT ;
}
break ;
case 58 : if ( ! strncmp ( name , "proxy.config.http.connect_attempts_max_retries_dead_server" , length ) ) {
cnf = TS_CONFIG_HTTP_CONNECT_ATTEMPTS_MAX_RETRIES_DEAD_SERVER ;
}
else if ( ! strncmp ( name , "proxy.config.http.parent_proxy.per_parent_connect_attempts" , length ) ) {
cnf = TS_CONFIG_HTTP_PER_PARENT_CONNECT_ATTEMPTS ;
}
break ;
}
* conf = cnf ;
if ( type ) {
* type = typ ;
}
return ( ( cnf != TS_CONFIG_NULL ) ? TS_SUCCESS : TS_ERROR ) ;
} |
8,127,806,390,163,863,000 | debian | 4 | 0 | static void vapic_do_enable_tpr_reporting ( void * data ) {
VAPICEnableTPRReporting * info = data ;
apic_enable_tpr_access_reporting ( info -> apic , info -> enable ) ;
} |
7,320,640,583,188,909,000 | debian | 23 | 0 | static int remoteStreamHandleWrite ( struct qemud_client * client , struct qemud_client_stream * stream ) {
struct qemud_client_message * msg , * tmp ;
VIR_DEBUG ( "stream=%p" , stream ) ;
msg = stream -> rx ;
while ( msg && ! stream -> closed ) {
int ret ;
switch ( msg -> hdr . status ) {
case REMOTE_OK : ret = remoteStreamHandleFinish ( client , stream , msg ) ;
break ;
case REMOTE_CONTINUE : ret = remoteStreamHandleWriteData ( client , stream , msg ) ;
break ;
case REMOTE_ERROR : default : ret = remoteStreamHandleAbort ( client , stream , msg ) ;
break ;
}
if ( ret == 0 ) qemudClientMessageQueueServe ( & stream -> rx ) ;
else if ( ret < 0 ) return - 1 ;
else break ;
tmp = msg -> next ;
qemudClientMessageRelease ( client , msg ) ;
msg = tmp ;
}
return 0 ;
} |
-7,855,974,557,509,681,000 | debian | 12 | 0 | void getTypeBinaryOutputInfo ( Oid type , Oid * typSend , bool * typIsVarlena ) {
HeapTuple typeTuple ;
Form_pg_type pt ;
typeTuple = SearchSysCache1 ( TYPEOID , ObjectIdGetDatum ( type ) ) ;
if ( ! HeapTupleIsValid ( typeTuple ) ) elog ( ERROR , "cache lookup failed for type %u" , type ) ;
pt = ( Form_pg_type ) GETSTRUCT ( typeTuple ) ;
if ( ! pt -> typisdefined ) ereport ( ERROR , ( errcode ( ERRCODE_UNDEFINED_OBJECT ) , errmsg ( "type %s is only a shell" , format_type_be ( type ) ) ) ) ;
if ( ! OidIsValid ( pt -> typsend ) ) ereport ( ERROR , ( errcode ( ERRCODE_UNDEFINED_FUNCTION ) , errmsg ( "no binary output function available for type %s" , format_type_be ( type ) ) ) ) ;
* typSend = pt -> typsend ;
* typIsVarlena = ( ! pt -> typbyval ) && ( pt -> typlen == - 1 ) ;
ReleaseSysCache ( typeTuple ) ;
} |
2,335,222,688,263,906,300 | debian | 26 | 0 | static int rv34_decode_intra_mb_header ( RV34DecContext * r , int8_t * intra_types ) {
MpegEncContext * s = & r -> s ;
GetBitContext * gb = & s -> gb ;
int mb_pos = s -> mb_x + s -> mb_y * s -> mb_stride ;
int t ;
r -> is16 = get_bits1 ( gb ) ;
if ( r -> is16 ) {
s -> current_picture_ptr -> mb_type [ mb_pos ] = MB_TYPE_INTRA16x16 ;
r -> block_type = RV34_MB_TYPE_INTRA16x16 ;
t = get_bits ( gb , 2 ) ;
fill_rectangle ( intra_types , 4 , 4 , r -> intra_types_stride , t , sizeof ( intra_types [ 0 ] ) ) ;
r -> luma_vlc = 2 ;
}
else {
if ( ! r -> rv30 ) {
if ( ! get_bits1 ( gb ) ) av_log ( s -> avctx , AV_LOG_ERROR , "Need DQUANT\n" ) ;
}
s -> current_picture_ptr -> mb_type [ mb_pos ] = MB_TYPE_INTRA ;
r -> block_type = RV34_MB_TYPE_INTRA ;
if ( r -> decode_intra_types ( r , gb , intra_types ) < 0 ) return - 1 ;
r -> luma_vlc = 1 ;
}
r -> chroma_vlc = 0 ;
r -> cur_vlcs = choose_vlc_set ( r -> si . quant , r -> si . vlc_set , 0 ) ;
return rv34_decode_cbp ( gb , r -> cur_vlcs , r -> is16 ) ;
} |
3,557,739,556,029,059,000 | chrome | 21 | 0 | unsigned int vp9_sad ## m ## x ## n ## _c ( const uint8_t * src , int src_stride , const uint8_t * ref , int ref_stride ) {
return sad ( src , src_stride , ref , ref_stride , m , n ) ;
\ }
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 ) |
-3,740,862,514,502,467,000 | debian | 6 | 0 | static void DumpStrDouble ( char * pt , FILE * cfff , int oper ) {
real d ;
if ( * pt == '[' ) ++ pt ;
d = strtod ( pt , NULL ) ;
dumpdbloper ( cfff , d , oper ) ;
} |
-8,933,711,118,846,966,000 | debian | 34 | 0 | static void cirrus_vga_write_sr ( CirrusVGAState * s , uint32_t val ) {
switch ( s -> vga . sr_index ) {
case 0x00 : case 0x01 : case 0x02 : case 0x03 : case 0x04 : s -> vga . sr [ s -> vga . sr_index ] = val & sr_mask [ s -> vga . sr_index ] ;
if ( s -> vga . sr_index == 1 ) s -> vga . update_retrace_info ( & s -> vga ) ;
break ;
case 0x06 : val &= 0x17 ;
if ( val == 0x12 ) {
s -> vga . sr [ s -> vga . sr_index ] = 0x12 ;
}
else {
s -> vga . sr [ s -> vga . sr_index ] = 0x0f ;
}
break ;
case 0x10 : case 0x30 : case 0x50 : case 0x70 : case 0x90 : case 0xb0 : case 0xd0 : case 0xf0 : s -> vga . sr [ 0x10 ] = val ;
s -> vga . hw_cursor_x = ( val << 3 ) | ( s -> vga . sr_index >> 5 ) ;
break ;
case 0x11 : case 0x31 : case 0x51 : case 0x71 : case 0x91 : case 0xb1 : case 0xd1 : case 0xf1 : s -> vga . sr [ 0x11 ] = val ;
s -> vga . hw_cursor_y = ( val << 3 ) | ( s -> vga . sr_index >> 5 ) ;
break ;
case 0x07 : cirrus_update_memory_access ( s ) ;
case 0x08 : case 0x09 : case 0x0a : case 0x0b : case 0x0c : case 0x0d : case 0x0e : case 0x0f : case 0x13 : case 0x14 : case 0x15 : case 0x16 : case 0x18 : case 0x19 : case 0x1a : case 0x1b : case 0x1c : case 0x1d : case 0x1e : case 0x1f : s -> vga . sr [ s -> vga . sr_index ] = val ;
# ifdef DEBUG_CIRRUS printf ( "cirrus: handled outport sr_index %02x, sr_value %02x\n" , s -> vga . sr_index , val ) ;
# endif break ;
case 0x12 : s -> vga . sr [ 0x12 ] = val ;
s -> vga . force_shadow = ! ! ( val & CIRRUS_CURSOR_SHOW ) ;
# ifdef DEBUG_CIRRUS printf ( "cirrus: cursor ctl SR12=%02x (force shadow: %d)\n" , val , s -> vga . force_shadow ) ;
# endif break ;
case 0x17 : s -> vga . sr [ s -> vga . sr_index ] = ( s -> vga . sr [ s -> vga . sr_index ] & 0x38 ) | ( val & 0xc7 ) ;
cirrus_update_memory_access ( s ) ;
break ;
default : # ifdef DEBUG_CIRRUS printf ( "cirrus: outport sr_index %02x, sr_value %02x\n" , s -> vga . sr_index , val ) ;
# endif break ;
}
} |
2,626,033,973,808,493,000 | chrome | 9 | 0 | float * qcms_chain_transform ( qcms_profile * in , qcms_profile * out , float * src , float * dest , size_t lutSize ) {
struct qcms_modular_transform * transform_list = qcms_modular_transform_create ( in , out ) ;
if ( transform_list != NULL ) {
float * lut = qcms_modular_transform_data ( transform_list , src , dest , lutSize / 3 ) ;
qcms_modular_transform_release ( transform_list ) ;
return lut ;
}
return NULL ;
} |
2,390,790,920,103,114,000 | debian | 29 | 0 | static struct subre * subre ( struct vars * v , int op , int flags , struct state * begin , struct state * end ) {
struct subre * ret = v -> treefree ;
if ( STACK_TOO_DEEP ( v -> re ) ) {
ERR ( REG_ETOOBIG ) ;
return NULL ;
}
if ( ret != NULL ) v -> treefree = ret -> left ;
else {
ret = ( struct subre * ) MALLOC ( sizeof ( struct subre ) ) ;
if ( ret == NULL ) {
ERR ( REG_ESPACE ) ;
return NULL ;
}
ret -> chain = v -> treechain ;
v -> treechain = ret ;
}
assert ( strchr ( "=b|.*(" , op ) != NULL ) ;
ret -> op = op ;
ret -> flags = flags ;
ret -> id = 0 ;
ret -> subno = 0 ;
ret -> min = ret -> max = 1 ;
ret -> left = NULL ;
ret -> right = NULL ;
ret -> begin = begin ;
ret -> end = end ;
ZAPCNFA ( ret -> cnfa ) ;
return ret ;
} |
-6,468,986,929,796,051,000 | debian | 4 | 0 | static toff_t _tiffSizeProc ( thandle_t fd ) {
_TIFF_stat_s sb ;
return ( toff_t ) ( _TIFF_fstat_f ( ( int ) fd , & sb ) < 0 ? 0 : sb . st_size ) ;
} |
7,823,043,019,110,227,000 | chrome | 3 | 0 | TEST_F ( ExternalProtocolHandlerTest , DISABLED_TestLaunchSchemeUnBlockedChromeOtherModeDefault ) {
DoTest ( ExternalProtocolHandler : : DONT_BLOCK , shell_integration : : OTHER_MODE_IS_DEFAULT , Action : : LAUNCH ) ;
} |
-1,145,838,621,747,570,400 | debian | 19 | 0 | int key_payload_reserve ( struct key * key , size_t datalen ) {
int delta = ( int ) datalen - key -> datalen ;
int ret = 0 ;
key_check ( key ) ;
if ( delta != 0 && test_bit ( KEY_FLAG_IN_QUOTA , & key -> flags ) ) {
unsigned maxbytes = uid_eq ( key -> user -> uid , GLOBAL_ROOT_UID ) ? key_quota_root_maxbytes : key_quota_maxbytes ;
spin_lock ( & key -> user -> lock ) ;
if ( delta > 0 && ( key -> user -> qnbytes + delta >= maxbytes || key -> user -> qnbytes + delta < key -> user -> qnbytes ) ) {
ret = - EDQUOT ;
}
else {
key -> user -> qnbytes += delta ;
key -> quotalen += delta ;
}
spin_unlock ( & key -> user -> lock ) ;
}
if ( ret == 0 ) key -> datalen = datalen ;
return ret ;
} |
7,442,680,289,895,576,000 | debian | 3 | 0 | static void raw_decode ( uint8_t * dst , const int8_t * src , int src_size ) {
while ( src_size -- ) * dst ++ = * src ++ + 128 ;
} |
-7,455,544,248,455,991,000 | debian | 9 | 0 | static int kvm_get_mce_cap_supported ( KVMState * s , uint64_t * mce_cap , int * max_banks ) {
int r ;
r = kvm_check_extension ( s , KVM_CAP_MCE ) ;
if ( r > 0 ) {
* max_banks = r ;
return kvm_ioctl ( s , KVM_X86_GET_MCE_CAP_SUPPORTED , mce_cap ) ;
}
return - ENOSYS ;
} |
-7,555,034,601,056,330,000 | debian | 22 | 0 | char * virLogGetOutputs ( void ) {
size_t i ;
virBuffer outputbuf = VIR_BUFFER_INITIALIZER ;
virLogLock ( ) ;
for ( i = 0 ;
i < virLogNbOutputs ;
i ++ ) {
virLogDestination dest = virLogOutputs [ i ] -> dest ;
if ( i ) virBufferAddChar ( & outputbuf , ' ' ) ;
switch ( dest ) {
case VIR_LOG_TO_SYSLOG : case VIR_LOG_TO_FILE : virBufferAsprintf ( & outputbuf , "%d:%s:%s" , virLogOutputs [ i ] -> priority , virLogDestinationTypeToString ( dest ) , virLogOutputs [ i ] -> name ) ;
break ;
default : virBufferAsprintf ( & outputbuf , "%d:%s" , virLogOutputs [ i ] -> priority , virLogDestinationTypeToString ( dest ) ) ;
}
}
virLogUnlock ( ) ;
if ( virBufferError ( & outputbuf ) ) {
virBufferFreeAndReset ( & outputbuf ) ;
return NULL ;
}
return virBufferContentAndReset ( & outputbuf ) ;
} |
4,489,017,523,191,997,000 | debian | 4 | 0 | static int dissect_h225_GatekeeperRequest ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
offset = dissect_per_sequence ( tvb , offset , actx , tree , hf_index , ett_h225_GatekeeperRequest , GatekeeperRequest_sequence ) ;
return offset ;
} |
6,968,788,423,709,606,000 | debian | 46 | 0 | static LZWInfo * AcquireLZWInfo ( Image * image , const size_t data_size ) {
LZWInfo * lzw_info ;
register ssize_t i ;
size_t one ;
lzw_info = ( LZWInfo * ) AcquireMagickMemory ( sizeof ( * lzw_info ) ) ;
if ( lzw_info == ( LZWInfo * ) NULL ) return ( ( LZWInfo * ) NULL ) ;
( void ) ResetMagickMemory ( lzw_info , 0 , sizeof ( * lzw_info ) ) ;
lzw_info -> image = image ;
lzw_info -> data_size = data_size ;
one = 1 ;
lzw_info -> maximum_data_value = ( one << data_size ) - 1 ;
lzw_info -> clear_code = lzw_info -> maximum_data_value + 1 ;
lzw_info -> end_code = lzw_info -> maximum_data_value + 2 ;
lzw_info -> table [ 0 ] = ( size_t * ) AcquireQuantumMemory ( MaximumLZWCode , sizeof ( * * lzw_info -> table ) ) ;
lzw_info -> table [ 1 ] = ( size_t * ) AcquireQuantumMemory ( MaximumLZWCode , sizeof ( * * lzw_info -> table ) ) ;
if ( ( lzw_info -> table [ 0 ] == ( size_t * ) NULL ) || ( lzw_info -> table [ 1 ] == ( size_t * ) NULL ) ) {
lzw_info = RelinquishLZWInfo ( lzw_info ) ;
return ( ( LZWInfo * ) NULL ) ;
}
for ( i = 0 ;
i <= ( ssize_t ) lzw_info -> maximum_data_value ;
i ++ ) {
lzw_info -> table [ 0 ] [ i ] = 0 ;
lzw_info -> table [ 1 ] [ i ] = ( size_t ) i ;
}
ResetLZWInfo ( lzw_info ) ;
lzw_info -> code_info . buffer [ 0 ] = '\0' ;
lzw_info -> code_info . buffer [ 1 ] = '\0' ;
lzw_info -> code_info . count = 2 ;
lzw_info -> code_info . bit = 8 * lzw_info -> code_info . count ;
lzw_info -> code_info . eof = MagickFalse ;
lzw_info -> genesis = MagickTrue ;
lzw_info -> stack = ( LZWStack * ) AcquireMagickMemory ( sizeof ( * lzw_info -> stack ) ) ;
if ( lzw_info -> stack == ( LZWStack * ) NULL ) {
lzw_info = RelinquishLZWInfo ( lzw_info ) ;
return ( ( LZWInfo * ) NULL ) ;
}
lzw_info -> stack -> codes = ( size_t * ) AcquireQuantumMemory ( 2UL * MaximumLZWCode , sizeof ( * lzw_info -> stack -> codes ) ) ;
if ( lzw_info -> stack -> codes == ( size_t * ) NULL ) {
lzw_info = RelinquishLZWInfo ( lzw_info ) ;
return ( ( LZWInfo * ) NULL ) ;
}
lzw_info -> stack -> index = lzw_info -> stack -> codes ;
lzw_info -> stack -> top = lzw_info -> stack -> codes + 2 * MaximumLZWCode ;
return ( lzw_info ) ;
} |
-643,892,134,151,497,100 | debian | 11 | 0 | static const unsigned char * seq_decode_op3 ( SeqVideoContext * seq , const unsigned char * src , const unsigned char * src_end , unsigned char * dst ) {
int pos , offset ;
do {
if ( src_end - src < 2 ) return NULL ;
pos = * src ++ ;
offset = ( ( pos >> 3 ) & 7 ) * seq -> frame . linesize [ 0 ] + ( pos & 7 ) ;
dst [ offset ] = * src ++ ;
}
while ( ! ( pos & 0x80 ) ) ;
return src ;
} |
-2,443,338,381,883,395,600 | debian | 8 | 0 | void msyslog ( int level , const char * fmt , ... ) {
char buf [ 1024 ] ;
va_list ap ;
va_start ( ap , fmt ) ;
mvsnprintf ( buf , sizeof ( buf ) , fmt , ap ) ;
va_end ( ap ) ;
addto_syslog ( level , buf ) ;
} |