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
-5,268,859,819,325,808,000
debian
5
0
static void cancel_thumbnail_for_file ( NautilusDirectory * directory , NautilusFile * file ) { if ( directory -> details -> thumbnail_state != NULL && directory -> details -> thumbnail_state -> file == file ) { thumbnail_cancel ( directory ) ; } }
313,627,013,719,508,800
debian
9
0
static inline MagickRealType GetPixelInfoLuminance ( const PixelInfo * restrict pixel ) { MagickRealType blue , green , red ; if ( pixel -> colorspace == GRAYColorspace ) return ( pixel -> red ) ; if ( pixel -> colorspace != sRGBColorspace ) return ( 0.212656f * pixel -> red + 0.715158f * pixel -> green + 0.072186f * pixel -> blue ) ; red = DecodePixelGamma ( pixel -> red ) ; green = DecodePixelGamma ( pixel -> green ) ; blue = DecodePixelGamma ( pixel -> blue ) ; return ( 0.212656f * red + 0.715158f * green + 0.072186f * blue ) ; }
2,546,373,479,020,365,300
debian
3
0
void mime_hdr_destroy ( HdrHeap * heap , MIMEHdrImpl * mh ) { mime_hdr_destroy_field_block_list ( heap , mh -> m_first_fblock . m_next ) ; }
-5,493,081,488,206,620,000
debian
8
0
static const char * cmd_request_intercept_on_error ( cmd_parms * cmd , void * _dcfg , const char * p1 ) { directory_config * dcfg = ( directory_config * ) _dcfg ; if ( dcfg == NULL ) return NULL ; if ( strcasecmp ( p1 , "on" ) == 0 ) dcfg -> reqintercept_oe = 1 ; else if ( strcasecmp ( p1 , "off" ) == 0 ) dcfg -> reqintercept_oe = 0 ; else return apr_psprintf ( cmd -> pool , "ModSecurity: Invalid value for SecInterceptOnError: %s" , p1 ) ; return NULL ; }
6,302,861,533,225,985,000
debian
36
1
static int pxa2xx_pwrmode_write ( CPUARMState * env , const ARMCPRegInfo * ri , uint64_t value ) { PXA2xxState * s = ( PXA2xxState * ) ri -> opaque ; static const char * pwrmode [ 8 ] = { "Normal" , "Idle" , "Deep-idle" , "Standby" , "Sleep" , "reserved (!)" , "reserved (!)" , "Deep-sleep" , } ; if ( value & 8 ) { printf ( "%s: CPU voltage change attempt\n" , __func__ ) ; } switch ( value & 7 ) { case 0 : break ; case 1 : if ( ! ( s -> cm_regs [ CCCR >> 2 ] & ( 1 << 31 ) ) ) { cpu_interrupt ( CPU ( s -> cpu ) , CPU_INTERRUPT_HALT ) ; break ; } case 2 : cpu_interrupt ( CPU ( s -> cpu ) , CPU_INTERRUPT_HALT ) ; s -> pm_regs [ RCSR >> 2 ] |= 0x8 ; goto message ; case 3 : s -> cpu -> env . uncached_cpsr = ARM_CPU_MODE_SVC | CPSR_A | CPSR_F | CPSR_I ; s -> cpu -> env . cp15 . c1_sys = 0 ; s -> cpu -> env . cp15 . c1_coproc = 0 ; s -> cpu -> env . cp15 . c2_base0 = 0 ; s -> cpu -> env . cp15 . c3 = 0 ; s -> pm_regs [ PSSR >> 2 ] |= 0x8 ; s -> pm_regs [ RCSR >> 2 ] |= 0x8 ; memset ( s -> cpu -> env . regs , 0 , 4 * 15 ) ; s -> cpu -> env . regs [ 15 ] = s -> pm_regs [ PSPR >> 2 ] ; # if 0 buffer = 0xe59ff000 ; cpu_physical_memory_write ( 0 , & buffer , 4 ) ; buffer = s -> pm_regs [ PSPR >> 2 ] ; cpu_physical_memory_write ( 8 , & buffer , 4 ) ; # endif cpu_interrupt ( CPU ( arm_env_get_cpu ( cpu_single_env ) ) , CPU_INTERRUPT_HALT ) ; goto message ; default : message : printf ( "%s: machine entered %s mode\n" , __func__ , pwrmode [ value & 7 ] ) ; } return 0 ; }
-3,740,862,514,502,467,000
debian
9
0
static char * Tag2String ( uint32 tag ) { static char buffer [ 8 ] ; buffer [ 0 ] = tag >> 24 ; buffer [ 1 ] = tag >> 16 ; buffer [ 2 ] = tag >> 8 ; buffer [ 3 ] = tag ; buffer [ 4 ] = 0 ; return ( buffer ) ; }
-6,552,851,419,396,579,000
debian
4
0
static int SpoolssReplyClosePrinter_q ( tvbuff_t * tvb , int offset , packet_info * pinfo , proto_tree * tree , dcerpc_info * di , guint8 * drep ) { offset = dissect_nt_policy_hnd ( tvb , offset , pinfo , tree , di , drep , hf_hnd , NULL , NULL , FALSE , TRUE ) ; return offset ; }
3,599,206,110,384,554,500
debian
27
1
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 )
6,120,640,898,537,304,000
debian
18
0
void pdf_process_annot ( fz_context * ctx , pdf_processor * proc , pdf_document * doc , pdf_page * page , pdf_annot * annot , fz_cookie * cookie ) { int flags = pdf_to_int ( ctx , pdf_dict_get ( ctx , annot -> obj , PDF_NAME_F ) ) ; if ( flags & ( PDF_ANNOT_IS_INVISIBLE | PDF_ANNOT_IS_HIDDEN ) ) return ; if ( pdf_annot_type ( ctx , annot ) == PDF_ANNOT_POPUP ) return ; if ( proc -> usage ) { if ( ! strcmp ( proc -> usage , "Print" ) && ! ( flags & PDF_ANNOT_IS_PRINT ) ) return ; if ( ! strcmp ( proc -> usage , "View" ) && ( flags & PDF_ANNOT_IS_NO_VIEW ) ) return ; } if ( pdf_is_hidden_ocg ( ctx , doc -> ocg , NULL , proc -> usage , pdf_dict_get ( ctx , annot -> obj , PDF_NAME_OC ) ) ) return ; if ( proc -> op_q && proc -> op_cm && proc -> op_Do_form && proc -> op_Q && annot -> ap ) { fz_matrix matrix ; pdf_annot_transform ( ctx , annot , & matrix ) ; proc -> op_q ( ctx , proc ) ; proc -> op_cm ( ctx , proc , matrix . a , matrix . b , matrix . c , matrix . d , matrix . e , matrix . f ) ; proc -> op_Do_form ( ctx , proc , NULL , annot -> ap , pdf_page_resources ( ctx , page ) ) ; proc -> op_Q ( ctx , proc ) ; } }
4,208,859,344,475,021,000
chrome
3
0
static void free_months ( UChar * months [ ] ) { free_symbols ( months , MONTH_COUNT - 1 ) ; }
2,895,622,461,494,525,400
debian
7
0
static void test_bug54041 ( ) { enable_query_logs ( 0 ) ; test_bug54041_impl ( ) ; disable_query_logs ( ) ; test_bug54041_impl ( ) ; restore_query_logs ( ) ; }
1,223,258,652,239,369,200
debian
12
0
SPL_METHOD ( SplFileInfo , func_name ) \ { \ spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; \ zend_error_handling error_handling ; \ if ( zend_parse_parameters_none ( ) == FAILURE ) { \ return ; \ } \ \ zend_replace_error_handling ( EH_THROW , spl_ce_RuntimeException , & error_handling TSRMLS_CC ) ; \ spl_filesystem_object_get_file_name ( intern TSRMLS_CC ) ; \ php_stat ( intern -> file_name , intern -> file_name_len , func_num , return_value TSRMLS_CC ) ; \ zend_restore_error_handling ( & error_handling TSRMLS_CC ) ; \ } FileInfoFunction ( getPerms , FS_PERMS ) FileInfoFunction ( getInode , FS_INODE ) FileInfoFunction ( getSize , FS_SIZE ) FileInfoFunction ( getOwner , FS_OWNER ) FileInfoFunction ( getGroup , FS_GROUP )
453,207,616,518,947,840
chrome
14
0
static inline double U_EXPORT2 utimer_loopUntilDone ( double thresholdTimeVal , int32_t * loopCount , FuntionToBeTimed fn , void * param ) { UTimer timer ; double currentVal = 0 ; * loopCount = 0 ; utimer_getTime ( & timer ) ; for ( ; currentVal < thresholdTimeVal ; ) { fn ( param ) ; currentVal = utimer_getElapsedSeconds ( & timer ) ; ( * loopCount ) ++ ; } return currentVal ; }
-1,321,749,842,392,028,000
chrome
10
0
void vp8_transform_intra_mby ( MACROBLOCK * x ) { int i ; for ( i = 0 ; i < 16 ; i += 2 ) { x -> short_fdct8x4 ( & x -> block [ i ] . src_diff [ 0 ] , & x -> block [ i ] . coeff [ 0 ] , 32 ) ; } build_dcblock ( x ) ; x -> short_walsh4x4 ( & x -> block [ 24 ] . src_diff [ 0 ] , & x -> block [ 24 ] . coeff [ 0 ] , 8 ) ; }
3,599,206,110,384,554,500
debian
95
0
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 )
355,220,887,711,506,900
debian
62
0
List * deconstruct_indexquals ( IndexPath * path ) { List * result = NIL ; IndexOptInfo * index = path -> indexinfo ; ListCell * lcc , * lci ; forboth ( lcc , path -> indexquals , lci , path -> indexqualcols ) { RestrictInfo * rinfo = ( RestrictInfo * ) lfirst ( lcc ) ; int indexcol = lfirst_int ( lci ) ; Expr * clause ; Node * leftop , * rightop ; IndexQualInfo * qinfo ; Assert ( IsA ( rinfo , RestrictInfo ) ) ; clause = rinfo -> clause ; qinfo = ( IndexQualInfo * ) palloc ( sizeof ( IndexQualInfo ) ) ; qinfo -> rinfo = rinfo ; qinfo -> indexcol = indexcol ; if ( IsA ( clause , OpExpr ) ) { qinfo -> clause_op = ( ( OpExpr * ) clause ) -> opno ; leftop = get_leftop ( clause ) ; rightop = get_rightop ( clause ) ; if ( match_index_to_operand ( leftop , indexcol , index ) ) { qinfo -> varonleft = true ; qinfo -> other_operand = rightop ; } else { Assert ( match_index_to_operand ( rightop , indexcol , index ) ) ; qinfo -> varonleft = false ; qinfo -> other_operand = leftop ; } } else if ( IsA ( clause , RowCompareExpr ) ) { RowCompareExpr * rc = ( RowCompareExpr * ) clause ; qinfo -> clause_op = linitial_oid ( rc -> opnos ) ; if ( match_index_to_operand ( ( Node * ) linitial ( rc -> largs ) , indexcol , index ) ) { qinfo -> varonleft = true ; qinfo -> other_operand = ( Node * ) rc -> rargs ; } else { Assert ( match_index_to_operand ( ( Node * ) linitial ( rc -> rargs ) , indexcol , index ) ) ; qinfo -> varonleft = false ; qinfo -> other_operand = ( Node * ) rc -> largs ; } } else if ( IsA ( clause , ScalarArrayOpExpr ) ) { ScalarArrayOpExpr * saop = ( ScalarArrayOpExpr * ) clause ; qinfo -> clause_op = saop -> opno ; Assert ( match_index_to_operand ( ( Node * ) linitial ( saop -> args ) , indexcol , index ) ) ; qinfo -> varonleft = true ; qinfo -> other_operand = ( Node * ) lsecond ( saop -> args ) ; } else if ( IsA ( clause , NullTest ) ) { qinfo -> clause_op = InvalidOid ; Assert ( match_index_to_operand ( ( Node * ) ( ( NullTest * ) clause ) -> arg , indexcol , index ) ) ; qinfo -> varonleft = true ; qinfo -> other_operand = NULL ; } else { elog ( ERROR , "unsupported indexqual type: %d" , ( int ) nodeTag ( clause ) ) ; } result = lappend ( result , qinfo ) ; } return result ; }
6,664,609,110,189,078,000
debian
19
0
static void wmapro_window ( WMAProDecodeCtx * s ) { int i ; for ( i = 0 ; i < s -> channels_for_cur_subframe ; i ++ ) { int c = s -> channel_indexes_for_cur_subframe [ i ] ; float * window ; int winlen = s -> channel [ c ] . prev_block_len ; float * start = s -> channel [ c ] . coeffs - ( winlen >> 1 ) ; if ( s -> subframe_len < winlen ) { start += ( winlen - s -> subframe_len ) >> 1 ; winlen = s -> subframe_len ; } window = s -> windows [ av_log2 ( winlen ) - WMAPRO_BLOCK_MIN_BITS ] ; winlen >>= 1 ; s -> fdsp . vector_fmul_window ( start , start , start + winlen , window , winlen ) ; s -> channel [ c ] . prev_block_len = s -> subframe_len ; } }
3,599,206,110,384,554,500
debian
13
0
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 ) typedef void * OPENSSL_BLOCK ; DEFINE_SPECIAL_STACK_OF ( OPENSSL_BLOCK , void )
-5,706,788,925,640,467,000
chrome
8
0
static void set_block_size ( VP9_COMP * const cpi , int mi_row , int mi_col , BLOCK_SIZE bsize ) { if ( cpi -> common . mi_cols > mi_col && cpi -> common . mi_rows > mi_row ) { MACROBLOCKD * const xd = & cpi -> mb . e_mbd ; set_modeinfo_offsets ( & cpi -> common , xd , mi_row , mi_col ) ; xd -> mi [ 0 ] . src_mi -> mbmi . sb_type = bsize ; duplicate_mode_info_in_sb ( & cpi -> common , xd , mi_row , mi_col , bsize ) ; } }
-1,929,262,071,302,712,000
debian
6
0
static cmsBool Type_Signature_Write ( struct _cms_typehandler_struct * self , cmsIOHANDLER * io , void * Ptr , cmsUInt32Number nItems ) { cmsSignature * SigPtr = ( cmsSignature * ) Ptr ; return _cmsWriteUInt32Number ( io , * SigPtr ) ; cmsUNUSED_PARAMETER ( nItems ) ; cmsUNUSED_PARAMETER ( self ) ; }
3,298,403,829,257,765,400
debian
5
0
static int qcow2_refresh_limits ( BlockDriverState * bs ) { BDRVQcowState * s = bs -> opaque ; bs -> bl . write_zeroes_alignment = s -> cluster_sectors ; return 0 ; }
3,944,119,518,966,250,500
debian
49
0
enum nss_status _nss_nis_getaliasbyname_r ( const char * name , struct aliasent * alias , char * buffer , size_t buflen , int * errnop ) { if ( name == NULL ) { * errnop = EINVAL ; return NSS_STATUS_UNAVAIL ; } char * domain ; if ( __builtin_expect ( yp_get_default_domain ( & domain ) , 0 ) ) return NSS_STATUS_UNAVAIL ; size_t namlen = strlen ( name ) ; char * name2 ; int use_alloca = __libc_use_alloca ( namlen + 1 ) ; if ( use_alloca ) name2 = __alloca ( namlen + 1 ) ; else { name2 = malloc ( namlen + 1 ) ; if ( name2 == NULL ) { * errnop = ENOMEM ; return NSS_STATUS_TRYAGAIN ; } } size_t i ; for ( i = 0 ; i < namlen ; ++ i ) name2 [ i ] = _tolower ( name [ i ] ) ; name2 [ i ] = '\0' ; char * result ; int len ; int yperr = yp_match ( domain , "mail.aliases" , name2 , namlen , & result , & len ) ; if ( ! use_alloca ) free ( name2 ) ; if ( __builtin_expect ( yperr != YPERR_SUCCESS , 0 ) ) { enum nss_status retval = yperr2nss ( yperr ) ; if ( retval == NSS_STATUS_TRYAGAIN ) * errnop = errno ; return retval ; } if ( __builtin_expect ( ( size_t ) ( len + 1 ) > buflen , 0 ) ) { free ( result ) ; * errnop = ERANGE ; return NSS_STATUS_TRYAGAIN ; } char * p = strncpy ( buffer , result , len ) ; buffer [ len ] = '\0' ; while ( isspace ( * p ) ) ++ p ; free ( result ) ; alias -> alias_local = 0 ; int parse_res = _nss_nis_parse_aliasent ( name , p , alias , buffer , buflen , errnop ) ; if ( __builtin_expect ( parse_res < 1 , 0 ) ) { if ( parse_res == - 1 ) return NSS_STATUS_TRYAGAIN ; else return NSS_STATUS_NOTFOUND ; } return NSS_STATUS_SUCCESS ; }
1,223,258,652,239,369,200
debian
6
1
SPL_METHOD ( SplFileObject , hasChildren ) { if ( zend_parse_parameters_none ( ) == FAILURE ) { return ; } RETURN_FALSE ; }
4,313,735,399,044,135,400
debian
24
0
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 ( bytes == 0 || items == 0 ) return 0 ; 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,768,728,156,572,022,800
debian
18
0
void jbig2_ctx_free ( Jbig2Ctx * ctx ) { Jbig2Allocator * ca = ctx -> allocator ; int i ; jbig2_free ( ca , ctx -> buf ) ; if ( ctx -> segments != NULL ) { for ( i = 0 ; i < ctx -> n_segments ; i ++ ) jbig2_free_segment ( ctx , ctx -> segments [ i ] ) ; jbig2_free ( ca , ctx -> segments ) ; } if ( ctx -> pages != NULL ) { for ( i = 0 ; i <= ctx -> current_page ; i ++ ) if ( ctx -> pages [ i ] . image != NULL ) jbig2_image_release ( ctx , ctx -> pages [ i ] . image ) ; jbig2_free ( ca , ctx -> pages ) ; } jbig2_free ( ca , ctx ) ; }
-3,740,862,514,502,467,000
debian
7
0
static int isStdEncoding ( SplineFont * sf , EncMap * map ) { int i ; for ( i = 0 ; i < 256 && i < map -> enccount ; ++ i ) if ( map -> map [ i ] != - 1 && sf -> glyphs [ map -> map [ i ] ] != NULL ) if ( sf -> glyphs [ map -> map [ i ] ] -> unicodeenc != - 1 ) if ( sf -> glyphs [ map -> map [ i ] ] -> unicodeenc != unicode_from_adobestd [ i ] ) return ( 0 ) ; return ( 1 ) ; }
8,320,716,512,483,418,000
chrome
4
1
void vp9_idct4x4_add ( const int16_t * input , uint8_t * dest , int stride , int eob ) { if ( eob > 1 ) vp9_idct4x4_16_add ( input , dest , stride ) ; else vp9_idct4x4_1_add ( input , dest , stride ) ; }
-714,975,729,066,076,400
chrome
7
0
static bool _try_writable_inplace ( hb_blob_t * blob ) { DEBUG_MSG_FUNC ( BLOB , blob , "making writable inplace\n" ) ; if ( _try_make_writable_inplace_unix ( blob ) ) return true ; DEBUG_MSG_FUNC ( BLOB , blob , "making writable -> FAILED\n" ) ; blob -> mode = HB_MEMORY_MODE_READONLY ; return false ; }
3,668,456,668,028,960,000
debian
18
0
static VALUE cState_array_nl_set ( VALUE self , VALUE array_nl ) { unsigned long len ; GET_STATE ( self ) ; Check_Type ( array_nl , T_STRING ) ; len = RSTRING_LEN ( array_nl ) ; if ( len == 0 ) { if ( state -> array_nl ) { ruby_xfree ( state -> array_nl ) ; state -> array_nl = NULL ; } } else { if ( state -> array_nl ) ruby_xfree ( state -> array_nl ) ; state -> array_nl = fstrndup ( RSTRING_PTR ( array_nl ) , len ) ; state -> array_nl_len = len ; } return Qnil ; }
-4,055,702,019,813,177,000
debian
4
0
static void init_dir_data ( iax_call_dirdata * dirdata ) { dirdata -> current_frag_bytes = 0 ; dirdata -> current_frag_minlen = 0 ; }
4,489,017,523,191,997,000
debian
4
0
static int dissect_h225_NonStandardMessage ( 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_NonStandardMessage , NonStandardMessage_sequence ) ; return offset ; }
6,667,142,528,452,942,000
debian
82
0
static int dump_selected_tables ( char * db , char * * table_names , int tables ) { char table_buff [ NAME_LEN * 2 + 3 ] ; DYNAMIC_STRING lock_tables_query ; MEM_ROOT root ; char * * dump_tables , * * pos , * * end ; DBUG_ENTER ( "dump_selected_tables" ) ; if ( init_dumping ( db , init_dumping_tables ) ) DBUG_RETURN ( 1 ) ; init_alloc_root ( & root , 8192 , 0 ) ; if ( ! ( dump_tables = pos = ( char * * ) alloc_root ( & root , tables * sizeof ( char * ) ) ) ) die ( EX_EOM , "alloc_root failure." ) ; init_dynamic_string_checked ( & lock_tables_query , "LOCK TABLES " , 256 , 1024 ) ; for ( ; tables > 0 ; tables -- , table_names ++ ) { if ( ( * pos = get_actual_table_name ( * table_names , & root ) ) ) { if ( lock_tables ) { dynstr_append_checked ( & lock_tables_query , quote_name ( * pos , table_buff , 1 ) ) ; dynstr_append_checked ( & lock_tables_query , " READ /*!32311 LOCAL */," ) ; } pos ++ ; } else { if ( ! ignore_errors ) { dynstr_free ( & lock_tables_query ) ; free_root ( & root , MYF ( 0 ) ) ; } maybe_die ( EX_ILLEGAL_TABLE , "Couldn't find table: \"%s\"" , * table_names ) ; } } end = pos ; if ( lock_tables && ! ( mysql_get_server_version ( mysql ) >= FIRST_INFORMATION_SCHEMA_VERSION && ! my_strcasecmp ( & my_charset_latin1 , db , INFORMATION_SCHEMA_DB_NAME ) ) && ! ( mysql_get_server_version ( mysql ) >= FIRST_PERFORMANCE_SCHEMA_VERSION && ! my_strcasecmp ( & my_charset_latin1 , db , PERFORMANCE_SCHEMA_DB_NAME ) ) ) { if ( mysql_real_query ( mysql , lock_tables_query . str , lock_tables_query . length - 1 ) ) { if ( ! ignore_errors ) { dynstr_free ( & lock_tables_query ) ; free_root ( & root , MYF ( 0 ) ) ; } DB_error ( mysql , "when doing LOCK TABLES" ) ; } } dynstr_free ( & lock_tables_query ) ; if ( flush_logs ) { if ( mysql_refresh ( mysql , REFRESH_LOG ) ) { if ( ! ignore_errors ) free_root ( & root , MYF ( 0 ) ) ; DB_error ( mysql , "when doing refresh" ) ; } else verbose_msg ( "-- dump_selected_tables : logs flushed successfully!\n" ) ; } if ( opt_xml ) print_xml_tag ( md_result_file , "" , "\n" , "database" , "name=" , db , NullS ) ; for ( pos = dump_tables ; pos < end ; pos ++ ) { DBUG_PRINT ( "info" , ( "Dumping table %s" , * pos ) ) ; dump_table ( * pos , db ) ; if ( opt_dump_triggers && mysql_get_server_version ( mysql ) >= 50009 ) { if ( dump_triggers_for_table ( * pos , db ) ) { if ( path ) my_fclose ( md_result_file , MYF ( MY_WME ) ) ; maybe_exit ( EX_MYSQLERR ) ; } } } if ( seen_views ) { for ( pos = dump_tables ; pos < end ; pos ++ ) get_view_structure ( * pos , db ) ; } if ( opt_events && mysql_get_server_version ( mysql ) >= 50106 ) { DBUG_PRINT ( "info" , ( "Dumping events for database %s" , db ) ) ; dump_events_for_db ( db ) ; } if ( opt_routines && mysql_get_server_version ( mysql ) >= 50009 ) { DBUG_PRINT ( "info" , ( "Dumping routines for database %s" , db ) ) ; dump_routines_for_db ( db ) ; } free_root ( & root , MYF ( 0 ) ) ; my_free ( order_by ) ; order_by = 0 ; if ( opt_xml ) { fputs ( "</database>\n" , md_result_file ) ; check_io ( md_result_file ) ; } if ( lock_tables ) ( void ) mysql_query_with_error_report ( mysql , 0 , "UNLOCK TABLES" ) ; DBUG_RETURN ( 0 ) ; }
-4,978,896,576,290,503,000
debian
7
0
void mi_check_print_info ( MI_CHECK * param __attribute__ ( ( unused ) ) , const char * fmt , ... ) { va_list args ; va_start ( args , fmt ) ; ( void ) vfprintf ( stdout , fmt , args ) ; ( void ) fputc ( '\n' , stdout ) ; va_end ( args ) ; }
-6,552,851,419,396,579,000
debian
22
0
static int SpoolssEnumPrinterDataEx_r ( tvbuff_t * tvb , int offset , packet_info * pinfo , proto_tree * tree , dcerpc_info * di , guint8 * drep ) { guint32 size , num_values ; proto_item * hidden_item ; hidden_item = proto_tree_add_uint ( tree , hf_printerdata , tvb , offset , 0 , 1 ) ; PROTO_ITEM_SET_HIDDEN ( hidden_item ) ; offset = dissect_ndr_uint32 ( tvb , offset , pinfo , tree , di , drep , hf_buffer_size , & size ) ; dissect_ndr_uint32 ( tvb , offset + size + 4 , pinfo , NULL , di , drep , hf_returned , & num_values ) ; if ( size ) { proto_tree * subtree ; int offset2 = offset ; guint32 i ; subtree = proto_tree_add_subtree ( tree , tvb , offset , 0 , ett_PRINTER_DATA_CTR , NULL , "Printer data" ) ; for ( i = 0 ; i < num_values ; i ++ ) offset2 = dissect_spoolss_printer_enum_values ( tvb , offset2 , pinfo , subtree , di , drep ) ; } offset += size ; offset = dissect_ndr_uint32 ( tvb , offset , pinfo , tree , di , drep , hf_needed , NULL ) ; offset = dissect_ndr_uint32 ( tvb , offset , pinfo , tree , di , drep , hf_returned , NULL ) ; offset = dissect_doserror ( tvb , offset , pinfo , tree , di , drep , hf_rc , NULL ) ; return offset ; }
2,917,602,761,308,156,400
debian
37
1
static Asn1Generic * DecodeAsn1DerSet ( const unsigned char * buffer , uint32_t max_size , uint8_t depth , uint32_t * errcode ) { const unsigned char * d_ptr = buffer ; uint32_t d_length , numbytes , el_max_size ; uint8_t c ; uint32_t seq_index ; Asn1Generic * node ; Asn1Generic * child ; d_ptr ++ ; node = Asn1GenericNew ( ) ; if ( node == NULL ) return NULL ; node -> type = ASN1_SET ; node -> data = NULL ; c = d_ptr [ 0 ] ; if ( ( c & ( 1 << 7 ) ) >> 7 == 0 ) { d_length = c ; d_ptr ++ ; } else { numbytes = c & 0x7f ; d_ptr ++ ; if ( DecodeAsn1BuildValue ( & d_ptr , & d_length , numbytes , errcode ) == - 1 ) { SCFree ( node ) ; return NULL ; } } node -> length = d_length + ( d_ptr - buffer ) ; if ( node -> length > max_size ) { if ( errcode ) * errcode = ERR_DER_ELEMENT_SIZE_TOO_BIG ; SCFree ( node ) ; return NULL ; } seq_index = 0 ; el_max_size = max_size - ( d_ptr - buffer ) ; child = DecodeAsn1DerGeneric ( d_ptr , el_max_size , depth , seq_index , errcode ) ; node -> data = child ; return ( Asn1Generic * ) node ; }
-2,591,112,946,600,337,000
debian
13
0
static int16_t square_root ( int val ) { int16_t res = 0 ; int16_t exp = 0x4000 ; int i ; for ( i = 0 ; i < 14 ; i ++ ) { int res_exp = res + exp ; if ( val >= res_exp * res_exp << 1 ) res += exp ; exp >>= 1 ; } return res ; }
-7,076,754,245,473,579,000
chrome
17
0
void evhttp_connection_fail ( struct evhttp_connection * evcon , enum evhttp_connection_error error ) { struct evhttp_request * req = TAILQ_FIRST ( & evcon -> requests ) ; void ( * cb ) ( struct evhttp_request * , void * ) ; void * cb_arg ; assert ( req != NULL ) ; if ( evcon -> flags & EVHTTP_CON_INCOMING ) { if ( evhttp_connection_incoming_fail ( req , error ) == - 1 ) evhttp_connection_free ( evcon ) ; return ; } cb = req -> cb ; cb_arg = req -> cb_arg ; TAILQ_REMOVE ( & evcon -> requests , req , next ) ; evhttp_request_free ( req ) ; evhttp_connection_reset ( evcon ) ; if ( TAILQ_FIRST ( & evcon -> requests ) != NULL ) evhttp_connection_connect ( evcon ) ; if ( cb != NULL ) ( * cb ) ( NULL , cb_arg ) ; }
1,742,637,512,846,796,500
debian
40
0
static int dissect_mac_fdd_edch ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tree , void * data ) { proto_tree * edch_tree = NULL ; proto_item * channel_type ; umts_mac_info * macinf ; fp_info * fpinf ; guint16 pos ; proto_item * ti = NULL ; col_set_str ( pinfo -> cinfo , COL_PROTOCOL , "MAC" ) ; ti = proto_tree_add_item ( tree , proto_umts_mac , tvb , 0 , - 1 , ENC_NA ) ; edch_tree = proto_item_add_subtree ( ti , ett_mac_edch ) ; fpinf = ( fp_info * ) p_get_proto_data ( wmem_file_scope ( ) , pinfo , proto_fp , 0 ) ; macinf = ( umts_mac_info * ) p_get_proto_data ( wmem_file_scope ( ) , pinfo , proto_umts_mac , 0 ) ; if ( ! macinf || ! fpinf ) { proto_tree_add_expert ( edch_tree , pinfo , & ei_mac_per_frame_info_missing , tvb , 0 , - 1 ) ; return 1 ; } pos = fpinf -> cur_tb ; switch ( macinf -> content [ pos ] ) { case MAC_CONTENT_DCCH : proto_item_append_text ( ti , " (DCCH)" ) ; channel_type = proto_tree_add_uint ( edch_tree , hf_mac_lch_id , tvb , 0 , 0 , macinf -> lchid [ pos ] ) ; PROTO_ITEM_SET_GENERATED ( channel_type ) ; channel_type = proto_tree_add_uint ( edch_tree , hf_mac_channel , tvb , 0 , 0 , MAC_DCCH ) ; PROTO_ITEM_SET_GENERATED ( channel_type ) ; call_dissector_with_data ( rlc_dcch_handle , tvb , pinfo , tree , data ) ; break ; case MAC_CONTENT_PS_DTCH : proto_item_append_text ( ti , " (PS DTCH)" ) ; channel_type = proto_tree_add_uint ( edch_tree , hf_mac_lch_id , tvb , 0 , 0 , macinf -> lchid [ pos ] ) ; PROTO_ITEM_SET_GENERATED ( channel_type ) ; channel_type = proto_tree_add_uint ( edch_tree , hf_mac_channel , tvb , 0 , 0 , MAC_DTCH ) ; PROTO_ITEM_SET_GENERATED ( channel_type ) ; call_dissector_with_data ( rlc_ps_dtch_handle , tvb , pinfo , tree , data ) ; break ; case MAC_CONTENT_CS_DTCH : proto_item_append_text ( ti , " (CS DTCH)" ) ; break ; default : proto_item_append_text ( ti , " (Unknown EDCH Content)" ) ; expert_add_info_format ( pinfo , ti , & ei_mac_unknown_content , "Unknown EDCH Content" ) ; break ; } return tvb_captured_length ( tvb ) ; }
2,419,147,764,757,351,400
debian
5
0
static void s390_virtio_register ( void ) { s390_virtio_bus_register_withprop ( & s390_virtio_serial ) ; s390_virtio_bus_register_withprop ( & s390_virtio_blk ) ; s390_virtio_bus_register_withprop ( & s390_virtio_net ) ; }
-7,455,544,248,455,991,000
debian
22
0
static struct kvm_cpuid2 * try_get_cpuid ( KVMState * s , int max ) { struct kvm_cpuid2 * cpuid ; int r , size ; size = sizeof ( * cpuid ) + max * sizeof ( * cpuid -> entries ) ; cpuid = g_malloc0 ( size ) ; cpuid -> nent = max ; r = kvm_ioctl ( s , KVM_GET_SUPPORTED_CPUID , cpuid ) ; if ( r == 0 && cpuid -> nent >= max ) { r = - E2BIG ; } if ( r < 0 ) { if ( r == - E2BIG ) { g_free ( cpuid ) ; return NULL ; } else { fprintf ( stderr , "KVM_GET_SUPPORTED_CPUID failed: %s\n" , strerror ( - r ) ) ; exit ( 1 ) ; } } return cpuid ; }
7,092,216,800,726,730,000
debian
4
0
static int dissect_h245_RequestModeRelease ( 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_h245_RequestModeRelease , RequestModeRelease_sequence ) ; return offset ; }
5,838,244,232,542,872,000
chrome
15
1
TEST_F ( ScoredHistoryMatchTest , ScoringTLD ) { base : : Time now = base : : Time : : NowFromSystemTime ( ) ; std : : string url_string ( "http://fedcba.com/" ) ; const GURL url ( url_string ) ; history : : URLRow row ( MakeURLRow ( url_string . c_str ( ) , "" , 8 , 3 , 1 ) ) ; RowWordStarts word_starts ; PopulateWordStarts ( row , & word_starts ) ; WordStarts two_words_no_offsets ( 2 , 0u ) ; VisitInfoVector visits = CreateVisitInfoVector ( 8 , 3 , now ) ; ScoredHistoryMatch scored ( row , visits , std : : string ( ) , ASCIIToUTF16 ( "fed com" ) , Make2Terms ( "fed" , "com" ) , two_words_no_offsets , word_starts , false , nullptr , now ) ; EXPECT_EQ ( 0 , scored . raw_score ) ; base : : AutoReset < bool > reset ( & ScoredHistoryMatch : : allow_tld_matches_ , true ) ; ScoredHistoryMatch scored_with_tld ( row , visits , std : : string ( ) , ASCIIToUTF16 ( "fed com" ) , Make2Terms ( "fed" , "com" ) , two_words_no_offsets , word_starts , false , nullptr , now ) ; EXPECT_GT ( scored_with_tld . raw_score , 0 ) ; }
1,458,662,858,915,721,500
debian
30
0
static int cpu_restore_state_from_tb ( TranslationBlock * tb , CPUArchState * env , uintptr_t searched_pc ) { TCGContext * s = & tcg_ctx ; int j ; uintptr_t tc_ptr ; # ifdef CONFIG_PROFILER int64_t ti ; # endif # ifdef CONFIG_PROFILER ti = profile_getclock ( ) ; # endif tcg_func_start ( s ) ; gen_intermediate_code_pc ( env , tb ) ; if ( use_icount ) { env -> icount_decr . u16 . low += tb -> icount ; env -> can_do_io = 0 ; } tc_ptr = ( uintptr_t ) tb -> tc_ptr ; if ( searched_pc < tc_ptr ) return - 1 ; s -> tb_next_offset = tb -> tb_next_offset ; # ifdef USE_DIRECT_JUMP s -> tb_jmp_offset = tb -> tb_jmp_offset ; s -> tb_next = NULL ; # else s -> tb_jmp_offset = NULL ; s -> tb_next = tb -> tb_next ; # endif j = tcg_gen_code_search_pc ( s , ( uint8_t * ) tc_ptr , searched_pc - tc_ptr ) ; if ( j < 0 ) return - 1 ; while ( s -> gen_opc_instr_start [ j ] == 0 ) { j -- ; } env -> icount_decr . u16 . low -= s -> gen_opc_icount [ j ] ; restore_state_to_opc ( env , tb , j ) ; # ifdef CONFIG_PROFILER s -> restore_time += profile_getclock ( ) - ti ; s -> restore_count ++ ; # endif return 0 ; }
3,071,315,158,823,512,600
debian
3
0
static inline int symmetric_dequant ( int code , int levels ) { return ( ( code - ( levels >> 1 ) ) << 24 ) / levels ; }
-3,384,986,069,176,965,600
chrome
27
0
static void init_temporal_layer_context ( VP8_COMP * cpi , VP8_CONFIG * oxcf , const int layer , double prev_layer_framerate ) { LAYER_CONTEXT * lc = & cpi -> layer_context [ layer ] ; lc -> framerate = cpi -> output_framerate / cpi -> oxcf . rate_decimator [ layer ] ; lc -> target_bandwidth = cpi -> oxcf . target_bitrate [ layer ] * 1000 ; lc -> starting_buffer_level_in_ms = oxcf -> starting_buffer_level ; lc -> optimal_buffer_level_in_ms = oxcf -> optimal_buffer_level ; lc -> maximum_buffer_size_in_ms = oxcf -> maximum_buffer_size ; lc -> starting_buffer_level = rescale ( ( int ) ( oxcf -> starting_buffer_level ) , lc -> target_bandwidth , 1000 ) ; if ( oxcf -> optimal_buffer_level == 0 ) lc -> optimal_buffer_level = lc -> target_bandwidth / 8 ; else lc -> optimal_buffer_level = rescale ( ( int ) ( oxcf -> optimal_buffer_level ) , lc -> target_bandwidth , 1000 ) ; if ( oxcf -> maximum_buffer_size == 0 ) lc -> maximum_buffer_size = lc -> target_bandwidth / 8 ; else lc -> maximum_buffer_size = rescale ( ( int ) ( oxcf -> maximum_buffer_size ) , lc -> target_bandwidth , 1000 ) ; if ( layer > 0 ) lc -> avg_frame_size_for_layer = ( int ) ( ( cpi -> oxcf . target_bitrate [ layer ] - cpi -> oxcf . target_bitrate [ layer - 1 ] ) * 1000 / ( lc -> framerate - prev_layer_framerate ) ) ; lc -> active_worst_quality = cpi -> oxcf . worst_allowed_q ; lc -> active_best_quality = cpi -> oxcf . best_allowed_q ; lc -> avg_frame_qindex = cpi -> oxcf . worst_allowed_q ; lc -> buffer_level = lc -> starting_buffer_level ; lc -> bits_off_target = lc -> starting_buffer_level ; lc -> total_actual_bits = 0 ; lc -> ni_av_qi = 0 ; lc -> ni_tot_qi = 0 ; lc -> ni_frames = 0 ; lc -> rate_correction_factor = 1.0 ; lc -> key_frame_rate_correction_factor = 1.0 ; lc -> gf_rate_correction_factor = 1.0 ; lc -> inter_frame_target = 0 ; }
5,991,533,509,192,664,000
debian
14
1
mbfl_string * mbfl_buffer_converter_feed_result ( mbfl_buffer_converter * convd , mbfl_string * string , mbfl_string * result ) { if ( convd == NULL || string == NULL || result == NULL ) { return NULL ; } mbfl_buffer_converter_feed ( convd , string ) ; if ( convd -> filter1 != NULL ) { mbfl_convert_filter_flush ( convd -> filter1 ) ; } if ( convd -> filter2 != NULL ) { mbfl_convert_filter_flush ( convd -> filter2 ) ; } result -> no_encoding = convd -> to -> no_encoding ; return mbfl_memory_device_result ( & convd -> device , result ) ; }
6,632,536,031,698,733,000
debian
4
0
static int opt_input_file_i ( void * optctx , const char * opt , const char * arg ) { opt_input_file ( optctx , arg ) ; return 0 ; }
3,599,206,110,384,554,500
debian
30
0
int PEM_write_ ## name ( FILE * fp , const type * x ) ; # define DECLARE_PEM_write_cb_fp ( name , type ) int PEM_write_ ## name ( FILE * fp , type * x , const EVP_CIPHER * enc , unsigned char * kstr , int klen , pem_password_cb * cb , void * u ) ; # endif # define DECLARE_PEM_read_bio ( name , type ) type * PEM_read_bio_ ## name ( BIO * bp , type * * x , pem_password_cb * cb , void * u ) ; # define DECLARE_PEM_write_bio ( name , type ) int PEM_write_bio_ ## name ( BIO * bp , type * x ) ; # define DECLARE_PEM_write_bio_const ( name , type ) int PEM_write_bio_ ## name ( BIO * bp , const type * x ) ; # define DECLARE_PEM_write_cb_bio ( name , type ) int PEM_write_bio_ ## name ( BIO * bp , type * x , const EVP_CIPHER * enc , unsigned char * kstr , int klen , pem_password_cb * cb , void * u ) ; # define DECLARE_PEM_write ( name , type ) DECLARE_PEM_write_bio ( name , type ) DECLARE_PEM_write_fp ( name , type ) # define DECLARE_PEM_write_const ( name , type ) DECLARE_PEM_write_bio_const ( name , type ) DECLARE_PEM_write_fp_const ( name , type ) # define DECLARE_PEM_write_cb ( name , type ) DECLARE_PEM_write_cb_bio ( name , type ) DECLARE_PEM_write_cb_fp ( name , type ) # define DECLARE_PEM_read ( name , type ) DECLARE_PEM_read_bio ( name , type ) DECLARE_PEM_read_fp ( name , type ) # define DECLARE_PEM_rw ( name , type ) DECLARE_PEM_read ( name , type ) DECLARE_PEM_write ( name , type ) # define DECLARE_PEM_rw_const ( name , type ) DECLARE_PEM_read ( name , type ) DECLARE_PEM_write_const ( name , type ) # define DECLARE_PEM_rw_cb ( name , type ) DECLARE_PEM_read ( name , type ) DECLARE_PEM_write_cb ( name , type ) typedef int pem_password_cb ( char * buf , int size , int rwflag , void * userdata ) ; int PEM_get_EVP_CIPHER_INFO ( char * header , EVP_CIPHER_INFO * cipher ) ; int PEM_do_header ( EVP_CIPHER_INFO * cipher , unsigned char * data , long * len , pem_password_cb * callback , void * u ) ; int PEM_read_bio ( BIO * bp , char * * name , char * * header , unsigned char * * data , long * len ) ; # define PEM_FLAG_SECURE 0x1 # define PEM_FLAG_EAY_COMPATIBLE 0x2 # define PEM_FLAG_ONLY_B64 0x4 int PEM_read_bio_ex ( BIO * bp , char * * name , char * * header , unsigned char * * data , long * len , unsigned int flags ) ; int PEM_bytes_read_bio_secmem ( unsigned char * * pdata , long * plen , char * * pnm , const char * name , BIO * bp , pem_password_cb * cb , void * u ) ; int PEM_write_bio ( BIO * bp , const char * name , const char * hdr , const unsigned char * data , long len ) ; int PEM_bytes_read_bio ( unsigned char * * pdata , long * plen , char * * pnm , const char * name , BIO * bp , pem_password_cb * cb , void * u ) ; void * PEM_ASN1_read_bio ( d2i_of_void * d2i , const char * name , BIO * bp , void * * x , pem_password_cb * cb , void * u ) ; int PEM_ASN1_write_bio ( i2d_of_void * i2d , const char * name , BIO * bp , void * x , const EVP_CIPHER * enc , unsigned char * kstr , int klen , pem_password_cb * cb , void * u ) ; STACK_OF ( X509_INFO ) * PEM_X509_INFO_read_bio ( BIO * bp , STACK_OF ( X509_INFO ) * sk , pem_password_cb * cb , void * u ) ; int PEM_X509_INFO_write_bio ( BIO * bp , X509_INFO * xi , EVP_CIPHER * enc , unsigned char * kstr , int klen , pem_password_cb * cd , void * u ) ; # ifndef OPENSSL_NO_STDIO int PEM_read ( FILE * fp , char * * name , char * * header , unsigned char * * data , long * len ) ; int PEM_write ( FILE * fp , const char * name , const char * hdr , const unsigned char * data , long len ) ; void * PEM_ASN1_read ( d2i_of_void * d2i , const char * name , FILE * fp , void * * x , pem_password_cb * cb , void * u ) ; int PEM_ASN1_write ( i2d_of_void * i2d , const char * name , FILE * fp , void * x , const EVP_CIPHER * enc , unsigned char * kstr , int klen , pem_password_cb * callback , void * u ) ; STACK_OF ( X509_INFO ) * PEM_X509_INFO_read ( FILE * fp , STACK_OF ( X509_INFO ) * sk , pem_password_cb * cb , void * u ) ; # endif int PEM_SignInit ( EVP_MD_CTX * ctx , EVP_MD * type ) ; int PEM_SignUpdate ( EVP_MD_CTX * ctx , unsigned char * d , unsigned int cnt ) ; int PEM_SignFinal ( EVP_MD_CTX * ctx , unsigned char * sigret , unsigned int * siglen , EVP_PKEY * pkey ) ; int PEM_def_callback ( char * buf , int num , int rwflag , void * userdata ) ; void PEM_proc_type ( char * buf , int type ) ; void PEM_dek_info ( char * buf , const char * type , int len , char * str ) ; # include < openssl / symhacks . h > DECLARE_PEM_rw ( X509 , X509 ) DECLARE_PEM_rw ( X509_AUX , X509 ) DECLARE_PEM_rw ( X509_REQ , X509_REQ ) DECLARE_PEM_write ( X509_REQ_NEW , X509_REQ ) DECLARE_PEM_rw ( X509_CRL , X509_CRL ) DECLARE_PEM_rw ( PKCS7 , PKCS7 ) DECLARE_PEM_rw ( NETSCAPE_CERT_SEQUENCE , NETSCAPE_CERT_SEQUENCE ) DECLARE_PEM_rw ( PKCS8 , X509_SIG ) DECLARE_PEM_rw ( PKCS8_PRIV_KEY_INFO , PKCS8_PRIV_KEY_INFO ) # ifndef OPENSSL_NO_RSA DECLARE_PEM_rw_cb ( RSAPrivateKey , RSA ) DECLARE_PEM_rw_const ( RSAPublicKey , RSA ) DECLARE_PEM_rw ( RSA_PUBKEY , RSA ) # endif # ifndef OPENSSL_NO_DSA DECLARE_PEM_rw_cb ( DSAPrivateKey , DSA ) DECLARE_PEM_rw ( DSA_PUBKEY , DSA ) DECLARE_PEM_rw_const ( DSAparams , DSA ) # endif # ifndef OPENSSL_NO_EC DECLARE_PEM_rw_const ( ECPKParameters , EC_GROUP ) DECLARE_PEM_rw_cb ( ECPrivateKey , EC_KEY ) DECLARE_PEM_rw ( EC_PUBKEY , EC_KEY ) # endif # ifndef OPENSSL_NO_DH DECLARE_PEM_rw_const ( DHparams , DH )
-6,801,377,922,956,957,000
chrome
8
0
static void AddPnaclDisabledParm ( const base : : FilePath : : StringType & url , base : : FilePath : : StringType * url_with_parm ) { if ( url . find ( FILE_PATH_LITERAL ( "?" ) ) == base : : FilePath : : StringType : : npos ) { * url_with_parm = url + FILE_PATH_LITERAL ( "?pnacl_disabled=1" ) ; } else { * url_with_parm = url + FILE_PATH_LITERAL ( "&pnacl_disabled=1" ) ; } }
4,180,964,683,905,831,000
debian
6
0
static int selinux_vm_enough_memory ( struct mm_struct * mm , long pages ) { int rc , cap_sys_admin = 0 ; rc = cred_has_capability ( current_cred ( ) , CAP_SYS_ADMIN , SECURITY_CAP_NOAUDIT , true ) ; if ( rc == 0 ) cap_sys_admin = 1 ; return cap_sys_admin ; }
6,755,873,269,946,788,000
debian
25
0
static void pk_transaction_what_provides ( PkTransaction * transaction , GVariant * params , GDBusMethodInvocation * context ) { gboolean ret ; PkBitfield filter ; g_autofree gchar * * values = NULL ; g_autoptr ( GError ) error = NULL ; g_return_if_fail ( PK_IS_TRANSACTION ( transaction ) ) ; g_return_if_fail ( transaction -> priv -> tid != NULL ) ; g_variant_get ( params , "(t^a&s)" , & filter , & values ) ; g_debug ( "WhatProvides method called: %s" , values [ 0 ] ) ; if ( ! pk_backend_is_implemented ( transaction -> priv -> backend , PK_ROLE_ENUM_WHAT_PROVIDES ) ) { g_set_error ( & error , PK_TRANSACTION_ERROR , PK_TRANSACTION_ERROR_NOT_SUPPORTED , "WhatProvides not supported by backend" ) ; pk_transaction_set_state ( transaction , PK_TRANSACTION_STATE_ERROR ) ; goto out ; } ret = pk_transaction_search_check ( values , & error ) ; if ( ! ret ) { pk_transaction_set_state ( transaction , PK_TRANSACTION_STATE_ERROR ) ; goto out ; } transaction -> priv -> cached_filters = filter ; transaction -> priv -> cached_values = g_strdupv ( values ) ; pk_transaction_set_role ( transaction , PK_ROLE_ENUM_WHAT_PROVIDES ) ; pk_transaction_set_state ( transaction , PK_TRANSACTION_STATE_READY ) ; out : pk_transaction_dbus_return ( context , error ) ; }
1,665,119,165,547,714,300
debian
47
0
static int ptx_decode_frame ( AVCodecContext * avctx , void * data , int * got_frame , AVPacket * avpkt ) { const uint8_t * buf = avpkt -> data ; const uint8_t * buf_end = avpkt -> data + avpkt -> size ; AVFrame * const p = data ; unsigned int offset , w , h , y , stride , bytes_per_pixel ; int ret ; uint8_t * ptr ; if ( buf_end - buf < 14 ) return AVERROR_INVALIDDATA ; offset = AV_RL16 ( buf ) ; w = AV_RL16 ( buf + 8 ) ; h = AV_RL16 ( buf + 10 ) ; bytes_per_pixel = AV_RL16 ( buf + 12 ) >> 3 ; if ( bytes_per_pixel != 2 ) { av_log_ask_for_sample ( avctx , "Image format is not RGB15.\n" ) ; return AVERROR_PATCHWELCOME ; } avctx -> pix_fmt = AV_PIX_FMT_RGB555 ; if ( buf_end - buf < offset ) return AVERROR_INVALIDDATA ; if ( offset != 0x2c ) av_log_ask_for_sample ( avctx , "offset != 0x2c\n" ) ; buf += offset ; if ( ( ret = av_image_check_size ( w , h , 0 , avctx ) ) < 0 ) return ret ; if ( w != avctx -> width || h != avctx -> height ) avcodec_set_dimensions ( avctx , w , h ) ; if ( ( ret = ff_get_buffer ( avctx , p , 0 ) ) < 0 ) { av_log ( avctx , AV_LOG_ERROR , "get_buffer() failed\n" ) ; return ret ; } p -> pict_type = AV_PICTURE_TYPE_I ; ptr = p -> data [ 0 ] ; stride = p -> linesize [ 0 ] ; for ( y = 0 ; y < h && buf_end - buf >= w * bytes_per_pixel ; y ++ ) { # if HAVE_BIGENDIAN unsigned int x ; for ( x = 0 ; x < w * bytes_per_pixel ; x += bytes_per_pixel ) AV_WN16 ( ptr + x , AV_RL16 ( buf + x ) ) ; # else memcpy ( ptr , buf , w * bytes_per_pixel ) ; # endif ptr += stride ; buf += w * bytes_per_pixel ; } * got_frame = 1 ; if ( y < h ) { av_log ( avctx , AV_LOG_WARNING , "incomplete packet\n" ) ; return avpkt -> size ; } return offset + w * h * bytes_per_pixel ; }
6,458,694,302,493,204,000
debian
20
0
static Datum ExecEvalWholeRowFast ( WholeRowVarExprState * wrvstate , ExprContext * econtext , bool * isNull , ExprDoneCond * isDone ) { Var * variable = ( Var * ) wrvstate -> xprstate . expr ; TupleTableSlot * slot ; HeapTupleHeader dtuple ; if ( isDone ) * isDone = ExprSingleResult ; * isNull = false ; switch ( variable -> varno ) { case INNER_VAR : slot = econtext -> ecxt_innertuple ; break ; case OUTER_VAR : slot = econtext -> ecxt_outertuple ; break ; default : slot = econtext -> ecxt_scantuple ; break ; } if ( wrvstate -> wrv_junkFilter != NULL ) slot = ExecFilterJunk ( wrvstate -> wrv_junkFilter , slot ) ; dtuple = DatumGetHeapTupleHeader ( ExecFetchSlotTupleDatum ( slot ) ) ; HeapTupleHeaderSetTypeId ( dtuple , wrvstate -> wrv_tupdesc -> tdtypeid ) ; HeapTupleHeaderSetTypMod ( dtuple , wrvstate -> wrv_tupdesc -> tdtypmod ) ; return PointerGetDatum ( dtuple ) ; }
-1,672,864,273,235,910,400
debian
32
0
static void _slurm_rpc_update_node ( slurm_msg_t * msg ) { int error_code = SLURM_SUCCESS ; DEF_TIMERS ; update_node_msg_t * update_node_msg_ptr = ( update_node_msg_t * ) msg -> data ; slurmctld_lock_t node_write_lock = { NO_LOCK , WRITE_LOCK , WRITE_LOCK , NO_LOCK , READ_LOCK } ; uid_t uid = g_slurm_auth_get_uid ( msg -> auth_cred , slurmctld_config . auth_info ) ; START_TIMER ; debug2 ( "Processing RPC: REQUEST_UPDATE_NODE from uid=%d" , uid ) ; if ( ! validate_super_user ( uid ) ) { error_code = ESLURM_USER_ID_MISSING ; error ( "Security violation, UPDATE_NODE RPC from uid=%d" , uid ) ; } if ( error_code == SLURM_SUCCESS ) { lock_slurmctld ( node_write_lock ) ; error_code = update_node ( update_node_msg_ptr ) ; unlock_slurmctld ( node_write_lock ) ; END_TIMER2 ( "_slurm_rpc_update_node" ) ; } if ( error_code ) { info ( "_slurm_rpc_update_node for %s: %s" , update_node_msg_ptr -> node_names , slurm_strerror ( error_code ) ) ; slurm_send_rc_msg ( msg , error_code ) ; } else { debug2 ( "_slurm_rpc_update_node complete for %s %s" , update_node_msg_ptr -> node_names , TIME_STR ) ; slurm_send_rc_msg ( msg , SLURM_SUCCESS ) ; } schedule_node_save ( ) ; queue_job_scheduler ( ) ; trigger_reconfig ( ) ; }
-4,960,438,251,319,819,000
chrome
33
1
void configure_buffer_updates ( VP9_COMP * cpi ) { TWO_PASS * const twopass = & cpi -> twopass ; cpi -> rc . is_src_frame_alt_ref = 0 ; switch ( twopass -> gf_group . update_type [ twopass -> gf_group . index ] ) { case KF_UPDATE : cpi -> refresh_last_frame = 1 ; cpi -> refresh_golden_frame = 1 ; cpi -> refresh_alt_ref_frame = 1 ; break ; case LF_UPDATE : cpi -> refresh_last_frame = 1 ; cpi -> refresh_golden_frame = 0 ; cpi -> refresh_alt_ref_frame = 0 ; break ; case GF_UPDATE : cpi -> refresh_last_frame = 1 ; cpi -> refresh_golden_frame = 1 ; cpi -> refresh_alt_ref_frame = 0 ; break ; case OVERLAY_UPDATE : cpi -> refresh_last_frame = 0 ; cpi -> refresh_golden_frame = 1 ; cpi -> refresh_alt_ref_frame = 0 ; cpi -> rc . is_src_frame_alt_ref = 1 ; break ; case ARF_UPDATE : cpi -> refresh_last_frame = 0 ; cpi -> refresh_golden_frame = 0 ; cpi -> refresh_alt_ref_frame = 1 ; break ; default : assert ( 0 ) ; break ; } if ( is_two_pass_svc ( cpi ) ) { if ( cpi -> svc . layer_context [ cpi -> svc . spatial_layer_id ] . gold_ref_idx < 0 ) cpi -> refresh_golden_frame = 0 ; if ( cpi -> alt_ref_source == NULL ) cpi -> refresh_alt_ref_frame = 0 ; } }
1,144,893,748,552,025,500
debian
120
0
static int libopenjpeg_decode_frame ( AVCodecContext * avctx , void * data , int * got_frame , AVPacket * avpkt ) { uint8_t * buf = avpkt -> data ; int buf_size = avpkt -> size ; LibOpenJPEGContext * ctx = avctx -> priv_data ; ThreadFrame frame = { . f = data } ; AVFrame * picture = data ; const AVPixFmtDescriptor * desc ; opj_dinfo_t * dec ; opj_cio_t * stream ; opj_image_t * image ; int width , height , ret = - 1 ; int pixel_size = 0 ; int ispacked = 0 ; int i ; * got_frame = 0 ; if ( ( AV_RB32 ( buf ) == 12 ) && ( AV_RB32 ( buf + 4 ) == JP2_SIG_TYPE ) && ( AV_RB32 ( buf + 8 ) == JP2_SIG_VALUE ) ) { dec = opj_create_decompress ( CODEC_JP2 ) ; } else { if ( AV_RB32 ( buf + 4 ) == AV_RB32 ( "jp2c" ) ) buf += 8 ; dec = opj_create_decompress ( CODEC_J2K ) ; } if ( ! dec ) { av_log ( avctx , AV_LOG_ERROR , "Error initializing decoder.\n" ) ; return - 1 ; } opj_set_event_mgr ( ( opj_common_ptr ) dec , NULL , NULL ) ; ctx -> dec_params . cp_limit_decoding = LIMIT_TO_MAIN_HEADER ; ctx -> dec_params . cp_reduce = ctx -> lowres ; ctx -> dec_params . cp_layer = ctx -> lowqual ; opj_setup_decoder ( dec , & ctx -> dec_params ) ; stream = opj_cio_open ( ( opj_common_ptr ) dec , buf , buf_size ) ; if ( ! stream ) { av_log ( avctx , AV_LOG_ERROR , "Codestream could not be opened for reading.\n" ) ; opj_destroy_decompress ( dec ) ; return - 1 ; } image = opj_decode_with_info ( dec , stream , NULL ) ; opj_cio_close ( stream ) ; if ( ! image ) { av_log ( avctx , AV_LOG_ERROR , "Error decoding codestream.\n" ) ; opj_destroy_decompress ( dec ) ; return - 1 ; } width = image -> x1 - image -> x0 ; height = image -> y1 - image -> y0 ; if ( ctx -> lowres ) { width = ( width + ( 1 << ctx -> lowres ) - 1 ) >> ctx -> lowres ; height = ( height + ( 1 << ctx -> lowres ) - 1 ) >> ctx -> lowres ; } if ( av_image_check_size ( width , height , 0 , avctx ) < 0 ) { av_log ( avctx , AV_LOG_ERROR , "%dx%d dimension invalid.\n" , width , height ) ; goto done ; } avcodec_set_dimensions ( avctx , width , height ) ; if ( avctx -> pix_fmt != AV_PIX_FMT_NONE ) if ( ! libopenjpeg_matches_pix_fmt ( image , avctx -> pix_fmt ) ) avctx -> pix_fmt = AV_PIX_FMT_NONE ; if ( avctx -> pix_fmt == AV_PIX_FMT_NONE ) avctx -> pix_fmt = libopenjpeg_guess_pix_fmt ( image ) ; if ( avctx -> pix_fmt == AV_PIX_FMT_NONE ) { av_log ( avctx , AV_LOG_ERROR , "Unable to determine pixel format\n" ) ; ret = AVERROR_INVALIDDATA ; goto done ; } for ( i = 0 ; i < image -> numcomps ; i ++ ) if ( image -> comps [ i ] . prec > avctx -> bits_per_raw_sample ) avctx -> bits_per_raw_sample = image -> comps [ i ] . prec ; if ( ff_thread_get_buffer ( avctx , & frame , 0 ) < 0 ) { av_log ( avctx , AV_LOG_ERROR , "ff_thread_get_buffer() failed\n" ) ; goto done ; } ctx -> dec_params . cp_limit_decoding = NO_LIMITATION ; opj_setup_decoder ( dec , & ctx -> dec_params ) ; stream = opj_cio_open ( ( opj_common_ptr ) dec , buf , buf_size ) ; if ( ! stream ) { av_log ( avctx , AV_LOG_ERROR , "Codestream could not be opened for reading.\n" ) ; goto done ; } opj_image_destroy ( image ) ; image = opj_decode_with_info ( dec , stream , NULL ) ; opj_cio_close ( stream ) ; if ( ! image ) { av_log ( avctx , AV_LOG_ERROR , "Error decoding codestream.\n" ) ; goto done ; } desc = av_pix_fmt_desc_get ( avctx -> pix_fmt ) ; pixel_size = desc -> comp [ 0 ] . step_minus1 + 1 ; ispacked = libopenjpeg_ispacked ( avctx -> pix_fmt ) ; switch ( pixel_size ) { case 1 : if ( ispacked ) { libopenjpeg_copy_to_packed8 ( picture , image ) ; } else { libopenjpeg_copyto8 ( picture , image ) ; } break ; case 2 : if ( ispacked ) { libopenjpeg_copy_to_packed8 ( picture , image ) ; } else { libopenjpeg_copyto16 ( picture , image ) ; } break ; case 3 : case 4 : if ( ispacked ) { libopenjpeg_copy_to_packed8 ( picture , image ) ; } break ; case 6 : case 8 : if ( ispacked ) { libopenjpeg_copy_to_packed16 ( picture , image ) ; } break ; default : av_log ( avctx , AV_LOG_ERROR , "unsupported pixel size %d\n" , pixel_size ) ; goto done ; } * got_frame = 1 ; ret = buf_size ; done : opj_image_destroy ( image ) ; opj_destroy_decompress ( dec ) ; return ret ; }
8,895,005,875,911,486,000
debian
45
0
static void curses_connection_data_split ( void ) { char tmp [ MAX_ASCII_ADDR_LEN ] ; char title [ MAX_ASCII_ADDR_LEN + 6 ] ; DEBUG_MSG ( "curses_connection_data_split" ) ; if ( wdg_conndata ) { struct conn_object * tmp_conn = curr_conn ; wdg_destroy_object ( & wdg_conndata ) ; curses_destroy_conndata ( ) ; curr_conn = tmp_conn ; } curr_conn -> flags |= CONN_VIEWING ; wdg_create_object ( & wdg_conndata , WDG_COMPOUND , WDG_OBJ_WANT_FOCUS ) ; wdg_set_color ( wdg_conndata , WDG_COLOR_SCREEN , EC_COLOR ) ; wdg_set_color ( wdg_conndata , WDG_COLOR_WINDOW , EC_COLOR ) ; wdg_set_color ( wdg_conndata , WDG_COLOR_FOCUS , EC_COLOR_FOCUS ) ; wdg_set_color ( wdg_conndata , WDG_COLOR_TITLE , EC_COLOR_TITLE ) ; wdg_set_title ( wdg_conndata , "Connection data" , WDG_ALIGN_LEFT ) ; wdg_set_size ( wdg_conndata , 1 , 2 , - 1 , SYSMSG_WIN_SIZE - 1 ) ; wdg_create_object ( & wdg_c1 , WDG_SCROLL , 0 ) ; snprintf ( title , MAX_ASCII_ADDR_LEN + 6 , "%s:%d" , ip_addr_ntoa ( & curr_conn -> L3_addr1 , tmp ) , ntohs ( curr_conn -> L4_addr1 ) ) ; wdg_set_title ( wdg_c1 , title , WDG_ALIGN_LEFT ) ; wdg_set_color ( wdg_c1 , WDG_COLOR_TITLE , EC_COLOR_TITLE ) ; wdg_set_color ( wdg_c1 , WDG_COLOR_FOCUS , EC_COLOR_FOCUS ) ; wdg_set_size ( wdg_c1 , 2 , 3 , current_screen . cols / 2 , SYSMSG_WIN_SIZE - 2 ) ; wdg_create_object ( & wdg_c2 , WDG_SCROLL , 0 ) ; snprintf ( title , MAX_ASCII_ADDR_LEN + 6 , "%s:%d" , ip_addr_ntoa ( & curr_conn -> L3_addr2 , tmp ) , ntohs ( curr_conn -> L4_addr2 ) ) ; wdg_set_title ( wdg_c2 , title , WDG_ALIGN_LEFT ) ; wdg_set_color ( wdg_c2 , WDG_COLOR_TITLE , EC_COLOR_TITLE ) ; wdg_set_color ( wdg_c2 , WDG_COLOR_FOCUS , EC_COLOR_FOCUS ) ; wdg_set_size ( wdg_c2 , current_screen . cols / 2 + 1 , 3 , - 2 , SYSMSG_WIN_SIZE - 2 ) ; wdg_scroll_set_lines ( wdg_c1 , GBL_CONF -> connection_buffer / ( current_screen . cols / 2 ) ) ; wdg_scroll_set_lines ( wdg_c2 , GBL_CONF -> connection_buffer / ( current_screen . cols / 2 ) ) ; wdg_compound_add ( wdg_conndata , wdg_c1 ) ; wdg_compound_add ( wdg_conndata , wdg_c2 ) ; wdg_add_destroy_key ( wdg_conndata , CTRL ( 'Q' ) , curses_destroy_conndata ) ; wdg_compound_add_callback ( wdg_conndata , 'j' , curses_connection_data_join ) ; wdg_compound_add_callback ( wdg_conndata , 'y' , curses_connection_inject ) ; wdg_compound_add_callback ( wdg_conndata , 'Y' , curses_connection_inject_file ) ; wdg_compound_add_callback ( wdg_conndata , 'k' , curses_connection_kill_wrapper ) ; wdg_compound_add_callback ( wdg_conndata , ' ' , curses_connection_data_help ) ; wdg_draw_object ( wdg_conndata ) ; wdg_set_focus ( wdg_conndata ) ; connbuf_print ( & curr_conn -> data , split_print ) ; conntrack_hook_conn_add ( curr_conn , split_print_po ) ; }
1,223,258,652,239,369,200
debian
101
0
SPL_METHOD ( SplFileObject , func_name ) \ { \ spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; \ FileFunctionCall ( func_name , ZEND_NUM_ARGS ( ) , NULL ) ; \ } SPL_METHOD ( SplFileObject , fgetcsv ) { spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; char delimiter = intern -> u . file . delimiter , enclosure = intern -> u . file . enclosure , escape = intern -> u . file . escape ; char * delim = NULL , * enclo = NULL , * esc = NULL ; int d_len = 0 , e_len = 0 , esc_len = 0 ; if ( zend_parse_parameters ( ZEND_NUM_ARGS ( ) TSRMLS_CC , "|sss" , & delim , & d_len , & enclo , & e_len , & esc , & esc_len ) == SUCCESS ) { switch ( ZEND_NUM_ARGS ( ) ) { case 3 : if ( esc_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "escape must be a character" ) ; RETURN_FALSE ; } escape = esc [ 0 ] ; case 2 : if ( e_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "enclosure must be a character" ) ; RETURN_FALSE ; } enclosure = enclo [ 0 ] ; case 1 : if ( d_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "delimiter must be a character" ) ; RETURN_FALSE ; } delimiter = delim [ 0 ] ; case 0 : break ; } spl_filesystem_file_read_csv ( intern , delimiter , enclosure , escape , return_value TSRMLS_CC ) ; } } SPL_METHOD ( SplFileObject , fputcsv ) { spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; char delimiter = intern -> u . file . delimiter , enclosure = intern -> u . file . enclosure , escape = intern -> u . file . escape ; char * delim = NULL , * enclo = NULL , * esc = NULL ; int d_len = 0 , e_len = 0 , esc_len = 0 , ret ; zval * fields = NULL ; if ( zend_parse_parameters ( ZEND_NUM_ARGS ( ) TSRMLS_CC , "a|sss" , & fields , & delim , & d_len , & enclo , & e_len , & esc , & esc_len ) == SUCCESS ) { switch ( ZEND_NUM_ARGS ( ) ) { case 4 : if ( esc_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "escape must be a character" ) ; RETURN_FALSE ; } escape = esc [ 0 ] ; case 3 : if ( e_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "enclosure must be a character" ) ; RETURN_FALSE ; } enclosure = enclo [ 0 ] ; case 2 : if ( d_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "delimiter must be a character" ) ; RETURN_FALSE ; } delimiter = delim [ 0 ] ; case 1 : case 0 : break ; } ret = php_fputcsv ( intern -> u . file . stream , fields , delimiter , enclosure , escape TSRMLS_CC ) ; RETURN_LONG ( ret ) ; } } SPL_METHOD ( SplFileObject , setCsvControl ) { spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; char delimiter = ',' , enclosure = '"' , escape = '\\' ; char * delim = NULL , * enclo = NULL , * esc = NULL ; int d_len = 0 , e_len = 0 , esc_len = 0 ; if ( zend_parse_parameters ( ZEND_NUM_ARGS ( ) TSRMLS_CC , "|sss" , & delim , & d_len , & enclo , & e_len , & esc , & esc_len ) == SUCCESS ) { switch ( ZEND_NUM_ARGS ( ) ) { case 3 : if ( esc_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "escape must be a character" ) ; RETURN_FALSE ; } escape = esc [ 0 ] ; case 2 : if ( e_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "enclosure must be a character" ) ; RETURN_FALSE ; } enclosure = enclo [ 0 ] ; case 1 : if ( d_len != 1 ) { php_error_docref ( NULL TSRMLS_CC , E_WARNING , "delimiter must be a character" ) ; RETURN_FALSE ; } delimiter = delim [ 0 ] ; case 0 : break ; } intern -> u . file . delimiter = delimiter ; intern -> u . file . enclosure = enclosure ; intern -> u . file . escape = escape ; } } SPL_METHOD ( SplFileObject , getCsvControl ) { spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ; char delimiter [ 2 ] , enclosure [ 2 ] ; array_init ( return_value ) ; delimiter [ 0 ] = intern -> u . file . delimiter ; delimiter [ 1 ] = '\0' ; enclosure [ 0 ] = intern -> u . file . enclosure ; enclosure [ 1 ] = '\0' ; add_next_index_string ( return_value , delimiter , 1 ) ; add_next_index_string ( return_value , enclosure , 1 ) ; } FileFunction ( flock )
-4,967,913,570,211,471,000
debian
7
0
void * jas_malloc ( size_t size ) { void * result ; JAS_DBGLOG ( 101 , ( "jas_malloc(%zu)\n" , size ) ) ; result = malloc ( size ) ; JAS_DBGLOG ( 100 , ( "jas_malloc(%zu) -> %p\n" , size , result ) ) ; return result ; }
6,393,050,609,822,898,000
debian
3
0
static const char * trb_name ( XHCITRB * trb ) { return lookup_name ( TRB_TYPE ( * trb ) , TRBType_names , ARRAY_SIZE ( TRBType_names ) ) ; }
-1,381,237,731,082,039,300
debian
27
0
static gboolean ngsniffer_read ( wtap * wth , int * err , gchar * * err_info , gint64 * data_offset ) { ngsniffer_t * ngsniffer ; int ret ; guint padding ; ngsniffer = ( ngsniffer_t * ) wth -> priv ; for ( ; ; ) { * data_offset = ngsniffer -> seq . uncomp_offset ; ret = ngsniffer_process_record ( wth , FALSE , & padding , & wth -> phdr , wth -> frame_buffer , err , err_info ) ; if ( ret < 0 ) { return FALSE ; } switch ( ret ) { case REC_FRAME2 : case REC_FRAME4 : case REC_FRAME6 : if ( padding != 0 ) { if ( ! ng_file_skip_seq ( wth , padding , err , err_info ) ) return FALSE ; } return TRUE ; case REC_EOF : * err = 0 ; return FALSE ; default : if ( padding != 0 ) { if ( ! ng_file_skip_seq ( wth , padding , err , err_info ) ) return FALSE ; } break ; } } }
1,676,654,288,894,940,700
debian
6
1
static krb5_error_code randkey_princ ( krb5_principal princ , krb5_boolean keepold , int n_ks , krb5_key_salt_tuple * ks ) { if ( keepold || ks ) { return kadm5_randkey_principal_3 ( handle , princ , keepold , n_ks , ks , NULL , NULL ) ; } else return kadm5_randkey_principal ( handle , princ , NULL , NULL ) ; }
-5,268,859,819,325,808,000
debian
9
0
static void info_provider_callback ( NautilusInfoProvider * provider , NautilusOperationHandle * handle , NautilusOperationResult result , gpointer user_data ) { InfoProviderResponse * response ; response = g_new0 ( InfoProviderResponse , 1 ) ; response -> provider = provider ; response -> handle = handle ; response -> result = result ; response -> directory = NAUTILUS_DIRECTORY ( user_data ) ; response -> directory -> details -> extension_info_idle = g_idle_add_full ( G_PRIORITY_DEFAULT_IDLE , info_provider_idle_callback , response , g_free ) ; }
-3,559,021,711,340,555,000
debian
3
0
bool contain_nonstrict_functions ( Node * clause ) { return contain_nonstrict_functions_walker ( clause , NULL ) ; }
2,687,336,064,028,423,000
chrome
19
0
static void evdns_request_timeout_callback ( int fd , short events , void * arg ) { struct request * const req = ( struct request * ) arg ; ( void ) fd ; ( void ) events ; log ( EVDNS_LOG_DEBUG , "Request %lx timed out" , ( unsigned long ) arg ) ; req -> ns -> timedout ++ ; if ( req -> ns -> timedout > global_max_nameserver_timeout ) { req -> ns -> timedout = 0 ; nameserver_failed ( req -> ns , "request timed out." ) ; } ( void ) evtimer_del ( & req -> timeout_event ) ; if ( req -> tx_count >= global_max_retransmits ) { reply_callback ( req , 0 , DNS_ERR_TIMEOUT , NULL ) ; request_finished ( req , & req_head ) ; } else { evdns_request_transmit ( req ) ; } }
-1,514,879,141,119,470,800
chrome
5
0
void min_heap_ctor ( min_heap_t * s ) { s -> p = 0 ; s -> n = 0 ; s -> a = 0 ; }
-1,929,262,071,302,712,000
debian
22
0
static void * Type_Screening_Read ( struct _cms_typehandler_struct * self , cmsIOHANDLER * io , cmsUInt32Number * nItems , cmsUInt32Number SizeOfTag ) { cmsScreening * sc = NULL ; cmsUInt32Number i ; sc = ( cmsScreening * ) _cmsMallocZero ( self -> ContextID , sizeof ( cmsScreening ) ) ; if ( sc == NULL ) return NULL ; * nItems = 0 ; if ( ! _cmsReadUInt32Number ( io , & sc -> Flag ) ) goto Error ; if ( ! _cmsReadUInt32Number ( io , & sc -> nChannels ) ) goto Error ; if ( sc -> nChannels > cmsMAXCHANNELS - 1 ) sc -> nChannels = cmsMAXCHANNELS - 1 ; for ( i = 0 ; i < sc -> nChannels ; i ++ ) { if ( ! _cmsRead15Fixed16Number ( io , & sc -> Channels [ i ] . Frequency ) ) goto Error ; if ( ! _cmsRead15Fixed16Number ( io , & sc -> Channels [ i ] . ScreenAngle ) ) goto Error ; if ( ! _cmsReadUInt32Number ( io , & sc -> Channels [ i ] . SpotShape ) ) goto Error ; } * nItems = 1 ; return ( void * ) sc ; Error : if ( sc != NULL ) _cmsFree ( self -> ContextID , sc ) ; return NULL ; cmsUNUSED_PARAMETER ( SizeOfTag ) ; }
-1,338,403,456,839,869,200
debian
7
0
static void dissect_q931_signal_ie ( tvbuff_t * tvb , packet_info * pinfo , int offset , int len , proto_tree * tree , proto_item * item ) { if ( len != 1 ) { expert_add_info_format ( pinfo , item , & ei_q931_invalid_length , "Signal: length is %d, should be 1" , len ) ; return ; } proto_tree_add_item ( tree , hf_q931_signal , tvb , offset , 1 , ENC_BIG_ENDIAN ) ; }
-4,635,544,075,321,012,000
debian
16
1
static char * memdup ( const char * src , size_t buffer_length ) { size_t length ; bool add = FALSE ; char * buffer ; if ( buffer_length ) length = buffer_length ; else if ( src ) { length = strlen ( src ) ; add = TRUE ; } else return strdup ( "" ) ; buffer = malloc ( length + add ) ; if ( ! buffer ) return NULL ; memcpy ( buffer , src , length ) ; if ( add ) buffer [ length ] = '\0' ; return buffer ; }
-331,579,171,381,918,900
debian
18
0
static BIGNUM * SRP_gN_place_bn ( STACK_OF ( SRP_gN_cache ) * gN_cache , char * ch ) { int i ; if ( gN_cache == NULL ) return NULL ; for ( i = 0 ; i < sk_SRP_gN_cache_num ( gN_cache ) ; i ++ ) { SRP_gN_cache * cache = sk_SRP_gN_cache_value ( gN_cache , i ) ; if ( strcmp ( cache -> b64_bn , ch ) == 0 ) return cache -> bn ; } { SRP_gN_cache * newgN = SRP_gN_new_init ( ch ) ; if ( newgN ) { if ( sk_SRP_gN_cache_insert ( gN_cache , newgN , 0 ) > 0 ) return newgN -> bn ; SRP_gN_free ( newgN ) ; } } return NULL ; }
-1,102,844,685,921,778,700
debian
6
0
void archive_wstring_free ( struct archive_wstring * as ) { as -> length = 0 ; as -> buffer_length = 0 ; free ( as -> s ) ; as -> s = NULL ; }
2,546,373,479,020,365,300
debian
3
0
void _mime_field_block_destroy ( HdrHeap * heap , MIMEFieldBlockImpl * fblock ) { heap -> deallocate_obj ( fblock ) ; }
-6,357,438,421,920,979,000
debian
105
0
ssize_t libevt_record_values_read ( libevt_record_values_t * record_values , libbfio_handle_t * file_io_handle , libevt_io_handle_t * io_handle , off64_t * file_offset , uint8_t strict_mode , libcerror_error_t * * error ) { uint8_t record_size_data [ 4 ] ; uint8_t * record_data = NULL ; static char * function = "libevt_record_values_read" ; size_t read_size = 0 ; size_t record_data_offset = 0 ; ssize_t read_count = 0 ; ssize_t total_read_count = 0 ; uint32_t record_data_size = 0 ; if ( record_values == NULL ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_ARGUMENTS , LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE , "%s: invalid record values." , function ) ; return ( - 1 ) ; } if ( io_handle == NULL ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_ARGUMENTS , LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE , "%s: invalid IO handle." , function ) ; return ( - 1 ) ; } if ( file_offset == NULL ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_ARGUMENTS , LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE , "%s: invalid file offset." , function ) ; return ( - 1 ) ; } record_values -> offset = * file_offset ; read_count = libbfio_handle_read_buffer ( file_io_handle , record_size_data , sizeof ( uint32_t ) , error ) ; if ( read_count != ( ssize_t ) sizeof ( uint32_t ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_IO , LIBCERROR_IO_ERROR_READ_FAILED , "%s: unable to read record size data." , function ) ; goto on_error ; } * file_offset += read_count ; total_read_count = read_count ; byte_stream_copy_to_uint32_little_endian ( record_size_data , record_data_size ) ; if ( record_data_size < 4 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: record data size value out of bounds." , function ) ; goto on_error ; } # if SIZEOF_SIZE_T <= 4 if ( ( size_t ) record_data_size > ( size_t ) SSIZE_MAX ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_EXCEEDS_MAXIMUM , "%s: invalid record data size value exceeds maximum." , function ) ; goto on_error ; } # endif record_data = ( uint8_t * ) memory_allocate ( sizeof ( uint8_t ) * record_data_size ) ; if ( record_data == NULL ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_MEMORY , LIBCERROR_MEMORY_ERROR_INSUFFICIENT , "%s: unable to create record data." , function ) ; goto on_error ; } byte_stream_copy_from_uint32_little_endian ( record_data , record_data_size ) ; record_data_offset = 4 ; read_size = record_data_size - record_data_offset ; if ( ( ( size64_t ) * file_offset + read_size ) > io_handle -> file_size ) { read_size = ( size_t ) ( io_handle -> file_size - * file_offset ) ; } read_count = libbfio_handle_read_buffer ( file_io_handle , & ( record_data [ record_data_offset ] ) , read_size , error ) ; if ( read_count != ( ssize_t ) read_size ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_IO , LIBCERROR_IO_ERROR_READ_FAILED , "%s: unable to read record data." , function ) ; goto on_error ; } * file_offset += read_count ; record_data_offset += read_count ; total_read_count += read_count ; if ( record_data_offset < ( size_t ) record_data_size ) { if ( libbfio_handle_seek_offset ( file_io_handle , ( off64_t ) sizeof ( evt_file_header_t ) , SEEK_SET , error ) == - 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_IO , LIBCERROR_IO_ERROR_SEEK_FAILED , "%s: unable to seek file header offset: %" PRIzd "." , function , sizeof ( evt_file_header_t ) ) ; goto on_error ; } * file_offset = ( off64_t ) sizeof ( evt_file_header_t ) ; read_size = ( size_t ) record_data_size - record_data_offset ; read_count = libbfio_handle_read_buffer ( file_io_handle , & ( record_data [ record_data_offset ] ) , read_size , error ) ; if ( read_count != ( ssize_t ) read_size ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_IO , LIBCERROR_IO_ERROR_READ_FAILED , "%s: unable to read record data." , function ) ; goto on_error ; } * file_offset += read_count ; total_read_count += read_count ; } # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: record data:\n" , function ) ; libcnotify_print_data ( record_data , ( size_t ) record_data_size , LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) ; } # endif if ( memory_compare ( & ( record_data [ 4 ] ) , evt_file_signature , ) == 0 ) { record_values -> type = LIBEVT_RECORD_TYPE_EVENT ; } else if ( memory_compare ( & ( record_data [ 4 ] ) , evt_end_of_file_record_signature1 , ) == 0 ) { record_values -> type = LIBEVT_RECORD_TYPE_END_OF_FILE ; } else { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_UNSUPPORTED_VALUE , "%s: unsupported record values signature." , function ) ; goto on_error ; } if ( record_values -> type == LIBEVT_RECORD_TYPE_EVENT ) { if ( libevt_record_values_read_event ( record_values , record_data , ( size_t ) record_data_size , strict_mode , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_IO , LIBCERROR_IO_ERROR_READ_FAILED , "%s: unable to read event record values." , function ) ; goto on_error ; } } else if ( record_values -> type == LIBEVT_RECORD_TYPE_END_OF_FILE ) { if ( libevt_record_values_read_end_of_file ( record_values , record_data , ( size_t ) record_data_size , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_IO , LIBCERROR_IO_ERROR_READ_FAILED , "%s: unable to read end of file record values." , function ) ; goto on_error ; } } memory_free ( record_data ) ; return ( total_read_count ) ; on_error : if ( record_data != NULL ) { memory_free ( record_data ) ; } return ( - 1 ) ; }
4,180,964,683,905,831,000
debian
6
0
static int bad_option ( struct superblock_security_struct * sbsec , char flag , u32 old_sid , u32 new_sid ) { char mnt_flags = sbsec -> flags & SE_MNTMASK ; if ( sbsec -> flags & SE_SBINITIALIZED ) if ( ! ( sbsec -> flags & flag ) || ( old_sid != new_sid ) ) return 1 ; if ( ! ( sbsec -> flags & SE_SBINITIALIZED ) ) if ( mnt_flags & flag ) return 1 ; return 0 ; }
1,760,449,185,745,615,400
debian
14
0
TSReturnCode TSHttpTxnClientPacketTosSet ( TSHttpTxn txnp , int tos ) { sdk_assert ( sdk_sanity_check_txn ( txnp ) == TS_SUCCESS ) ; HttpSM * sm = ( HttpSM * ) txnp ; if ( nullptr == sm -> ua_session ) { return TS_ERROR ; } NetVConnection * vc = sm -> ua_session -> get_netvc ( ) ; if ( nullptr == vc ) { return TS_ERROR ; } vc -> options . packet_tos = ( uint32_t ) tos ; vc -> apply_options ( ) ; return TS_SUCCESS ; }
-4,596,135,714,614,925,300
debian
104
0
void timelib_strtointerval ( char * s , int len , timelib_time * * begin , timelib_time * * end , timelib_rel_time * * period , int * recurrences , struct timelib_error_container * * errors ) { Scanner in ; int t ; char * e = s + len - 1 ; memset ( & in , 0 , sizeof ( in ) ) ; in . errors = malloc ( sizeof ( struct timelib_error_container ) ) ; in . errors -> warning_count = 0 ; in . errors -> warning_messages = NULL ; in . errors -> error_count = 0 ; in . errors -> error_messages = NULL ; if ( len > 0 ) { while ( isspace ( * s ) && s < e ) { s ++ ; } while ( isspace ( * e ) && e > s ) { e -- ; } } if ( e - s < 0 ) { add_error ( & in , "Empty string" ) ; if ( errors ) { * errors = in . errors ; } else { timelib_error_container_dtor ( in . errors ) ; } return ; } e ++ ; in . str = malloc ( ( e - s ) + YYMAXFILL ) ; memset ( in . str , 0 , ( e - s ) + YYMAXFILL ) ; memcpy ( in . str , s , ( e - s ) ) ; in . lim = in . str + ( e - s ) + YYMAXFILL ; in . cur = in . str ; in . begin = timelib_time_ctor ( ) ; in . begin -> y = TIMELIB_UNSET ; in . begin -> d = TIMELIB_UNSET ; in . begin -> m = TIMELIB_UNSET ; in . begin -> h = TIMELIB_UNSET ; in . begin -> i = TIMELIB_UNSET ; in . begin -> s = TIMELIB_UNSET ; in . begin -> f = 0 ; in . begin -> z = 0 ; in . begin -> dst = 0 ; in . begin -> is_localtime = 0 ; in . begin -> zone_type = TIMELIB_ZONETYPE_OFFSET ; in . end = timelib_time_ctor ( ) ; in . end -> y = TIMELIB_UNSET ; in . end -> d = TIMELIB_UNSET ; in . end -> m = TIMELIB_UNSET ; in . end -> h = TIMELIB_UNSET ; in . end -> i = TIMELIB_UNSET ; in . end -> s = TIMELIB_UNSET ; in . end -> f = 0 ; in . end -> z = 0 ; in . end -> dst = 0 ; in . end -> is_localtime = 0 ; in . end -> zone_type = TIMELIB_ZONETYPE_OFFSET ; in . period = timelib_rel_time_ctor ( ) ; in . period -> y = 0 ; in . period -> d = 0 ; in . period -> m = 0 ; in . period -> h = 0 ; in . period -> i = 0 ; in . period -> s = 0 ; in . period -> weekday = 0 ; in . period -> weekday_behavior = 0 ; in . period -> first_last_day_of = 0 ; in . period -> days = TIMELIB_UNSET ; in . recurrences = 1 ; do { t = scan ( & in ) ; # ifdef DEBUG_PARSER printf ( "%d\n" , t ) ; # endif } while ( t != EOI ) ; free ( in . str ) ; if ( errors ) { * errors = in . errors ; } else { timelib_error_container_dtor ( in . errors ) ; } if ( in . have_begin_date ) { * begin = in . begin ; } else { timelib_time_dtor ( in . begin ) ; } if ( in . have_end_date ) { * end = in . end ; } else { timelib_time_dtor ( in . end ) ; } if ( in . have_period ) { * period = in . period ; } else { timelib_rel_time_dtor ( in . period ) ; } if ( in . have_recurrences ) { * recurrences = in . recurrences ; } }
-2,323,311,514,228,246,000
chrome
73
0
IN_PROC_BROWSER_TEST_F ( DownloadExtensionTest , DownloadExtensionTest_OnDeterminingFilename_IncognitoSplit ) { LoadExtension ( "downloads_split" ) ; ASSERT_TRUE ( StartEmbeddedTestServer ( ) ) ; std : : string download_url = embedded_test_server ( ) -> GetURL ( "/slow?0" ) . spec ( ) ; GoOnTheRecord ( ) ; AddFilenameDeterminer ( ) ; GoOffTheRecord ( ) ; AddFilenameDeterminer ( ) ; GoOnTheRecord ( ) ; std : : unique_ptr < base : : Value > result ( RunFunctionAndReturnResult ( new DownloadsDownloadFunction ( ) , base : : StringPrintf ( "[{ \"url\": \"%s\"} ]" , download_url . c_str ( ) ) ) ) ; ASSERT_TRUE ( result . get ( ) ) ; int result_id = - 1 ; ASSERT_TRUE ( result -> GetAsInteger ( & result_id ) ) ; DownloadItem * item = GetCurrentManager ( ) -> GetDownload ( result_id ) ; ASSERT_TRUE ( item ) ; ScopedCancellingItem canceller ( item ) ; ASSERT_EQ ( download_url , item -> GetOriginalUrl ( ) . spec ( ) ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnCreated : : kEventName , base : : StringPrintf ( "[{ \"danger\": \"safe\"," " \"incognito\": false," " \"id\": %d," " \"mime\": \"text/plain\"," " \"paused\": false," " \"url\": \"%s\"} ]" , result_id , download_url . c_str ( ) ) ) ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnDeterminingFilename : : kEventName , base : : StringPrintf ( "[{ \"id\": %d," " \"incognito\": false," " \"filename\":\"slow.txt\"} ]" , result_id ) ) ) ; ASSERT_TRUE ( item -> GetTargetFilePath ( ) . empty ( ) ) ; ASSERT_EQ ( DownloadItem : : IN_PROGRESS , item -> GetState ( ) ) ; std : : string error ; ASSERT_TRUE ( ExtensionDownloadsEventRouter : : DetermineFilename ( current_browser ( ) -> profile ( ) , false , GetExtensionId ( ) , result_id , base : : FilePath ( FILE_PATH_LITERAL ( "42.txt" ) ) , downloads : : FILENAME_CONFLICT_ACTION_UNIQUIFY , & error ) ) ; EXPECT_EQ ( "" , error ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnChanged : : kEventName , base : : StringPrintf ( "[{ \"id\": %d," " \"filename\": { " " \"previous\": \"\"," " \"current\": \"%s\"} } ]" , result_id , GetFilename ( "42.txt" ) . c_str ( ) ) ) ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnChanged : : kEventName , base : : StringPrintf ( "[{ \"id\": %d," " \"state\": { " " \"previous\": \"in_progress\"," " \"current\": \"complete\"} } ]" , result_id ) ) ) ; GoOffTheRecord ( ) ; result . reset ( RunFunctionAndReturnResult ( new DownloadsDownloadFunction ( ) , base : : StringPrintf ( "[{ \"url\": \"%s\"} ]" , download_url . c_str ( ) ) ) ) ; ASSERT_TRUE ( result . get ( ) ) ; result_id = - 1 ; ASSERT_TRUE ( result -> GetAsInteger ( & result_id ) ) ; item = GetCurrentManager ( ) -> GetDownload ( result_id ) ; ASSERT_TRUE ( item ) ; ScopedCancellingItem canceller2 ( item ) ; ASSERT_EQ ( download_url , item -> GetOriginalUrl ( ) . spec ( ) ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnCreated : : kEventName , base : : StringPrintf ( "[{ \"danger\": \"safe\"," " \"incognito\": true," " \"id\": %d," " \"mime\": \"text/plain\"," " \"paused\": false," " \"url\": \"%s\"} ]" , result_id , download_url . c_str ( ) ) ) ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnDeterminingFilename : : kEventName , base : : StringPrintf ( "[{ \"id\": %d," " \"incognito\": true," " \"filename\":\"slow.txt\"} ]" , result_id ) ) ) ; ASSERT_TRUE ( item -> GetTargetFilePath ( ) . empty ( ) ) ; ASSERT_EQ ( DownloadItem : : IN_PROGRESS , item -> GetState ( ) ) ; error = "" ; ASSERT_TRUE ( ExtensionDownloadsEventRouter : : DetermineFilename ( current_browser ( ) -> profile ( ) , false , GetExtensionId ( ) , result_id , base : : FilePath ( FILE_PATH_LITERAL ( "5.txt" ) ) , downloads : : FILENAME_CONFLICT_ACTION_UNIQUIFY , & error ) ) ; EXPECT_EQ ( "" , error ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnChanged : : kEventName , base : : StringPrintf ( "[{ \"id\": %d," " \"filename\": { " " \"previous\": \"\"," " \"current\": \"%s\"} } ]" , result_id , GetFilename ( "5.txt" ) . c_str ( ) ) ) ) ; ASSERT_TRUE ( WaitFor ( downloads : : OnChanged : : kEventName , base : : StringPrintf ( "[{ \"id\": %d," " \"state\": { " " \"previous\": \"in_progress\"," " \"current\": \"complete\"} } ]" , result_id ) ) ) ; }
1,760,449,185,745,615,400
debian
5
0
void TSLifecycleHookAdd ( TSLifecycleHookID id , TSCont contp ) { sdk_assert ( sdk_sanity_check_continuation ( contp ) == TS_SUCCESS ) ; sdk_assert ( sdk_sanity_check_lifecycle_hook_id ( id ) == TS_SUCCESS ) ; lifecycle_hooks -> append ( id , ( INKContInternal * ) contp ) ; }
8,320,716,512,483,418,000
chrome
152
0
static void iadst16 ( const tran_low_t * input , tran_low_t * output ) { tran_high_t s0 , s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 ; tran_high_t s9 , s10 , s11 , s12 , s13 , s14 , s15 ; tran_high_t x0 = input [ 15 ] ; tran_high_t x1 = input [ 0 ] ; tran_high_t x2 = input [ 13 ] ; tran_high_t x3 = input [ 2 ] ; tran_high_t x4 = input [ 11 ] ; tran_high_t x5 = input [ 4 ] ; tran_high_t x6 = input [ 9 ] ; tran_high_t x7 = input [ 6 ] ; tran_high_t x8 = input [ 7 ] ; tran_high_t x9 = input [ 8 ] ; tran_high_t x10 = input [ 5 ] ; tran_high_t x11 = input [ 10 ] ; tran_high_t x12 = input [ 3 ] ; tran_high_t x13 = input [ 12 ] ; tran_high_t x14 = input [ 1 ] ; tran_high_t x15 = input [ 14 ] ; if ( ! ( x0 | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 | x11 | x12 | x13 | x14 | x15 ) ) { output [ 0 ] = output [ 1 ] = output [ 2 ] = output [ 3 ] = output [ 4 ] = output [ 5 ] = output [ 6 ] = output [ 7 ] = output [ 8 ] = output [ 9 ] = output [ 10 ] = output [ 11 ] = output [ 12 ] = output [ 13 ] = output [ 14 ] = output [ 15 ] = 0 ; return ; } s0 = x0 * cospi_1_64 + x1 * cospi_31_64 ; s1 = x0 * cospi_31_64 - x1 * cospi_1_64 ; s2 = x2 * cospi_5_64 + x3 * cospi_27_64 ; s3 = x2 * cospi_27_64 - x3 * cospi_5_64 ; s4 = x4 * cospi_9_64 + x5 * cospi_23_64 ; s5 = x4 * cospi_23_64 - x5 * cospi_9_64 ; s6 = x6 * cospi_13_64 + x7 * cospi_19_64 ; s7 = x6 * cospi_19_64 - x7 * cospi_13_64 ; s8 = x8 * cospi_17_64 + x9 * cospi_15_64 ; s9 = x8 * cospi_15_64 - x9 * cospi_17_64 ; s10 = x10 * cospi_21_64 + x11 * cospi_11_64 ; s11 = x10 * cospi_11_64 - x11 * cospi_21_64 ; s12 = x12 * cospi_25_64 + x13 * cospi_7_64 ; s13 = x12 * cospi_7_64 - x13 * cospi_25_64 ; s14 = x14 * cospi_29_64 + x15 * cospi_3_64 ; s15 = x14 * cospi_3_64 - x15 * cospi_29_64 ; x0 = dct_const_round_shift ( s0 + s8 ) ; x1 = dct_const_round_shift ( s1 + s9 ) ; x2 = dct_const_round_shift ( s2 + s10 ) ; x3 = dct_const_round_shift ( s3 + s11 ) ; x4 = dct_const_round_shift ( s4 + s12 ) ; x5 = dct_const_round_shift ( s5 + s13 ) ; x6 = dct_const_round_shift ( s6 + s14 ) ; x7 = dct_const_round_shift ( s7 + s15 ) ; x8 = dct_const_round_shift ( s0 - s8 ) ; x9 = dct_const_round_shift ( s1 - s9 ) ; x10 = dct_const_round_shift ( s2 - s10 ) ; x11 = dct_const_round_shift ( s3 - s11 ) ; x12 = dct_const_round_shift ( s4 - s12 ) ; x13 = dct_const_round_shift ( s5 - s13 ) ; x14 = dct_const_round_shift ( s6 - s14 ) ; x15 = dct_const_round_shift ( s7 - s15 ) ; s0 = x0 ; s1 = x1 ; s2 = x2 ; s3 = x3 ; s4 = x4 ; s5 = x5 ; s6 = x6 ; s7 = x7 ; s8 = x8 * cospi_4_64 + x9 * cospi_28_64 ; s9 = x8 * cospi_28_64 - x9 * cospi_4_64 ; s10 = x10 * cospi_20_64 + x11 * cospi_12_64 ; s11 = x10 * cospi_12_64 - x11 * cospi_20_64 ; s12 = - x12 * cospi_28_64 + x13 * cospi_4_64 ; s13 = x12 * cospi_4_64 + x13 * cospi_28_64 ; s14 = - x14 * cospi_12_64 + x15 * cospi_20_64 ; s15 = x14 * cospi_20_64 + x15 * cospi_12_64 ; x0 = s0 + s4 ; x1 = s1 + s5 ; x2 = s2 + s6 ; x3 = s3 + s7 ; x4 = s0 - s4 ; x5 = s1 - s5 ; x6 = s2 - s6 ; x7 = s3 - s7 ; x8 = dct_const_round_shift ( s8 + s12 ) ; x9 = dct_const_round_shift ( s9 + s13 ) ; x10 = dct_const_round_shift ( s10 + s14 ) ; x11 = dct_const_round_shift ( s11 + s15 ) ; x12 = dct_const_round_shift ( s8 - s12 ) ; x13 = dct_const_round_shift ( s9 - s13 ) ; x14 = dct_const_round_shift ( s10 - s14 ) ; x15 = dct_const_round_shift ( s11 - s15 ) ; s0 = x0 ; s1 = x1 ; s2 = x2 ; s3 = x3 ; s4 = x4 * cospi_8_64 + x5 * cospi_24_64 ; s5 = x4 * cospi_24_64 - x5 * cospi_8_64 ; s6 = - x6 * cospi_24_64 + x7 * cospi_8_64 ; s7 = x6 * cospi_8_64 + x7 * cospi_24_64 ; s8 = x8 ; s9 = x9 ; s10 = x10 ; s11 = x11 ; s12 = x12 * cospi_8_64 + x13 * cospi_24_64 ; s13 = x12 * cospi_24_64 - x13 * cospi_8_64 ; s14 = - x14 * cospi_24_64 + x15 * cospi_8_64 ; s15 = x14 * cospi_8_64 + x15 * cospi_24_64 ; x0 = s0 + s2 ; x1 = s1 + s3 ; x2 = s0 - s2 ; x3 = s1 - s3 ; x4 = dct_const_round_shift ( s4 + s6 ) ; x5 = dct_const_round_shift ( s5 + s7 ) ; x6 = dct_const_round_shift ( s4 - s6 ) ; x7 = dct_const_round_shift ( s5 - s7 ) ; x8 = s8 + s10 ; x9 = s9 + s11 ; x10 = s8 - s10 ; x11 = s9 - s11 ; x12 = dct_const_round_shift ( s12 + s14 ) ; x13 = dct_const_round_shift ( s13 + s15 ) ; x14 = dct_const_round_shift ( s12 - s14 ) ; x15 = dct_const_round_shift ( s13 - s15 ) ; s2 = ( - cospi_16_64 ) * ( x2 + x3 ) ; s3 = cospi_16_64 * ( x2 - x3 ) ; s6 = cospi_16_64 * ( x6 + x7 ) ; s7 = cospi_16_64 * ( - x6 + x7 ) ; s10 = cospi_16_64 * ( x10 + x11 ) ; s11 = cospi_16_64 * ( - x10 + x11 ) ; s14 = ( - cospi_16_64 ) * ( x14 + x15 ) ; s15 = cospi_16_64 * ( x14 - x15 ) ; x2 = dct_const_round_shift ( s2 ) ; x3 = dct_const_round_shift ( s3 ) ; x6 = dct_const_round_shift ( s6 ) ; x7 = dct_const_round_shift ( s7 ) ; x10 = dct_const_round_shift ( s10 ) ; x11 = dct_const_round_shift ( s11 ) ; x14 = dct_const_round_shift ( s14 ) ; x15 = dct_const_round_shift ( s15 ) ; output [ 0 ] = x0 ; output [ 1 ] = - x8 ; output [ 2 ] = x12 ; output [ 3 ] = - x4 ; output [ 4 ] = x6 ; output [ 5 ] = x14 ; output [ 6 ] = x10 ; output [ 7 ] = x2 ; output [ 8 ] = x3 ; output [ 9 ] = x11 ; output [ 10 ] = x15 ; output [ 11 ] = x7 ; output [ 12 ] = x5 ; output [ 13 ] = - x13 ; output [ 14 ] = x9 ; output [ 15 ] = - x1 ; }
6,336,384,260,629,386,000
debian
4
0
static void decode_power_conf_batt_AHr ( gchar * s , guint32 value ) { g_snprintf ( s , ITEM_LABEL_LENGTH , "%d [mAHr]" , value * 10 ) ; return ; }
-866,921,002,076,081,900
debian
14
0
int SDK_RPRINT ( RegressionTest * t , const char * api_name , const char * testcase_name , int status , const char * err_details_format , ... ) { int l ; char buffer [ 8192 ] ; char format2 [ 8192 ] ; snprintf ( format2 , sizeof ( format2 ) , "[%s] %s : [%s] <<%s>> { %s } \n" , t -> name , api_name , testcase_name , status == TC_PASS ? "PASS" : "FAIL" , err_details_format ) ; va_list ap ; va_start ( ap , err_details_format ) ; l = ink_bvsprintf ( buffer , format2 , ap ) ; va_end ( ap ) ; fputs ( buffer , stderr ) ; return ( l ) ; }
5,605,949,879,237,784,000
debian
18
0
static time_t _warc_rdmtm ( const char * buf , size_t bsz ) { static const char _key [ ] = "\r\nLast-Modified:" ; const char * val , * eol ; char * on = NULL ; time_t res ; if ( ( val = xmemmem ( buf , bsz , _key , sizeof ( _key ) - 1U ) ) == NULL ) { return ( time_t ) - 1 ; } val += sizeof ( _key ) - 1U ; if ( ( eol = _warc_find_eol ( val , buf + bsz - val ) ) == NULL ) { return - 1 ; } res = xstrpisotime ( val , & on ) ; if ( on != eol ) { return - 1 ; } return res ; }
8,193,534,372,312,945,000
debian
6
0
static inline hwaddr pcnet_rdra_addr ( PCNetState * s , int idx ) { while ( idx < 1 ) { idx += CSR_RCVRL ( s ) ; } return s -> rdra + ( ( CSR_RCVRL ( s ) - idx ) * ( BCR_SWSTYLE ( s ) ? 16 : 8 ) ) ; }
2,578,089,348,587,614,000
debian
3
0
int i2d_X509_CRL_fp ( FILE * fp , X509_CRL * crl ) { return ASN1_item_i2d_fp ( ASN1_ITEM_rptr ( X509_CRL ) , fp , crl ) ; }
-7,434,014,980,763,121,000
debian
179
0
int dissect_ber_set ( gboolean implicit_tag , asn1_ctx_t * actx , proto_tree * parent_tree , tvbuff_t * tvb , int offset , const ber_sequence_t * set , gint hf_id , gint ett_id ) { gint8 classx ; gboolean pcx , ind = 0 , ind_field , imp_tag = FALSE ; gint32 tagx ; guint32 lenx ; proto_tree * tree = parent_tree ; proto_item * item = NULL ; proto_item * cause ; int end_offset , s_offset ; int hoffset ; tvbuff_t * next_tvb ; guint32 mandatory_fields = 0 ; guint8 set_idx ; gboolean first_pass ; const ber_sequence_t * cset = NULL ; # define MAX_SET_ELEMENTS 32 s_offset = offset ; # ifdef DEBUG_BER { const char * name ; header_field_info * hfinfo ; if ( hf_id >= 0 ) { hfinfo = proto_registrar_get_nth ( hf_id ) ; name = hfinfo -> name ; } else { name = "unnamed" ; } if ( tvb_reported_length_remaining ( tvb , offset ) > 3 ) { printf ( "SET dissect_ber_set(%s) entered offset:%d len:%d %02x:%02x:%02x\n" , name , offset , tvb_reported_length_remaining ( tvb , offset ) , tvb_get_guint8 ( tvb , offset ) , tvb_get_guint8 ( tvb , offset + 1 ) , tvb_get_guint8 ( tvb , offset + 2 ) ) ; } else { printf ( "SET dissect_ber_set(%s) entered\n" , name ) ; } } # endif if ( ! implicit_tag ) { hoffset = offset ; offset = dissect_ber_identifier ( actx -> pinfo , tree , tvb , offset , & classx , & pcx , & tagx ) ; offset = dissect_ber_length ( actx -> pinfo , tree , tvb , offset , & lenx , & ind ) ; if ( ind ) { end_offset = offset + lenx - 2 ; } else { end_offset = offset + lenx ; } if ( ( classx != BER_CLASS_APP ) && ( classx != BER_CLASS_PRI ) ) { if ( ! pcx || ( ! implicit_tag && ( ( classx != BER_CLASS_UNI ) || ( tagx != BER_UNI_TAG_SET ) ) ) ) { tvb_ensure_bytes_exist ( tvb , hoffset , 2 ) ; cause = proto_tree_add_string_format_value ( tree , hf_ber_error , tvb , offset , lenx , "set_expected" , "SET expected but class:%s(%d) %s tag:%d was found" , val_to_str_const ( classx , ber_class_codes , "Unknown" ) , classx , pcx ? ber_pc_codes_short . true_string : ber_pc_codes_short . false_string , tagx ) ; expert_add_info ( actx -> pinfo , cause , & ei_ber_expected_set ) ; if ( decode_unexpected ) { proto_tree * unknown_tree = proto_item_add_subtree ( cause , ett_ber_unknown ) ; dissect_unknown_ber ( actx -> pinfo , tvb , hoffset , unknown_tree ) ; } return end_offset ; } } } else { lenx = tvb_reported_length_remaining ( tvb , offset ) ; end_offset = offset + lenx ; } if ( hf_id >= 0 ) { if ( parent_tree ) { item = proto_tree_add_item ( parent_tree , hf_id , tvb , offset , lenx , ENC_BIG_ENDIAN ) ; tree = proto_item_add_subtree ( item , ett_id ) ; } } for ( set_idx = 0 ; ( cset = & set [ set_idx ] ) -> func && ( set_idx < MAX_SET_ELEMENTS ) ; set_idx ++ ) { if ( ! ( cset -> flags & BER_FLAGS_OPTIONAL ) ) mandatory_fields |= 1 << set_idx ; } while ( offset < end_offset ) { gint8 ber_class ; gboolean pc ; gint32 tag ; guint32 len ; int eoffset , count ; if ( ( tvb_get_guint8 ( tvb , offset ) == 0 ) && ( tvb_get_guint8 ( tvb , offset + 1 ) == 0 ) ) { if ( show_internal_ber_fields ) { proto_tree_add_item ( tree , hf_ber_seq_eoc , tvb , s_offset , offset + 2 , ENC_NA ) ; } return end_offset ; } hoffset = offset ; offset = get_ber_identifier ( tvb , offset , & ber_class , & pc , & tag ) ; offset = get_ber_length ( tvb , offset , & len , & ind_field ) ; eoffset = offset + len ; for ( first_pass = TRUE , cset = set , set_idx = 0 ; cset -> func || first_pass ; cset ++ , set_idx ++ ) { if ( ! cset -> func ) { first_pass = FALSE ; cset = set ; set_idx = 0 ; } if ( ( first_pass && ( ( cset -> ber_class == ber_class ) && ( cset -> tag == tag ) ) ) || ( ! first_pass && ( ( cset -> ber_class == BER_CLASS_ANY ) && ( cset -> tag == - 1 ) ) ) ) { if ( ! ( cset -> flags & BER_FLAGS_NOOWNTAG ) ) { hoffset = dissect_ber_identifier ( actx -> pinfo , tree , tvb , hoffset , NULL , NULL , NULL ) ; hoffset = dissect_ber_length ( actx -> pinfo , tree , tvb , hoffset , NULL , NULL ) ; next_tvb = ber_tvb_new_subset_length ( tvb , hoffset , eoffset - hoffset - ( 2 * ind_field ) ) ; } else { next_tvb = ber_tvb_new_subset_length ( tvb , hoffset , eoffset - hoffset ) ; } # if 0 if ( ( eoffset - hoffset ) > length_remaining ) { next_tvb = tvb_new_subset_remaining ( tvb , hoffset ) ; } else { } # endif # ifdef DEBUG_BER { const char * name ; header_field_info * hfinfo ; if ( hf_id >= 0 ) { hfinfo = proto_registrar_get_nth ( hf_id ) ; name = hfinfo -> name ; } else { name = "unnamed" ; } if ( tvb_reported_length_remaining ( next_tvb , 0 ) > 3 ) { printf ( "SET dissect_ber_set(%s) calling subdissector offset:%d len:%d %02x:%02x:%02x\n" , name , offset , tvb_reported_length_remaining ( next_tvb , 0 ) , tvb_get_guint8 ( next_tvb , 0 ) , tvb_get_guint8 ( next_tvb , 1 ) , tvb_get_guint8 ( next_tvb , 2 ) ) ; } else { printf ( "SET dissect_ber_set(%s) calling subdissector\n" , name ) ; } } # endif if ( next_tvb == NULL ) { THROW ( ReportedBoundsError ) ; } imp_tag = FALSE ; if ( ( cset -> flags & BER_FLAGS_IMPLTAG ) ) imp_tag = TRUE ; count = cset -> func ( imp_tag , next_tvb , 0 , actx , tree , * cset -> p_id ) ; if ( count || ( first_pass && ( ( len == 0 ) || ( ( ind_field == 1 ) && ( len == 2 ) ) ) ) ) { if ( set_idx < MAX_SET_ELEMENTS ) mandatory_fields &= ~ ( 1 << set_idx ) ; offset = eoffset ; if ( ! ( cset -> flags & BER_FLAGS_NOOWNTAG ) ) { if ( ind_field == 1 ) { if ( show_internal_ber_fields ) { proto_tree_add_item ( tree , hf_ber_set_field_eoc , tvb , offset , count , ENC_NA ) ; } } } break ; } } } if ( ! cset -> func ) { cause = proto_tree_add_string_format_value ( tree , hf_ber_error , tvb , offset , len , "unknown_field" , "Unknown field in SET class:%s(%d) tag:%d" , val_to_str_const ( ber_class , ber_class_codes , "Unknown" ) , ber_class , tag ) ; expert_add_info ( actx -> pinfo , cause , & ei_ber_unknown_field_set ) ; if ( decode_unexpected ) { proto_tree * unknown_tree = proto_item_add_subtree ( cause , ett_ber_unknown ) ; dissect_unknown_ber ( actx -> pinfo , tvb , hoffset , unknown_tree ) ; } offset = eoffset ; } } if ( mandatory_fields ) { for ( set_idx = 0 ; ( cset = & set [ set_idx ] ) -> func && ( set_idx < MAX_SET_ELEMENTS ) ; set_idx ++ ) { if ( mandatory_fields & ( 1 << set_idx ) ) { cause = proto_tree_add_string_format_value ( tree , hf_ber_error , tvb , offset , lenx , "missing_field" , "Missing field in SET class:%s(%d) tag:%d expected" , val_to_str_const ( cset -> ber_class , ber_class_codes , "Unknown" ) , cset -> ber_class , cset -> tag ) ; expert_add_info ( actx -> pinfo , cause , & ei_ber_missing_field_set ) ; } } } if ( offset != end_offset ) { tvb_ensure_bytes_exist ( tvb , offset - 2 , 2 ) ; cause = proto_tree_add_string_format_value ( tree , hf_ber_error , tvb , offset - 2 , 2 , "illegal_length" , "SET ate %d too many bytes" , offset - end_offset ) ; expert_add_info_format ( actx -> pinfo , cause , & ei_ber_error_length , "BER Error: too many bytes in SET" ) ; } if ( ind ) { end_offset += 2 ; if ( show_internal_ber_fields ) { proto_tree_add_item ( tree , hf_ber_set_eoc , tvb , end_offset - 2 , 2 , ENC_NA ) ; } } return end_offset ; }
5,045,872,831,385,413,000
debian
501
0
static int dissect_btatt ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tree , void * data ) { proto_item * main_item ; proto_tree * main_tree ; proto_item * sub_item ; proto_tree * sub_tree ; int offset = 0 ; guint8 opcode ; guint8 request_opcode ; bluetooth_data_t * bluetooth_data ; btatt_data_t att_data ; request_data_t * request_data ; guint16 handle ; bluetooth_uuid_t uuid ; guint mtu ; memset ( & uuid , 0 , sizeof uuid ) ; bluetooth_data = ( bluetooth_data_t * ) data ; if ( tvb_reported_length_remaining ( tvb , 0 ) < 1 ) return 0 ; att_data . bluetooth_data = bluetooth_data ; main_item = proto_tree_add_item ( tree , proto_btatt , tvb , 0 , - 1 , ENC_NA ) ; main_tree = proto_item_add_subtree ( main_item , ett_btatt ) ; col_set_str ( pinfo -> cinfo , COL_PROTOCOL , "ATT" ) ; switch ( pinfo -> p2p_dir ) { case P2P_DIR_SENT : col_set_str ( pinfo -> cinfo , COL_INFO , "Sent " ) ; break ; case P2P_DIR_RECV : col_set_str ( pinfo -> cinfo , COL_INFO , "Rcvd " ) ; break ; default : col_set_str ( pinfo -> cinfo , COL_INFO , "UnknownDirection " ) ; break ; } mtu = get_mtu ( pinfo , bluetooth_data ) ; if ( tvb_reported_length ( tvb ) > mtu ) expert_add_info ( pinfo , main_item , & ei_btatt_mtu_exceeded ) ; proto_tree_add_bitmask_with_flags ( main_tree , tvb , offset , hf_btatt_opcode , ett_btatt_opcode , hfx_btatt_opcode , ENC_NA , BMT_NO_APPEND ) ; opcode = tvb_get_guint8 ( tvb , 0 ) ; att_data . opcode = opcode ; offset ++ ; request_data = get_request ( tvb , offset , pinfo , opcode , bluetooth_data ) ; col_append_str ( pinfo -> cinfo , COL_INFO , val_to_str_const ( opcode , opcode_vals , "<unknown>" ) ) ; switch ( opcode ) { case 0x01 : { guint8 error_code ; bluetooth_uuid_t service_uuid ; const value_string * error_vals = error_code_vals ; gint hfx_btatt_error_code = hf_btatt_error_code ; proto_tree_add_bitmask_with_flags ( main_tree , tvb , offset , hf_btatt_req_opcode_in_error , ett_btatt_opcode , hfx_btatt_opcode , ENC_NA , BMT_NO_APPEND ) ; request_opcode = tvb_get_guint8 ( tvb , offset ) ; offset += 1 ; offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle_in_error , tvb , offset , bluetooth_data , NULL , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; error_code = tvb_get_guint8 ( tvb , offset ) ; if ( error_code >= 0x80 && error_code <= 0x9F ) { service_uuid = get_service_uuid_from_handle ( pinfo , handle , bluetooth_data ) ; switch ( service_uuid . bt_uuid ) { case GATT_SERVICE_AUTOMATION_IO : error_vals = error_code_aios_vals ; hfx_btatt_error_code = hf_btatt_error_code_aios ; break ; case GATT_SERVICE_ALERT_NOTIFICATION_SERVICE : error_vals = error_code_ans_vals ; hfx_btatt_error_code = hf_btatt_error_code_ans ; break ; case GATT_SERVICE_BOND_MANAGEMENT : error_vals = error_code_bms_vals ; hfx_btatt_error_code = hf_btatt_error_code_bms ; break ; case GATT_SERVICE_CONTINUOUS_GLUCOSE_MONITORING : error_vals = error_code_cgms_vals ; hfx_btatt_error_code = hf_btatt_error_code_cgms ; break ; case GATT_SERVICE_CYCLING_POWER : error_vals = error_code_cps_vals ; hfx_btatt_error_code = hf_btatt_error_code_cps ; break ; case GATT_SERVICE_CYCLING_SPEED_AND_CADENCE : error_vals = error_code_cscs_vals ; hfx_btatt_error_code = hf_btatt_error_code_cscs ; break ; case GATT_SERVICE_CURRENT_TIME_SERVICE : error_vals = error_code_cts_vals ; hfx_btatt_error_code = hf_btatt_error_code_cts ; break ; case GATT_SERVICE_ENVIRONMENTAL_SENSING : error_vals = error_code_ess_vals ; hfx_btatt_error_code = hf_btatt_error_code_ess ; break ; case GATT_SERVICE_GLUCOSE : error_vals = error_code_gls_vals ; hfx_btatt_error_code = hf_btatt_error_code_gls ; break ; case GATT_SERVICE_HTTP_PROXY : error_vals = error_code_hps_vals ; hfx_btatt_error_code = hf_btatt_error_code_hps ; break ; case GATT_SERVICE_HEART_RATE : error_vals = error_code_hrs_vals ; hfx_btatt_error_code = hf_btatt_error_code_hrs ; break ; case GATT_SERVICE_HEALTH_THERMOMETER : error_vals = error_code_hts_vals ; hfx_btatt_error_code = hf_btatt_error_code_hts ; break ; case GATT_SERVICE_INDOOR_POSITIONING : error_vals = error_code_ips_vals ; hfx_btatt_error_code = hf_btatt_error_code_ips ; break ; case GATT_SERVICE_OBJECT_TRANSFER : error_vals = error_code_ots_vals ; hfx_btatt_error_code = hf_btatt_error_code_ots ; break ; case GATT_SERVICE_RUNNING_SPEED_AND_CADENCE : error_vals = error_code_rscs_vals ; hfx_btatt_error_code = hf_btatt_error_code_rscs ; break ; case GATT_SERVICE_USER_DATA : error_vals = error_code_uds_vals ; hfx_btatt_error_code = hf_btatt_error_code_uds ; break ; default : error_vals = error_code_vals ; hfx_btatt_error_code = hf_btatt_error_code ; } } col_append_fstr ( pinfo -> cinfo , COL_INFO , " - %s" , val_to_str_const ( error_code , error_vals , "<unknown>" ) ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; proto_tree_add_item ( main_tree , hfx_btatt_error_code , tvb , offset , 1 , ENC_LITTLE_ENDIAN ) ; offset ++ ; if ( request_data && ( request_opcode == 0x08 || request_opcode == 0x10 ) ) { sub_item = proto_tree_add_uint ( main_tree , hf_btatt_uuid16 , tvb , 0 , 0 , request_data -> parameters . read_by_type . uuid . bt_uuid ) ; PROTO_ITEM_SET_GENERATED ( sub_item ) ; } } break ; case 0x02 : col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Client Rx MTU: %u" , tvb_get_letohs ( tvb , offset ) ) ; proto_tree_add_item ( main_tree , hf_btatt_client_rx_mtu , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . mtu . mtu = tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } break ; case 0x03 : col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Server Rx MTU: %u" , tvb_get_letohs ( tvb , offset ) ) ; proto_tree_add_item ( main_tree , hf_btatt_server_rx_mtu , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; if ( ! pinfo -> fd -> flags . visited && request_data && bluetooth_data ) { guint new_mtu ; new_mtu = tvb_get_guint16 ( tvb , offset , ENC_LITTLE_ENDIAN ) ; if ( new_mtu > request_data -> parameters . mtu . mtu ) new_mtu = request_data -> parameters . mtu . mtu ; save_mtu ( pinfo , bluetooth_data , new_mtu ) ; } offset += 2 ; break ; case 0x04 : col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Handles: 0x%04x..0x%04x" , tvb_get_letohs ( tvb , offset ) , tvb_get_letohs ( tvb , offset + 2 ) ) ; proto_tree_add_item ( main_tree , hf_btatt_starting_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; proto_tree_add_item ( main_tree , hf_btatt_ending_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . find_information . starting_handle = tvb_get_guint16 ( tvb , offset - 4 , ENC_LITTLE_ENDIAN ) ; request_parameters . find_information . ending_handle = tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } break ; case 0x05 : { guint8 format ; sub_item = proto_tree_add_item ( main_tree , hf_btatt_uuid_format , tvb , offset , 1 , ENC_LITTLE_ENDIAN ) ; format = tvb_get_guint8 ( tvb , offset ) ; offset += 1 ; if ( format == 1 ) { while ( tvb_reported_length_remaining ( tvb , offset ) > 0 ) { sub_item = proto_tree_add_item ( main_tree , hf_btatt_information_data , tvb , offset , 4 , ENC_NA ) ; sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_list ) ; offset = dissect_handle ( sub_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , NULL , HANDLE_TVB ) ; handle = tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) ; proto_tree_add_item ( sub_tree , hf_btatt_uuid16 , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; uuid = get_uuid ( tvb , offset , 2 ) ; offset += 2 ; proto_item_append_text ( sub_item , ", Handle: 0x%04x, UUID: %s" , handle , print_uuid ( & uuid ) ) ; save_handle ( pinfo , uuid , handle , ATTRIBUTE_TYPE_OTHER , bluetooth_data ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; } } else if ( format == 2 ) { while ( tvb_reported_length_remaining ( tvb , offset ) > 0 ) { sub_item = proto_tree_add_item ( main_tree , hf_btatt_information_data , tvb , offset , 4 , ENC_NA ) ; sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_list ) ; offset = dissect_handle ( sub_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , NULL , HANDLE_TVB ) ; handle = tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) ; proto_tree_add_item ( sub_tree , hf_btatt_uuid128 , tvb , offset , 16 , ENC_NA ) ; uuid = get_uuid ( tvb , offset , 16 ) ; offset += 16 ; proto_item_append_text ( sub_item , ", Handle: 0x%04x, UUID: %s" , handle , print_uuid ( & uuid ) ) ; save_handle ( pinfo , uuid , handle , ATTRIBUTE_TYPE_OTHER , bluetooth_data ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; } } else { expert_add_info ( pinfo , sub_item , & ei_btatt_uuid_format_unknown ) ; } } break ; case 0x06 : col_append_fstr ( pinfo -> cinfo , COL_INFO , ", %s, Handles: 0x%04x..0x%04x" , val_to_str_ext_const ( tvb_get_letohs ( tvb , offset + 4 ) , & bluetooth_uuid_vals_ext , "<unknown>" ) , tvb_get_letohs ( tvb , offset ) , tvb_get_letohs ( tvb , offset + 2 ) ) ; proto_tree_add_item ( main_tree , hf_btatt_starting_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; proto_tree_add_item ( main_tree , hf_btatt_ending_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; proto_tree_add_item ( main_tree , hf_btatt_uuid16 , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; uuid = get_uuid ( tvb , offset - 2 , 2 ) ; offset += 2 ; dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , tvb_captured_length_remaining ( tvb , offset ) , 0 , uuid , & att_data ) ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . read_by_type . starting_handle = tvb_get_guint16 ( tvb , offset - 6 , ENC_LITTLE_ENDIAN ) ; request_parameters . read_by_type . ending_handle = tvb_get_guint16 ( tvb , offset - 4 , ENC_LITTLE_ENDIAN ) ; request_parameters . read_by_type . uuid = uuid ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } offset = tvb_reported_length ( tvb ) ; break ; case 0x07 : while ( tvb_reported_length_remaining ( tvb , offset ) > 0 ) { sub_item = proto_tree_add_none_format ( main_tree , hf_btatt_handles_info , tvb , offset , 4 , "Handles Info, Handle: 0x%04x, Group End Handle: 0x%04x" , tvb_get_letohs ( tvb , offset ) , tvb_get_letohs ( tvb , offset + 2 ) ) ; sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_list ) ; offset = dissect_handle ( sub_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , NULL , HANDLE_TVB ) ; proto_tree_add_item ( sub_tree , hf_btatt_group_end_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( request_data ) save_handle ( pinfo , request_data -> parameters . read_by_type . uuid , tvb_get_guint16 ( tvb , offset - 4 , ENC_LITTLE_ENDIAN ) , ATTRIBUTE_TYPE_OTHER , bluetooth_data ) ; } break ; case 0x08 : case 0x10 : col_append_fstr ( pinfo -> cinfo , COL_INFO , ", %s, Handles: 0x%04x..0x%04x" , val_to_str_ext_const ( tvb_get_letohs ( tvb , offset + 4 ) , & bluetooth_uuid_vals_ext , "<unknown>" ) , tvb_get_letohs ( tvb , offset ) , tvb_get_letohs ( tvb , offset + 2 ) ) ; proto_tree_add_item ( main_tree , hf_btatt_starting_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; proto_tree_add_item ( main_tree , hf_btatt_ending_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( tvb_reported_length_remaining ( tvb , offset ) == 2 ) { proto_tree_add_item ( main_tree , hf_btatt_uuid16 , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . read_by_type . starting_handle = tvb_get_guint16 ( tvb , offset - 6 , ENC_LITTLE_ENDIAN ) ; request_parameters . read_by_type . ending_handle = tvb_get_guint16 ( tvb , offset - 4 , ENC_LITTLE_ENDIAN ) ; request_parameters . read_by_type . uuid = get_uuid ( tvb , offset - 2 , 2 ) ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } } else if ( tvb_reported_length_remaining ( tvb , offset ) == 16 ) { sub_item = proto_tree_add_item ( main_tree , hf_btatt_uuid128 , tvb , offset , 16 , ENC_NA ) ; proto_item_append_text ( sub_item , " (%s)" , val_to_str_ext_const ( tvb_get_letohs ( tvb , offset ) , & bluetooth_uuid_vals_ext , "<unknown>" ) ) ; offset += 16 ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . read_by_type . starting_handle = tvb_get_guint16 ( tvb , offset - 20 , ENC_LITTLE_ENDIAN ) ; request_parameters . read_by_type . ending_handle = tvb_get_guint16 ( tvb , offset - 18 , ENC_LITTLE_ENDIAN ) ; request_parameters . read_by_type . uuid = get_uuid ( tvb , offset - 16 , 16 ) ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } } else { sub_item = proto_tree_add_item ( tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; expert_add_info ( pinfo , sub_item , & ei_btatt_bad_data ) ; offset = tvb_captured_length ( tvb ) ; } break ; case 0x09 : { guint8 length = tvb_get_guint8 ( tvb , offset ) ; proto_tree_add_item ( main_tree , hf_btatt_length , tvb , offset , 1 , ENC_LITTLE_ENDIAN ) ; offset ++ ; if ( length > 0 ) { col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Attribute List Length: %u" , tvb_reported_length_remaining ( tvb , offset ) / length ) ; while ( tvb_reported_length_remaining ( tvb , offset ) >= length ) { sub_item = proto_tree_add_none_format ( main_tree , hf_btatt_attribute_data , tvb , offset , length , "Attribute Data, Handle: 0x%04x" , tvb_get_letohs ( tvb , offset ) ) ; sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_list ) ; if ( request_data ) { save_handle ( pinfo , request_data -> parameters . read_by_type . uuid , tvb_get_guint16 ( tvb , offset , ENC_LITTLE_ENDIAN ) , ATTRIBUTE_TYPE_OTHER , bluetooth_data ) ; } offset = dissect_handle ( sub_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , NULL , HANDLE_TVB ) ; if ( request_data ) { offset = dissect_attribute_value ( sub_tree , sub_item , pinfo , tvb , offset , length - 2 , tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) , request_data -> parameters . read_by_type . uuid , & att_data ) ; } else { proto_tree_add_item ( sub_tree , hf_btatt_value , tvb , offset , length - 2 , ENC_NA ) ; offset += length - 2 ; } } } if ( request_data ) { sub_item = proto_tree_add_uint ( main_tree , hf_btatt_uuid16 , tvb , 0 , 0 , request_data -> parameters . read_by_type . uuid . bt_uuid ) ; PROTO_ITEM_SET_GENERATED ( sub_item ) ; } } break ; case 0x0a : offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . read_write . handle = handle ; request_parameters . read_write . offset = 0 ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } offset = dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , tvb_captured_length_remaining ( tvb , offset ) , handle , uuid , & att_data ) ; break ; case 0x0b : if ( request_data ) { dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , request_data -> parameters . read_write . handle ) ; col_append_info_by_handle ( pinfo , request_data -> parameters . read_write . handle , bluetooth_data ) ; } if ( is_long_attribute_value ( uuid ) && tvb_captured_length ( tvb ) >= mtu ) { sub_item = proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; if ( ! pinfo -> fd -> flags . visited && request_data && bluetooth_data ) save_value_fragment ( pinfo , tvb , offset , request_data -> parameters . read_write . handle , 0 , bluetooth_data ) ; offset = tvb_captured_length ( tvb ) ; expert_add_info ( pinfo , sub_item , & ei_btatt_mtu_full ) ; } else { if ( request_data ) handle = request_data -> parameters . read_write . handle ; else handle = 0 ; offset = dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , tvb_captured_length_remaining ( tvb , offset ) , handle , uuid , & att_data ) ; } break ; case 0x0c : offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Offset: %u" , tvb_get_letohs ( tvb , offset ) ) ; proto_tree_add_item ( main_tree , hf_btatt_offset , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , 0 , handle , uuid , & att_data ) ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . read_write . handle = handle ; request_parameters . read_write . offset = tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } break ; case 0x0d : if ( request_data ) { dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , request_data -> parameters . read_write . handle ) ; col_append_info_by_handle ( pinfo , request_data -> parameters . read_write . handle , bluetooth_data ) ; if ( request_data -> parameters . read_write . offset == 0 && ! is_long_attribute_value ( uuid ) ) { offset = dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , tvb_captured_length_remaining ( tvb , offset ) , request_data -> parameters . read_write . handle , uuid , & att_data ) ; } else { if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) save_value_fragment ( pinfo , tvb , offset , request_data -> parameters . read_write . handle , request_data -> parameters . read_write . offset , bluetooth_data ) ; if ( tvb_captured_length ( tvb ) < mtu ) { tvbuff_t * next_tvb ; guint reassembled_length ; guint8 * reassembled_data ; sub_item = proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; offset = tvb_captured_length ( tvb ) ; reassembled_data = get_value ( pinfo , request_data -> parameters . read_write . handle , bluetooth_data , & reassembled_length ) ; if ( reassembled_data ) { sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_value ) ; next_tvb = tvb_new_child_real_data ( tvb , reassembled_data , reassembled_length , reassembled_length ) ; add_new_data_source ( pinfo , next_tvb , "Reassembled ATT" ) ; dissect_attribute_value ( sub_tree , NULL , pinfo , next_tvb , 0 , tvb_captured_length ( next_tvb ) , request_data -> parameters . read_write . handle , uuid , & att_data ) ; } } else { sub_item = proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; offset = tvb_captured_length ( tvb ) ; expert_add_info ( pinfo , sub_item , & ei_btatt_mtu_full ) ; } } } else { proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; offset = tvb_captured_length ( tvb ) ; } break ; case 0x0e : if ( tvb_reported_length_remaining ( tvb , offset ) < 4 ) { expert_add_info ( pinfo , main_item , & ei_btatt_handle_too_few ) ; break ; } col_append_str ( pinfo -> cinfo , COL_INFO , ", Handles: " ) ; while ( tvb_reported_length_remaining ( tvb , offset ) >= 2 ) { offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; col_append_fstr ( pinfo -> cinfo , COL_INFO , "0x%04x " , handle ) ; dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , 0 , handle , uuid , & att_data ) ; } if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . read_multiple . number_of_handles = ( tvb_captured_length ( tvb ) - 1 ) / 2 ; request_parameters . read_multiple . handle = ( guint16 * ) tvb_memdup ( wmem_file_scope ( ) , tvb , 1 , request_parameters . read_multiple . number_of_handles * 2 ) ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } break ; case 0x0f : if ( request_data ) { guint i_handle ; for ( i_handle = 0 ; i_handle < request_data -> parameters . read_multiple . number_of_handles ; i_handle += 1 ) { dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , request_data -> parameters . read_multiple . handle [ i_handle ] ) ; offset = dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , tvb_captured_length_remaining ( tvb , offset ) , request_data -> parameters . read_multiple . handle [ i_handle ] , uuid , & att_data ) ; } } else { proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; offset = tvb_reported_length ( tvb ) ; } break ; case 0x11 : { guint8 length = tvb_get_guint8 ( tvb , offset ) ; proto_tree_add_item ( main_tree , hf_btatt_length , tvb , offset , 1 , ENC_LITTLE_ENDIAN ) ; offset ++ ; if ( length > 0 ) { col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Attribute List Length: %u" , tvb_reported_length_remaining ( tvb , offset ) / length ) ; while ( tvb_reported_length_remaining ( tvb , offset ) >= length ) { sub_item = proto_tree_add_none_format ( main_tree , hf_btatt_attribute_data , tvb , offset , length , "Attribute Data, Handle: 0x%04x, Group End Handle: 0x%04x" , tvb_get_letohs ( tvb , offset ) , tvb_get_letohs ( tvb , offset + 2 ) ) ; sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_list ) ; offset = dissect_handle ( sub_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , NULL , HANDLE_TVB ) ; handle = tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) ; proto_tree_add_item ( sub_tree , hf_btatt_group_end_handle , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( request_data ) { offset = dissect_attribute_value ( sub_tree , sub_item , pinfo , tvb , offset , length - 4 , handle , request_data -> parameters . read_by_type . uuid , & att_data ) ; } else { proto_tree_add_item ( sub_tree , hf_btatt_value , tvb , offset , length - 4 , ENC_NA ) ; offset += length - 4 ; } } } if ( request_data ) { sub_item = proto_tree_add_uint ( main_tree , hf_btatt_uuid16 , tvb , 0 , 0 , request_data -> parameters . read_by_type . uuid . bt_uuid ) ; PROTO_ITEM_SET_GENERATED ( sub_item ) ; } } break ; case 0x12 : case 0x1d : case 0x52 : case 0x1b : offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; offset = dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , tvb_captured_length_remaining ( tvb , offset ) , tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) , uuid , & att_data ) ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data && ( opcode == 0x12 || opcode == 0x1d ) ) { union request_parameters_union request_parameters ; request_parameters . read_write . handle = handle ; request_parameters . read_write . offset = 0 ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } break ; case 0x13 : if ( request_data ) { dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , request_data -> parameters . read_write . handle ) ; dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , 0 , request_data -> parameters . read_write . handle , uuid , & att_data ) ; col_append_info_by_handle ( pinfo , request_data -> parameters . read_write . handle , bluetooth_data ) ; } break ; case 0x16 : case 0x17 : offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; col_append_fstr ( pinfo -> cinfo , COL_INFO , ", Offset: %u" , tvb_get_letohs ( tvb , offset ) ) ; proto_tree_add_item ( main_tree , hf_btatt_offset , tvb , offset , 2 , ENC_LITTLE_ENDIAN ) ; offset += 2 ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data && opcode == 0x16 ) { union request_parameters_union request_parameters ; request_parameters . data = NULL ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } if ( ! pinfo -> fd -> flags . visited && request_data && bluetooth_data && opcode == 0x16 ) save_value_fragment ( pinfo , tvb , offset , tvb_get_guint16 ( tvb , offset - 4 , ENC_LITTLE_ENDIAN ) , tvb_get_guint16 ( tvb , offset - 2 , ENC_LITTLE_ENDIAN ) , bluetooth_data ) ; if ( request_data && tvb_captured_length ( tvb ) < mtu ) { tvbuff_t * next_tvb ; guint reassembled_length ; guint8 * reassembled_data ; sub_item = proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; reassembled_data = get_value ( pinfo , request_data -> parameters . read_write . handle , bluetooth_data , & reassembled_length ) ; if ( reassembled_data ) { sub_tree = proto_item_add_subtree ( sub_item , ett_btatt_value ) ; next_tvb = tvb_new_child_real_data ( tvb , reassembled_data , reassembled_length , reassembled_length ) ; add_new_data_source ( pinfo , next_tvb , "Reassembled ATT" ) ; dissect_attribute_value ( sub_tree , NULL , pinfo , next_tvb , 0 , tvb_captured_length ( next_tvb ) , request_data -> parameters . read_write . handle , uuid , & att_data ) ; } } else { proto_tree_add_item ( main_tree , hf_btatt_value , tvb , offset , - 1 , ENC_NA ) ; } offset = tvb_reported_length ( tvb ) ; break ; case 0x18 : col_append_fstr ( pinfo -> cinfo , COL_INFO , ", %s" , val_to_str_const ( tvb_get_guint8 ( tvb , offset ) , flags_vals , "<unknown>" ) ) ; proto_tree_add_item ( main_tree , hf_btatt_flags , tvb , offset , 1 , ENC_LITTLE_ENDIAN ) ; offset ++ ; if ( ! pinfo -> fd -> flags . visited && bluetooth_data ) { union request_parameters_union request_parameters ; request_parameters . data = NULL ; save_request ( pinfo , opcode , request_parameters , bluetooth_data ) ; } break ; case 0x19 : break ; case 0x1E : if ( request_data ) { dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , request_data -> parameters . read_write . handle ) ; col_append_info_by_handle ( pinfo , request_data -> parameters . read_write . handle , bluetooth_data ) ; dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , 0 , request_data -> parameters . read_write . handle , uuid , & att_data ) ; } break ; case 0xd2 : { guint8 length ; offset = dissect_handle ( main_tree , pinfo , hf_btatt_handle , tvb , offset , bluetooth_data , & uuid , HANDLE_TVB ) ; handle = tvb_get_letohs ( tvb , offset - 2 ) ; col_append_info_by_handle ( pinfo , handle , bluetooth_data ) ; length = tvb_reported_length_remaining ( tvb , offset ) ; dissect_attribute_value ( main_tree , NULL , pinfo , tvb , offset , ( length > 12 ) ? length - 12 : 0 , handle , uuid , & att_data ) ; if ( length > 12 ) { offset += length - 12 ; } proto_tree_add_item ( main_tree , hf_btatt_sign_counter , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ; offset += 4 ; proto_tree_add_item ( main_tree , hf_btatt_signature , tvb , offset , 8 , ENC_NA ) ; offset += 8 ; break ; } default : break ; } if ( request_data ) { if ( request_data -> request_in_frame > 0 && request_data -> request_in_frame != pinfo -> num ) { sub_item = proto_tree_add_uint ( main_tree , hf_request_in_frame , tvb , 0 , 0 , request_data -> request_in_frame ) ; PROTO_ITEM_SET_GENERATED ( sub_item ) ; } if ( ! pinfo -> fd -> flags . visited && request_data -> response_in_frame == 0 && pinfo -> num > request_data -> request_in_frame ) request_data -> response_in_frame = pinfo -> num ; if ( request_data -> response_in_frame > 0 && request_data -> response_in_frame != pinfo -> num ) { sub_item = proto_tree_add_uint ( main_tree , hf_response_in_frame , tvb , 0 , 0 , request_data -> response_in_frame ) ; PROTO_ITEM_SET_GENERATED ( sub_item ) ; } } return offset ; }
-5,390,559,971,540,708,000
debian
9
0
static void dsp_x8_put_solidcolor ( uint8_t const pix , uint8_t * dst , int const linesize ) { int k ; for ( k = 0 ; k < 8 ; k ++ ) { memset ( dst , pix , 8 ) ; dst += linesize ; } }
-8,228,664,527,580,019,000
debian
27
0
static int alloc_addbyter ( int output , FILE * data ) { struct asprintf * infop = ( struct asprintf * ) data ; unsigned char outc = ( unsigned char ) output ; if ( ! infop -> buffer ) { infop -> buffer = malloc ( 32 ) ; if ( ! infop -> buffer ) { infop -> fail = 1 ; return - 1 ; } infop -> alloc = 32 ; infop -> len = 0 ; } else if ( infop -> len + 1 >= infop -> alloc ) { char * newptr = NULL ; size_t newsize = infop -> alloc * 2 ; if ( newsize > infop -> alloc ) newptr = realloc ( infop -> buffer , newsize ) ; if ( ! newptr ) { infop -> fail = 1 ; return - 1 ; } infop -> buffer = newptr ; infop -> alloc = newsize ; } infop -> buffer [ infop -> len ] = outc ; infop -> len ++ ; return outc ; }
6,302,861,533,225,985,000
debian
10
0
static int pxa2xx_i2c_rx ( I2CSlave * i2c ) { PXA2xxI2CSlaveState * slave = FROM_I2C_SLAVE ( PXA2xxI2CSlaveState , i2c ) ; PXA2xxI2CState * s = slave -> host ; if ( ( s -> control & ( 1 << 14 ) ) || ! ( s -> control & ( 1 << 6 ) ) ) return 0 ; if ( s -> status & ( 1 << 0 ) ) { s -> status |= 1 << 6 ; } pxa2xx_i2c_update ( s ) ; return s -> data ; }
5,651,124,822,185,018,000
debian
3
0
static void ossl_x509name_free ( void * ptr ) { X509_NAME_free ( ptr ) ; }
-282,365,232,561,056,830
debian
3
0
static void vmxnet_tx_pkt_calculate_hdr_len ( struct VmxnetTxPkt * pkt ) { pkt -> hdr_len = pkt -> vec [ VMXNET_TX_PKT_L2HDR_FRAG ] . iov_len + pkt -> vec [ VMXNET_TX_PKT_L3HDR_FRAG ] . iov_len ; }
-6,068,976,579,504,841,000
debian
36
0
static void read_peervars ( void ) { const struct ctl_var * v ; struct peer * peer ; const u_char * cp ; size_t i ; char * valuep ; u_char wants [ CP_MAXCODE + 1 ] ; u_int gotvar ; peer = findpeerbyassoc ( res_associd ) ; if ( NULL == peer ) { ctl_error ( CERR_BADASSOC ) ; return ; } rpkt . status = htons ( ctlpeerstatus ( peer ) ) ; if ( res_authokay ) peer -> num_events = 0 ; ZERO ( wants ) ; gotvar = 0 ; while ( NULL != ( v = ctl_getitem ( peer_var , & valuep ) ) ) { if ( v -> flags & EOV ) { ctl_error ( CERR_UNKNOWNVAR ) ; return ; } INSIST ( v -> code < COUNTOF ( wants ) ) ; wants [ v -> code ] = 1 ; gotvar = 1 ; } if ( gotvar ) { for ( i = 1 ; i < COUNTOF ( wants ) ; i ++ ) if ( wants [ i ] ) ctl_putpeer ( i , peer ) ; } else for ( cp = def_peer_var ; * cp != 0 ; cp ++ ) ctl_putpeer ( ( int ) * cp , peer ) ; ctl_flushpkt ( 0 ) ; }
-6,357,438,421,920,979,000
debian
283
1
int libevt_record_values_read_event ( libevt_record_values_t * record_values , uint8_t * record_data , size_t record_data_size , uint8_t strict_mode , libcerror_error_t * * error ) { static char * function = "libevt_record_values_read_event" ; size_t record_data_offset = 0 ; size_t strings_data_offset = 0 ; ssize_t value_data_size = 0 ; uint32_t data_offset = 0 ; uint32_t data_size = 0 ; uint32_t members_data_size = 0 ; uint32_t size = 0 ; uint32_t size_copy = 0 ; uint32_t strings_offset = 0 ; uint32_t strings_size = 0 ; uint32_t user_sid_offset = 0 ; uint32_t user_sid_size = 0 ; # if defined ( HAVE_DEBUG_OUTPUT ) uint32_t value_32bit = 0 ; uint16_t value_16bit = 0 ; # endif if ( record_values == NULL ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_ARGUMENTS , LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE , "%s: invalid record values." , function ) ; return ( - 1 ) ; } if ( record_data == NULL ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_ARGUMENTS , LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE , "%s: invalid record data." , function ) ; return ( - 1 ) ; } if ( record_data_size > ( size_t ) SSIZE_MAX ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_ARGUMENTS , LIBCERROR_ARGUMENT_ERROR_VALUE_EXCEEDS_MAXIMUM , "%s: invalid record data size value exceeds maximum." , function ) ; return ( - 1 ) ; } if ( record_data_size < ( sizeof ( evt_record_event_header_t ) + 4 ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: record data size value out of bounds." , function ) ; return ( - 1 ) ; } byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> size , size ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> record_number , record_values -> number ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> creation_time , record_values -> creation_time ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> written_time , record_values -> written_time ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> event_identifier , record_values -> event_identifier ) ; byte_stream_copy_to_uint16_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> event_type , record_values -> event_type ) ; byte_stream_copy_to_uint16_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> event_category , record_values -> event_category ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> strings_offset , strings_offset ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> user_sid_size , user_sid_size ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> user_sid_offset , user_sid_offset ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> data_size , data_size ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> data_offset , data_offset ) ; byte_stream_copy_to_uint32_little_endian ( & ( record_data [ record_data_size - 4 ] ) , size_copy ) ; # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: size\t\t\t\t\t: %" PRIu32 "\n" , function , size ) ; libcnotify_printf ( "%s: signature\t\t\t\t: %c%c%c%c\n" , function , ( ( evt_record_event_header_t * ) record_data ) -> signature [ 0 ] , ( ( evt_record_event_header_t * ) record_data ) -> signature [ 1 ] , ( ( evt_record_event_header_t * ) record_data ) -> signature [ 2 ] , ( ( evt_record_event_header_t * ) record_data ) -> signature [ 3 ] ) ; libcnotify_printf ( "%s: record number\t\t\t\t: %" PRIu32 "\n" , function , record_values -> number ) ; if ( libevt_debug_print_posix_time_value ( function , "creation time\t\t\t\t" , ( ( evt_record_event_header_t * ) record_data ) -> creation_time , 4 , LIBFDATETIME_ENDIAN_LITTLE , LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED , LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_PRINT_FAILED , "%s: unable to print POSIX time value." , function ) ; goto on_error ; } if ( libevt_debug_print_posix_time_value ( function , "written time\t\t\t\t" , ( ( evt_record_event_header_t * ) record_data ) -> written_time , 4 , LIBFDATETIME_ENDIAN_LITTLE , LIBFDATETIME_POSIX_TIME_VALUE_TYPE_SECONDS_32BIT_SIGNED , LIBFDATETIME_STRING_FORMAT_TYPE_CTIME | LIBFDATETIME_STRING_FORMAT_FLAG_DATE_TIME , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_PRINT_FAILED , "%s: unable to print POSIX time value." , function ) ; goto on_error ; } libcnotify_printf ( "%s: event identifier\t\t\t: 0x%08" PRIx32 "\n" , function , record_values -> event_identifier ) ; libcnotify_printf ( "%s: event identifier: code\t\t\t: %" PRIu32 "\n" , function , record_values -> event_identifier & 0x0000ffffUL ) ; libcnotify_printf ( "%s: event identifier: facility\t\t: %" PRIu32 "\n" , function , ( record_values -> event_identifier & 0x0fff0000UL ) >> 16 ) ; libcnotify_printf ( "%s: event identifier: reserved\t\t: %" PRIu32 "\n" , function , ( record_values -> event_identifier & 0x10000000UL ) >> 28 ) ; libcnotify_printf ( "%s: event identifier: customer flags\t: %" PRIu32 "\n" , function , ( record_values -> event_identifier & 0x20000000UL ) >> 29 ) ; libcnotify_printf ( "%s: event identifier: severity\t\t: %" PRIu32 " (" , function , ( record_values -> event_identifier & 0xc0000000UL ) >> 30 ) ; libevt_debug_print_event_identifier_severity ( record_values -> event_identifier ) ; libcnotify_printf ( ")\n" ) ; libcnotify_printf ( "%s: event type\t\t\t\t: %" PRIu16 " (" , function , record_values -> event_type ) ; libevt_debug_print_event_type ( record_values -> event_type ) ; libcnotify_printf ( ")\n" ) ; byte_stream_copy_to_uint16_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> number_of_strings , value_16bit ) ; libcnotify_printf ( "%s: number of strings\t\t\t: %" PRIu16 "\n" , function , value_16bit ) ; libcnotify_printf ( "%s: event category\t\t\t\t: %" PRIu16 "\n" , function , record_values -> event_category ) ; byte_stream_copy_to_uint16_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> event_flags , value_16bit ) ; libcnotify_printf ( "%s: event flags\t\t\t\t: 0x%04" PRIx16 "\n" , function , value_16bit ) ; byte_stream_copy_to_uint32_little_endian ( ( ( evt_record_event_header_t * ) record_data ) -> closing_record_number , value_32bit ) ; libcnotify_printf ( "%s: closing record values number\t\t: %" PRIu32 "\n" , function , value_32bit ) ; libcnotify_printf ( "%s: strings offset\t\t\t\t: %" PRIu32 "\n" , function , strings_offset ) ; libcnotify_printf ( "%s: user security identifier (SID) size\t: %" PRIu32 "\n" , function , user_sid_size ) ; libcnotify_printf ( "%s: user security identifier (SID) offset\t: %" PRIu32 "\n" , function , user_sid_offset ) ; libcnotify_printf ( "%s: data size\t\t\t\t: %" PRIu32 "\n" , function , data_size ) ; libcnotify_printf ( "%s: data offset\t\t\t\t: %" PRIu32 "\n" , function , data_offset ) ; } # endif record_data_offset = sizeof ( evt_record_event_header_t ) ; if ( ( user_sid_offset == 0 ) && ( user_sid_size != 0 ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: user SID offset or size value out of bounds." , function ) ; goto on_error ; } if ( user_sid_offset != 0 ) { if ( ( ( size_t ) user_sid_offset < record_data_offset ) || ( ( size_t ) user_sid_offset >= ( record_data_size - 4 ) ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: user SID offset value out of bounds." , function ) ; goto on_error ; } if ( user_sid_size != 0 ) { if ( ( size_t ) ( user_sid_offset + user_sid_size ) > ( record_data_size - 4 ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: user SID size value out of bounds." , function ) ; goto on_error ; } } } if ( ( ( size_t ) strings_offset < user_sid_offset ) || ( ( size_t ) strings_offset >= ( record_data_size - 4 ) ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: strings offset value out of bounds." , function ) ; goto on_error ; } if ( ( ( size_t ) data_offset < strings_offset ) || ( ( size_t ) data_offset >= ( record_data_size - 4 ) ) ) { if ( data_size != 0 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: data offset value out of bounds." , function ) ; goto on_error ; } data_offset = ( uint32_t ) record_data_size - 4 ; } if ( ( ( size_t ) strings_offset >= ( record_data_size - 4 ) ) && ( strings_offset != data_offset ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: strings offset value out of bounds." , function ) ; goto on_error ; } if ( strings_offset != 0 ) { if ( strings_offset < record_data_offset ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: strings offset value out of bounds." , function ) ; goto on_error ; } } if ( user_sid_offset != 0 ) { members_data_size = user_sid_offset - ( uint32_t ) record_data_offset ; } else if ( strings_offset != 0 ) { members_data_size = strings_offset - ( uint32_t ) record_data_offset ; } if ( strings_offset != 0 ) { strings_size = data_offset - strings_offset ; } if ( data_size != 0 ) { if ( ( size_t ) ( data_offset + data_size ) > ( record_data_size - 4 ) ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS , "%s: data size value out of bounds." , function ) ; goto on_error ; } } if ( members_data_size != 0 ) { # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: members data:\n" , function ) ; libcnotify_print_data ( & ( record_data [ record_data_offset ] ) , members_data_size , LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) ; } # endif if ( libfvalue_value_type_initialize ( & ( record_values -> source_name ) , LIBFVALUE_VALUE_TYPE_STRING_UTF16 , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED , "%s: unable to create source name value." , function ) ; goto on_error ; } value_data_size = libfvalue_value_type_set_data_string ( record_values -> source_name , & ( record_data [ record_data_offset ] ) , members_data_size , LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN , LIBFVALUE_VALUE_DATA_FLAG_MANAGED , error ) ; if ( value_data_size == - 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_SET_FAILED , "%s: unable to set data of source name value." , function ) ; goto on_error ; } # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: source name\t\t\t\t: " , function ) ; if ( libfvalue_value_print ( record_values -> source_name , 0 , 0 , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_PRINT_FAILED , "%s: unable to print source name value." , function ) ; goto on_error ; } libcnotify_printf ( "\n" ) ; } # endif record_data_offset += value_data_size ; members_data_size -= ( uint32_t ) value_data_size ; if ( libfvalue_value_type_initialize ( & ( record_values -> computer_name ) , LIBFVALUE_VALUE_TYPE_STRING_UTF16 , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED , "%s: unable to create computer name value." , function ) ; goto on_error ; } value_data_size = libfvalue_value_type_set_data_string ( record_values -> computer_name , & ( record_data [ record_data_offset ] ) , members_data_size , LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN , LIBFVALUE_VALUE_DATA_FLAG_MANAGED , error ) ; if ( value_data_size == - 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_SET_FAILED , "%s: unable to set data of computer name value." , function ) ; goto on_error ; } # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: computer name\t\t\t\t: " , function ) ; if ( libfvalue_value_print ( record_values -> computer_name , 0 , 0 , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_PRINT_FAILED , "%s: unable to print computer name value." , function ) ; goto on_error ; } libcnotify_printf ( "\n" ) ; } # endif record_data_offset += value_data_size ; members_data_size -= ( uint32_t ) value_data_size ; if ( members_data_size > 0 ) { # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: members trailing data:\n" , function ) ; libcnotify_print_data ( & ( record_data [ record_data_offset ] ) , members_data_size , LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) ; } # endif record_data_offset += members_data_size ; } } if ( user_sid_size != 0 ) { if ( libfvalue_value_type_initialize ( & ( record_values -> user_security_identifier ) , LIBFVALUE_VALUE_TYPE_NT_SECURITY_IDENTIFIER , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED , "%s: unable to create user security identifier (SID) value." , function ) ; goto on_error ; } if ( libfvalue_value_set_data ( record_values -> user_security_identifier , & ( record_data [ user_sid_offset ] ) , ( size_t ) user_sid_size , LIBFVALUE_ENDIAN_LITTLE , LIBFVALUE_VALUE_DATA_FLAG_MANAGED , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_SET_FAILED , "%s: unable to set data of user security identifier (SID) value." , function ) ; goto on_error ; } # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: user security identifier (SID)\t\t: " , function ) ; if ( libfvalue_value_print ( record_values -> user_security_identifier , 0 , 0 , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_PRINT_FAILED , "%s: unable to print user security identifier (SID) value." , function ) ; goto on_error ; } libcnotify_printf ( "\n" ) ; } # endif record_data_offset += user_sid_size ; } if ( strings_size != 0 ) { # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: strings data:\n" , function ) ; libcnotify_print_data ( & ( record_data [ strings_offset ] ) , strings_size , LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) ; } # endif if ( size_copy == 0 ) { strings_data_offset = strings_offset + strings_size - 2 ; while ( strings_data_offset > strings_offset ) { if ( ( record_data [ strings_data_offset ] != 0 ) || ( record_data [ strings_data_offset + 1 ] != 0 ) ) { strings_size += 2 ; break ; } strings_data_offset -= 2 ; strings_size -= 2 ; } } if ( libfvalue_value_type_initialize ( & ( record_values -> strings ) , LIBFVALUE_VALUE_TYPE_STRING_UTF16 , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED , "%s: unable to create strings value." , function ) ; goto on_error ; } value_data_size = libfvalue_value_type_set_data_strings_array ( record_values -> strings , & ( record_data [ strings_offset ] ) , strings_size , LIBFVALUE_CODEPAGE_UTF16_LITTLE_ENDIAN , error ) ; if ( value_data_size == - 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_SET_FAILED , "%s: unable to set data of strings value." , function ) ; goto on_error ; } record_data_offset += strings_size ; } if ( data_size != 0 ) { # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { libcnotify_printf ( "%s: data:\n" , function ) ; libcnotify_print_data ( & ( record_data [ data_offset ] ) , ( size_t ) data_size , LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) ; } # endif if ( libfvalue_value_type_initialize ( & ( record_values -> data ) , LIBFVALUE_VALUE_TYPE_BINARY_DATA , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_INITIALIZE_FAILED , "%s: unable to create data value." , function ) ; goto on_error ; } if ( libfvalue_value_set_data ( record_values -> data , & ( record_data [ record_data_offset ] ) , ( size_t ) data_size , LIBFVALUE_ENDIAN_LITTLE , LIBFVALUE_VALUE_DATA_FLAG_MANAGED , error ) != 1 ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_RUNTIME , LIBCERROR_RUNTIME_ERROR_SET_FAILED , "%s: unable to set data of data value." , function ) ; goto on_error ; } # if defined ( HAVE_DEBUG_OUTPUT ) record_data_offset += data_size ; # endif } # if defined ( HAVE_DEBUG_OUTPUT ) if ( libcnotify_verbose != 0 ) { if ( record_data_offset < ( record_data_size - 4 ) ) { libcnotify_printf ( "%s: padding:\n" , function ) ; libcnotify_print_data ( & ( record_data [ record_data_offset ] ) , ( size_t ) record_data_size - record_data_offset - 4 , LIBCNOTIFY_PRINT_DATA_FLAG_GROUP_DATA ) ; } libcnotify_printf ( "%s: size copy\t\t\t\t: %" PRIu32 "\n" , function , size_copy ) ; libcnotify_printf ( "\n" ) ; } # endif if ( ( strict_mode == 0 ) && ( size_copy == 0 ) ) { size_copy = size ; } if ( size != size_copy ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_INPUT , LIBCERROR_INPUT_ERROR_VALUE_MISMATCH , "%s: value mismatch for size and size copy." , function ) ; goto on_error ; } if ( record_data_size != ( size_t ) size ) { libcerror_error_set ( error , LIBCERROR_ERROR_DOMAIN_INPUT , LIBCERROR_INPUT_ERROR_VALUE_MISMATCH , "%s: value mismatch for record_values data size and size." , function ) ; goto on_error ; } return ( 1 ) ; on_error : if ( record_values -> data != NULL ) { libfvalue_value_free ( & ( record_values -> data ) , NULL ) ; } if ( record_values -> strings != NULL ) { libfvalue_value_free ( & ( record_values -> strings ) , NULL ) ; } if ( record_values -> user_security_identifier != NULL ) { libfvalue_value_free ( & ( record_values -> user_security_identifier ) , NULL ) ; } if ( record_values -> computer_name != NULL ) { libfvalue_value_free ( & ( record_values -> computer_name ) , NULL ) ; } if ( record_values -> source_name != NULL ) { libfvalue_value_free ( & ( record_values -> source_name ) , NULL ) ; } return ( - 1 ) ; }
-6,704,066,512,670,389,000
debian
56
0
static int file_to_archive ( struct cpio * cpio , const char * srcpath ) { const char * destpath ; struct archive_entry * entry , * spare ; size_t len ; int r ; entry = archive_entry_new ( ) ; if ( entry == NULL ) lafe_errc ( 1 , 0 , "Couldn't allocate entry" ) ; archive_entry_copy_sourcepath ( entry , srcpath ) ; r = archive_read_disk_entry_from_file ( cpio -> archive_read_disk , entry , - 1 , NULL ) ; if ( r < ARCHIVE_FAILED ) lafe_errc ( 1 , 0 , "%s" , archive_error_string ( cpio -> archive_read_disk ) ) ; if ( r < ARCHIVE_OK ) lafe_warnc ( 0 , "%s" , archive_error_string ( cpio -> archive_read_disk ) ) ; if ( r <= ARCHIVE_FAILED ) { cpio -> return_value = 1 ; return ( r ) ; } if ( cpio -> uid_override >= 0 ) { archive_entry_set_uid ( entry , cpio -> uid_override ) ; archive_entry_set_uname ( entry , cpio -> uname_override ) ; } if ( cpio -> gid_override >= 0 ) { archive_entry_set_gid ( entry , cpio -> gid_override ) ; archive_entry_set_gname ( entry , cpio -> gname_override ) ; } destpath = srcpath ; if ( cpio -> destdir ) { len = strlen ( cpio -> destdir ) + strlen ( srcpath ) + 8 ; if ( len >= cpio -> pass_destpath_alloc ) { while ( len >= cpio -> pass_destpath_alloc ) { cpio -> pass_destpath_alloc += 512 ; cpio -> pass_destpath_alloc *= 2 ; } free ( cpio -> pass_destpath ) ; cpio -> pass_destpath = malloc ( cpio -> pass_destpath_alloc ) ; if ( cpio -> pass_destpath == NULL ) lafe_errc ( 1 , ENOMEM , "Can't allocate path buffer" ) ; } strcpy ( cpio -> pass_destpath , cpio -> destdir ) ; strcat ( cpio -> pass_destpath , remove_leading_slash ( srcpath ) ) ; destpath = cpio -> pass_destpath ; } if ( cpio -> option_rename ) destpath = cpio_rename ( destpath ) ; if ( destpath == NULL ) return ( 0 ) ; archive_entry_copy_pathname ( entry , destpath ) ; spare = NULL ; if ( cpio -> linkresolver != NULL && archive_entry_filetype ( entry ) != AE_IFDIR ) { archive_entry_linkify ( cpio -> linkresolver , & entry , & spare ) ; } if ( entry != NULL ) { r = entry_to_archive ( cpio , entry ) ; archive_entry_free ( entry ) ; if ( spare != NULL ) { if ( r == 0 ) r = entry_to_archive ( cpio , spare ) ; archive_entry_free ( spare ) ; } } return ( r ) ; }
-5,615,323,818,347,734,000
debian
34
0
void create_thread_to_handle_connection ( THD * thd ) { if ( cached_thread_count > wake_thread ) { thread_cache . push_back ( thd ) ; wake_thread ++ ; mysql_cond_signal ( & COND_thread_cache ) ; } else { char error_message_buff [ MYSQL_ERRMSG_SIZE ] ; int error ; thread_created ++ ; threads . append ( thd ) ; DBUG_PRINT ( "info" , ( ( "creating thread %lu" ) , thd -> thread_id ) ) ; thd -> prior_thr_create_utime = microsecond_interval_timer ( ) ; if ( ( error = mysql_thread_create ( key_thread_one_connection , & thd -> real_id , & connection_attrib , handle_one_connection , ( void * ) thd ) ) ) { DBUG_PRINT ( "error" , ( "Can't create thread to handle request (error %d)" , error ) ) ; thread_count -- ; thd -> killed = KILL_CONNECTION ; mysql_mutex_unlock ( & LOCK_thread_count ) ; mysql_mutex_lock ( & LOCK_connection_count ) ; ( * thd -> scheduler -> connection_count ) -- ; mysql_mutex_unlock ( & LOCK_connection_count ) ; statistic_increment ( aborted_connects , & LOCK_status ) ; my_snprintf ( error_message_buff , sizeof ( error_message_buff ) , ER_THD ( thd , ER_CANT_CREATE_THREAD ) , error ) ; net_send_error ( thd , ER_CANT_CREATE_THREAD , error_message_buff , NULL ) ; close_connection ( thd , ER_OUT_OF_RESOURCES ) ; mysql_mutex_lock ( & LOCK_thread_count ) ; delete thd ; mysql_mutex_unlock ( & LOCK_thread_count ) ; return ; } } mysql_mutex_unlock ( & LOCK_thread_count ) ; DBUG_PRINT ( "info" , ( "Thread created" ) ) ; }
-7,855,974,557,509,681,000
debian
12
0
void getTypeBinaryInputInfo ( Oid type , Oid * typReceive , Oid * typIOParam ) { 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 -> typreceive ) ) ereport ( ERROR , ( errcode ( ERRCODE_UNDEFINED_FUNCTION ) , errmsg ( "no binary input function available for type %s" , format_type_be ( type ) ) ) ) ; * typReceive = pt -> typreceive ; * typIOParam = getTypeIOParam ( typeTuple ) ; ReleaseSysCache ( typeTuple ) ; }
-2,242,211,406,757,466,600
debian
11
0
static gboolean protocol_is_alljoyn_message ( tvbuff_t * tvb , gint offset , gboolean is_ardp ) { gint length = tvb_captured_length ( tvb ) ; if ( length < offset + 1 ) return FALSE ; if ( ! is_ardp ) { if ( tvb_get_guint8 ( tvb , offset ) == 0 ) return TRUE ; if ( find_sasl_command ( tvb , offset ) != NULL ) return TRUE ; } if ( get_message_header_endianness ( tvb , offset ) == ENC_ALLJOYN_BAD_ENCODING ) return FALSE ; if ( ( length < offset + 2 ) || ( try_val_to_str ( tvb_get_guint8 ( tvb , offset + 1 ) , message_header_encoding_vals ) == NULL ) ) return FALSE ; return TRUE ; }
1,286,774,465,219,423,200
debian
17
1
static void jbig2_set_bits ( byte * line , int x0 , int x1 ) { int a0 , a1 , b0 , b1 , a ; a0 = x0 >> 3 ; a1 = x1 >> 3 ; b0 = x0 & 7 ; b1 = x1 & 7 ; if ( a0 == a1 ) { line [ a0 ] |= lm [ b0 ] & rm [ b1 ] ; } else { line [ a0 ] |= lm [ b0 ] ; for ( a = a0 + 1 ; a < a1 ; a ++ ) line [ a ] = 0xFF ; if ( b1 ) line [ a1 ] |= rm [ b1 ] ; } }
-3,616,725,510,139,109,000
chrome
8
0
static int do_16x16_zerozero_search ( VP9_COMP * cpi , int_mv * dst_mv ) { MACROBLOCK * const x = & cpi -> mb ; MACROBLOCKD * const xd = & x -> e_mbd ; unsigned int err ; err = vp9_sad16x16 ( x -> plane [ 0 ] . src . buf , x -> plane [ 0 ] . src . stride , xd -> plane [ 0 ] . pre [ 0 ] . buf , xd -> plane [ 0 ] . pre [ 0 ] . stride ) ; dst_mv -> as_int = 0 ; return err ; }
4,715,922,168,896,528,000
debian
42
0
void jpc_qmfb_join_col ( jpc_fix_t * a , int numrows , int stride , int parity ) { int bufsize = JPC_CEILDIVPOW2 ( numrows , 1 ) ; jpc_fix_t joinbuf [ QMFB_JOINBUFSIZE ] ; jpc_fix_t * buf = joinbuf ; register jpc_fix_t * srcptr ; register jpc_fix_t * dstptr ; register int n ; int hstartcol ; if ( bufsize > QMFB_JOINBUFSIZE ) { if ( ! ( buf = jas_alloc2 ( bufsize , sizeof ( jpc_fix_t ) ) ) ) { abort ( ) ; } } hstartcol = ( numrows + 1 - parity ) >> 1 ; n = hstartcol ; srcptr = & a [ 0 ] ; dstptr = buf ; while ( n -- > 0 ) { * dstptr = * srcptr ; srcptr += stride ; ++ dstptr ; } srcptr = & a [ hstartcol * stride ] ; dstptr = & a [ ( 1 - parity ) * stride ] ; n = numrows - hstartcol ; while ( n -- > 0 ) { * dstptr = * srcptr ; dstptr += 2 * stride ; srcptr += stride ; } srcptr = buf ; dstptr = & a [ parity * stride ] ; n = hstartcol ; while ( n -- > 0 ) { * dstptr = * srcptr ; dstptr += 2 * stride ; ++ srcptr ; } if ( buf != joinbuf ) { jas_free ( buf ) ; } }