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
|
---|---|---|---|---|
7,039,307,292,471,245,000 | debian | 6 | 0 | static guint16 de_tp_rlc_sdu_counter_value ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len _U_ , gchar * add_string _U_ , int string_len _U_ ) {
guint32 curr_offset = offset ;
proto_tree_add_item ( tree , hf_gsm_a_dtap_ue_received_rlc_sdu_counter_value , tvb , curr_offset , 4 , ENC_BIG_ENDIAN ) ;
curr_offset += 4 ;
return ( curr_offset - offset ) ;
} |
1,760,449,185,745,615,400 | debian | 3 | 0 | TSReturnCode TSUrlSchemeSet ( TSMBuffer bufp , TSMLoc obj , const char * value , int length ) {
return URLPartSet ( bufp , obj , value , length , & URL : : scheme_set ) ;
} |
4,313,735,399,044,135,400 | debian | 5 | 0 | void psf_init_files ( SF_PRIVATE * psf ) {
psf -> file . filedes = - 1 ;
psf -> rsrc . filedes = - 1 ;
psf -> file . savedes = - 1 ;
} |
-6,552,851,419,396,579,000 | debian | 34 | 0 | static int dissect_printerdata_data ( tvbuff_t * tvb , int offset , packet_info * pinfo , proto_tree * tree , dcerpc_info * di , guint8 * drep _U_ , guint32 type ) {
proto_item * item , * hidden_item ;
proto_tree * subtree ;
guint32 size ;
subtree = proto_tree_add_subtree ( tree , tvb , offset , 0 , ett_printerdata_data , & item , "Data" ) ;
offset = dissect_ndr_uint32 ( tvb , offset , pinfo , subtree , di , drep , hf_printerdata_size , & size ) ;
if ( size ) {
offset = dissect_ndr_uint8s ( tvb , offset , pinfo , subtree , di , drep , hf_printerdata_data , size , NULL ) ;
switch ( type ) {
case DCERPC_REG_SZ : {
char * data = tvb_get_string_enc ( NULL , tvb , offset - size , size , ENC_UTF_16 | ENC_LITTLE_ENDIAN ) ;
proto_item_append_text ( item , ": %s" , data ) ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , " = %s" , data ) ;
hidden_item = proto_tree_add_string ( tree , hf_printerdata_data_sz , tvb , offset - size , size , data ) ;
PROTO_ITEM_SET_HIDDEN ( hidden_item ) ;
g_free ( data ) ;
break ;
}
case DCERPC_REG_DWORD : {
guint32 data = tvb_get_letohl ( tvb , offset - size ) ;
proto_item_append_text ( item , ": 0x%08x" , data ) ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , " = 0x%08x" , data ) ;
hidden_item = proto_tree_add_uint ( tree , hf_printerdata_data_dword , tvb , offset - size , 4 , data ) ;
PROTO_ITEM_SET_HIDDEN ( hidden_item ) ;
break ;
}
case DCERPC_REG_BINARY : col_append_str ( pinfo -> cinfo , COL_INFO , " = <binary data>" ) ;
break ;
default : break ;
}
}
proto_item_set_len ( item , size + 4 ) ;
return offset ;
} |
-3,616,725,510,139,109,000 | chrome | 56 | 0 | static void update_mbgraph_frame_stats ( VP9_COMP * cpi , MBGRAPH_FRAME_STATS * stats , YV12_BUFFER_CONFIG * buf , YV12_BUFFER_CONFIG * golden_ref , YV12_BUFFER_CONFIG * alt_ref ) {
MACROBLOCK * const x = & cpi -> mb ;
MACROBLOCKD * const xd = & x -> e_mbd ;
VP9_COMMON * const cm = & cpi -> common ;
int mb_col , mb_row , offset = 0 ;
int mb_y_offset = 0 , arf_y_offset = 0 , gld_y_offset = 0 ;
MV gld_top_mv = {
0 , 0 }
;
MODE_INFO mi_local ;
vp9_zero ( mi_local ) ;
x -> mv_row_min = - BORDER_MV_PIXELS_B16 ;
x -> mv_row_max = ( cm -> mb_rows - 1 ) * 8 + BORDER_MV_PIXELS_B16 ;
xd -> up_available = 0 ;
xd -> plane [ 0 ] . dst . stride = buf -> y_stride ;
xd -> plane [ 0 ] . pre [ 0 ] . stride = buf -> y_stride ;
xd -> plane [ 1 ] . dst . stride = buf -> uv_stride ;
xd -> mi [ 0 ] . src_mi = & mi_local ;
mi_local . mbmi . sb_type = BLOCK_16X16 ;
mi_local . mbmi . ref_frame [ 0 ] = LAST_FRAME ;
mi_local . mbmi . ref_frame [ 1 ] = NONE ;
for ( mb_row = 0 ;
mb_row < cm -> mb_rows ;
mb_row ++ ) {
MV gld_left_mv = gld_top_mv ;
int mb_y_in_offset = mb_y_offset ;
int arf_y_in_offset = arf_y_offset ;
int gld_y_in_offset = gld_y_offset ;
x -> mv_col_min = - BORDER_MV_PIXELS_B16 ;
x -> mv_col_max = ( cm -> mb_cols - 1 ) * 8 + BORDER_MV_PIXELS_B16 ;
xd -> left_available = 0 ;
for ( mb_col = 0 ;
mb_col < cm -> mb_cols ;
mb_col ++ ) {
MBGRAPH_MB_STATS * mb_stats = & stats -> mb_stats [ offset + mb_col ] ;
update_mbgraph_mb_stats ( cpi , mb_stats , buf , mb_y_in_offset , golden_ref , & gld_left_mv , alt_ref , mb_row , mb_col ) ;
gld_left_mv = mb_stats -> ref [ GOLDEN_FRAME ] . m . mv . as_mv ;
if ( mb_col == 0 ) {
gld_top_mv = gld_left_mv ;
}
xd -> left_available = 1 ;
mb_y_in_offset += 16 ;
gld_y_in_offset += 16 ;
arf_y_in_offset += 16 ;
x -> mv_col_min -= 16 ;
x -> mv_col_max -= 16 ;
}
xd -> up_available = 1 ;
mb_y_offset += buf -> y_stride * 16 ;
gld_y_offset += golden_ref -> y_stride * 16 ;
if ( alt_ref ) arf_y_offset += alt_ref -> y_stride * 16 ;
x -> mv_row_min -= 16 ;
x -> mv_row_max -= 16 ;
offset += cm -> mb_cols ;
}
} |
-8,263,083,159,286,475,000 | debian | 6 | 0 | static void fix_bitshift ( ShortenContext * s , int32_t * buffer ) {
int i ;
if ( s -> bitshift != 0 ) for ( i = 0 ;
i < s -> blocksize ;
i ++ ) buffer [ i ] <<= s -> bitshift ;
} |
-8,046,645,508,582,877,000 | debian | 13 | 0 | static void get_frame_mb ( const AVFrame * frame , int x , int y , uint8_t mb [ ] , int dim ) {
int i , j , cp ;
for ( cp = 0 ;
cp < 3 ;
cp ++ ) {
int stride = frame -> linesize [ cp ] ;
for ( i = 0 ;
i < dim ;
i ++ ) for ( j = 0 ;
j < dim ;
j ++ ) * mb ++ = frame -> data [ cp ] [ ( y + i ) * stride + x + j ] ;
}
} |
-2,222,463,888,415,250,000 | chrome | 5 | 0 | int vp9_get_y_sse ( const YV12_BUFFER_CONFIG * a , const YV12_BUFFER_CONFIG * b ) {
assert ( a -> y_crop_width == b -> y_crop_width ) ;
assert ( a -> y_crop_height == b -> y_crop_height ) ;
return ( int ) get_sse ( a -> y_buffer , a -> y_stride , b -> y_buffer , b -> y_stride , a -> y_crop_width , a -> y_crop_height ) ;
} |
1,458,662,858,915,721,500 | debian | 3 | 0 | bool tcg_enabled ( void ) {
return tcg_ctx . code_gen_buffer != NULL ;
} |
2,687,336,064,028,423,000 | chrome | 12 | 0 | static void nameserver_probe_failed ( struct nameserver * const ns ) {
const struct timeval * timeout ;
( void ) evtimer_del ( & ns -> timeout_event ) ;
if ( ns -> state == 1 ) {
return ;
}
timeout = & global_nameserver_timeouts [ MIN ( ns -> failed_times , global_nameserver_timeouts_length - 1 ) ] ;
ns -> failed_times ++ ;
if ( evtimer_add ( & ns -> timeout_event , ( struct timeval * ) timeout ) < 0 ) {
log ( EVDNS_LOG_WARN , "Error from libevent when adding timer event for %s" , debug_ntoa ( ns -> address ) ) ;
}
} |
9,176,142,195,250,516,000 | debian | 6 | 0 | static void prplcb_privacy_deny_removed ( PurpleAccount * account , const char * name ) {
struct im_connection * ic = purple_ic_by_pa ( account ) ;
void * n ;
n = g_slist_find_custom ( ic -> deny , name , ( GCompareFunc ) ic -> acc -> prpl -> handle_cmp ) ;
ic -> deny = g_slist_remove ( ic -> deny , n ) ;
} |
6,595,989,226,414,083,000 | debian | 11 | 0 | static int rds_notify_cong ( struct rds_sock * rs , struct msghdr * msghdr ) {
uint64_t notify = rs -> rs_cong_notify ;
unsigned long flags ;
int err ;
err = put_cmsg ( msghdr , SOL_RDS , RDS_CMSG_CONG_UPDATE , sizeof ( notify ) , & notify ) ;
if ( err ) return err ;
spin_lock_irqsave ( & rs -> rs_lock , flags ) ;
rs -> rs_cong_notify &= ~ notify ;
spin_unlock_irqrestore ( & rs -> rs_lock , flags ) ;
return 0 ;
} |
9,175,972,616,340,456,000 | debian | 44 | 0 | static char * * create_argv_command ( struct rule * rule , struct process * process , struct iovec * * argv ) {
size_t count , i , j , stdin_arg ;
char * * req_argv = NULL ;
const char * program ;
for ( count = 0 ;
argv [ count ] != NULL ;
count ++ ) ;
if ( rule -> sudo_user == NULL ) req_argv = xcalloc ( count + 1 , sizeof ( char * ) ) ;
else req_argv = xcalloc ( count + 5 , sizeof ( char * ) ) ;
if ( rule -> sudo_user != NULL ) {
req_argv [ 0 ] = xstrdup ( PATH_SUDO ) ;
req_argv [ 1 ] = xstrdup ( "-u" ) ;
req_argv [ 2 ] = xstrdup ( rule -> sudo_user ) ;
req_argv [ 3 ] = xstrdup ( "--" ) ;
req_argv [ 4 ] = xstrdup ( rule -> program ) ;
j = 5 ;
}
else {
program = strrchr ( rule -> program , '/' ) ;
if ( program == NULL ) program = rule -> program ;
else program ++ ;
req_argv [ 0 ] = xstrdup ( program ) ;
j = 1 ;
}
if ( rule -> stdin_arg == - 1 ) stdin_arg = count - 1 ;
else stdin_arg = ( size_t ) rule -> stdin_arg ;
for ( i = 1 ;
i < count ;
i ++ ) {
const char * data = argv [ i ] -> iov_base ;
size_t length = argv [ i ] -> iov_len ;
if ( i == stdin_arg ) {
process -> input = evbuffer_new ( ) ;
if ( process -> input == NULL ) die ( "internal error: cannot create input buffer" ) ;
if ( evbuffer_add ( process -> input , data , length ) < 0 ) die ( "internal error: cannot add data to input buffer" ) ;
continue ;
}
if ( length == 0 ) req_argv [ j ] = xstrdup ( "" ) ;
else req_argv [ j ] = xstrndup ( data , length ) ;
j ++ ;
}
req_argv [ j ] = NULL ;
return req_argv ;
} |
5,918,484,636,148,311,000 | debian | 8 | 0 | int mem_mapped_map_color_rgb ( gx_device * dev , gx_color_index color , gx_color_value prgb [ 3 ] ) {
gx_device_memory * const mdev = ( gx_device_memory * ) dev ;
const byte * pptr = mdev -> palette . data + ( int ) color * 3 ;
prgb [ 0 ] = gx_color_value_from_byte ( pptr [ 0 ] ) ;
prgb [ 1 ] = gx_color_value_from_byte ( pptr [ 1 ] ) ;
prgb [ 2 ] = gx_color_value_from_byte ( pptr [ 2 ] ) ;
return 0 ;
} |
-7,049,333,455,584,635,000 | chrome | 201 | 1 | static void _UTF16LEToUnicodeWithOffsets ( UConverterToUnicodeArgs * pArgs , UErrorCode * pErrorCode ) {
UConverter * cnv ;
const uint8_t * source ;
UChar * target ;
int32_t * offsets ;
uint32_t targetCapacity , length , count , sourceIndex ;
UChar c , trail ;
if ( pArgs -> converter -> mode < 8 ) {
_UTF16ToUnicodeWithOffsets ( pArgs , pErrorCode ) ;
return ;
}
cnv = pArgs -> converter ;
source = ( const uint8_t * ) pArgs -> source ;
length = ( int32_t ) ( ( const uint8_t * ) pArgs -> sourceLimit - source ) ;
if ( length <= 0 && cnv -> toUnicodeStatus == 0 ) {
return ;
}
target = pArgs -> target ;
if ( target >= pArgs -> targetLimit ) {
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
return ;
}
targetCapacity = ( uint32_t ) ( pArgs -> targetLimit - pArgs -> target ) ;
offsets = pArgs -> offsets ;
sourceIndex = 0 ;
c = 0 ;
if ( cnv -> toUnicodeStatus != 0 ) {
cnv -> toUBytes [ 0 ] = ( uint8_t ) cnv -> toUnicodeStatus ;
cnv -> toULength = 1 ;
cnv -> toUnicodeStatus = 0 ;
}
if ( ( count = cnv -> toULength ) != 0 ) {
uint8_t * p = cnv -> toUBytes ;
do {
p [ count ++ ] = * source ++ ;
++ sourceIndex ;
-- length ;
if ( count == 2 ) {
c = ( ( UChar ) p [ 1 ] << 8 ) | p [ 0 ] ;
if ( U16_IS_SINGLE ( c ) ) {
* target ++ = c ;
if ( offsets != NULL ) {
* offsets ++ = - 1 ;
}
-- targetCapacity ;
count = 0 ;
c = 0 ;
break ;
}
else if ( U16_IS_SURROGATE_LEAD ( c ) ) {
c = 0 ;
}
else {
break ;
}
}
else if ( count == 4 ) {
c = ( ( UChar ) p [ 1 ] << 8 ) | p [ 0 ] ;
trail = ( ( UChar ) p [ 3 ] << 8 ) | p [ 2 ] ;
if ( U16_IS_TRAIL ( trail ) ) {
* target ++ = c ;
if ( targetCapacity >= 2 ) {
* target ++ = trail ;
if ( offsets != NULL ) {
* offsets ++ = - 1 ;
* offsets ++ = - 1 ;
}
targetCapacity -= 2 ;
}
else {
targetCapacity = 0 ;
cnv -> UCharErrorBuffer [ 0 ] = trail ;
cnv -> UCharErrorBufferLength = 1 ;
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
}
count = 0 ;
c = 0 ;
break ;
}
else {
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
if ( ( ( const uint8_t * ) pArgs -> source - source ) >= 2 ) {
source -= 2 ;
}
else {
cnv -> toUnicodeStatus = 0x100 | p [ 2 ] ;
-- source ;
}
cnv -> toULength = 2 ;
pArgs -> source = ( const char * ) source ;
pArgs -> target = target ;
pArgs -> offsets = offsets ;
return ;
}
}
}
while ( length > 0 ) ;
cnv -> toULength = ( int8_t ) count ;
}
count = 2 * targetCapacity ;
if ( count > length ) {
count = length & ~ 1 ;
}
if ( c == 0 && count > 0 ) {
length -= count ;
count >>= 1 ;
targetCapacity -= count ;
if ( offsets == NULL ) {
do {
c = ( ( UChar ) source [ 1 ] << 8 ) | source [ 0 ] ;
source += 2 ;
if ( U16_IS_SINGLE ( c ) ) {
* target ++ = c ;
}
else if ( U16_IS_SURROGATE_LEAD ( c ) && count >= 2 && U16_IS_TRAIL ( trail = ( ( UChar ) source [ 1 ] << 8 ) | source [ 0 ] ) ) {
source += 2 ;
-- count ;
* target ++ = c ;
* target ++ = trail ;
}
else {
break ;
}
}
while ( -- count > 0 ) ;
}
else {
do {
c = ( ( UChar ) source [ 1 ] << 8 ) | source [ 0 ] ;
source += 2 ;
if ( U16_IS_SINGLE ( c ) ) {
* target ++ = c ;
* offsets ++ = sourceIndex ;
sourceIndex += 2 ;
}
else if ( U16_IS_SURROGATE_LEAD ( c ) && count >= 2 && U16_IS_TRAIL ( trail = ( ( UChar ) source [ 1 ] << 8 ) | source [ 0 ] ) ) {
source += 2 ;
-- count ;
* target ++ = c ;
* target ++ = trail ;
* offsets ++ = sourceIndex ;
* offsets ++ = sourceIndex ;
sourceIndex += 4 ;
}
else {
break ;
}
}
while ( -- count > 0 ) ;
}
if ( count == 0 ) {
c = 0 ;
}
else {
length += 2 * ( count - 1 ) ;
targetCapacity += count ;
}
}
if ( c != 0 ) {
cnv -> toUBytes [ 0 ] = ( uint8_t ) c ;
cnv -> toUBytes [ 1 ] = ( uint8_t ) ( c >> 8 ) ;
cnv -> toULength = 2 ;
if ( U16_IS_SURROGATE_LEAD ( c ) ) {
if ( length >= 2 ) {
if ( U16_IS_TRAIL ( trail = ( ( UChar ) source [ 1 ] << 8 ) | source [ 0 ] ) ) {
source += 2 ;
length -= 2 ;
* target ++ = c ;
if ( offsets != NULL ) {
* offsets ++ = sourceIndex ;
}
cnv -> UCharErrorBuffer [ 0 ] = trail ;
cnv -> UCharErrorBufferLength = 1 ;
cnv -> toULength = 0 ;
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
}
else {
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
}
}
else {
}
}
else {
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
}
}
if ( U_SUCCESS ( * pErrorCode ) ) {
if ( length > 0 ) {
if ( targetCapacity == 0 ) {
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
}
else {
cnv -> toUBytes [ cnv -> toULength ++ ] = * source ++ ;
}
}
}
pArgs -> source = ( const char * ) source ;
pArgs -> target = target ;
pArgs -> offsets = offsets ;
} |
-1,594,970,847,928,262,700 | debian | 45 | 0 | static void decode_slice_plane ( ProresContext * ctx , ProresThreadData * td , const uint8_t * buf , int data_size , uint16_t * out_ptr , int linesize , int mbs_per_slice , int blocks_per_mb , int plane_size_factor , const int16_t * qmat , int is_chroma ) {
GetBitContext gb ;
int16_t * block_ptr ;
int mb_num , blocks_per_slice ;
blocks_per_slice = mbs_per_slice * blocks_per_mb ;
memset ( td -> blocks , 0 , 8 * 4 * 64 * sizeof ( * td -> blocks ) ) ;
init_get_bits ( & gb , buf , data_size << 3 ) ;
decode_dc_coeffs ( & gb , td -> blocks , blocks_per_slice ) ;
decode_ac_coeffs ( & gb , td -> blocks , blocks_per_slice , plane_size_factor , ctx -> scantable . permutated ) ;
block_ptr = td -> blocks ;
if ( ! is_chroma ) {
for ( mb_num = 0 ;
mb_num < mbs_per_slice ;
mb_num ++ , out_ptr += blocks_per_mb * 4 ) {
ctx -> dsp . idct_put ( out_ptr , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
if ( blocks_per_mb > 2 ) {
ctx -> dsp . idct_put ( out_ptr + 8 , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
}
ctx -> dsp . idct_put ( out_ptr + linesize * 4 , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
if ( blocks_per_mb > 2 ) {
ctx -> dsp . idct_put ( out_ptr + linesize * 4 + 8 , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
}
}
}
else {
for ( mb_num = 0 ;
mb_num < mbs_per_slice ;
mb_num ++ , out_ptr += blocks_per_mb * 4 ) {
ctx -> dsp . idct_put ( out_ptr , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
ctx -> dsp . idct_put ( out_ptr + linesize * 4 , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
if ( blocks_per_mb > 2 ) {
ctx -> dsp . idct_put ( out_ptr + 8 , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
ctx -> dsp . idct_put ( out_ptr + linesize * 4 + 8 , linesize , block_ptr , qmat ) ;
block_ptr += 64 ;
}
}
}
} |
1,312,888,211,311,687,000 | debian | 8 | 0 | static lbmpdm_definition_t * lbmpdm_definition_find ( guint64 channel , guint32 ID , guint8 version_major , guint8 version_minor ) {
lbmpdm_definition_t * entry = NULL ;
guint32 keyval [ LBMPDM_DEFINITION_KEY_ELEMENT_COUNT ] ;
wmem_tree_key_t tkey [ 2 ] ;
lbmpdm_definition_build_key ( keyval , tkey , channel , ID , version_major , version_minor ) ;
entry = ( lbmpdm_definition_t * ) wmem_tree_lookup32_array ( lbmpdm_definition_table , tkey ) ;
return ( entry ) ;
} |
7,092,216,800,726,730,000 | debian | 4 | 0 | static int dissect_h245_INTEGER_96_127 ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
offset = dissect_per_constrained_integer ( tvb , offset , actx , tree , hf_index , 96U , 127U , NULL , FALSE ) ;
return offset ;
} |
8,484,475,213,808,847,000 | debian | 10 | 0 | static int set_property ( const char * name , const char * value , void * opaque ) {
DeviceState * dev = opaque ;
if ( strcmp ( name , "driver" ) == 0 ) return 0 ;
if ( strcmp ( name , "bus" ) == 0 ) return 0 ;
if ( qdev_prop_parse ( dev , name , value ) == - 1 ) {
qemu_error ( "can't set property \"%s\" to \"%s\" for \"%s\"\n" , name , value , dev -> info -> name ) ;
return - 1 ;
}
return 0 ;
} |
-2,915,908,172,644,761,000 | debian | 66 | 0 | static int decode_packet ( AVCodecContext * avctx , void * data , int * got_frame_ptr , AVPacket * avpkt ) {
WmallDecodeCtx * s = avctx -> priv_data ;
GetBitContext * gb = & s -> pgb ;
const uint8_t * buf = avpkt -> data ;
int buf_size = avpkt -> size ;
int num_bits_prev_frame , packet_sequence_number , spliced_packet ;
s -> frame . nb_samples = 0 ;
if ( s -> packet_done || s -> packet_loss ) {
s -> packet_done = 0 ;
if ( buf_size < avctx -> block_align ) return 0 ;
s -> next_packet_start = buf_size - avctx -> block_align ;
buf_size = avctx -> block_align ;
s -> buf_bit_size = buf_size << 3 ;
init_get_bits ( gb , buf , s -> buf_bit_size ) ;
packet_sequence_number = get_bits ( gb , 4 ) ;
skip_bits ( gb , 1 ) ;
spliced_packet = get_bits1 ( gb ) ;
if ( spliced_packet ) av_log_missing_feature ( avctx , "Bitstream splicing" , 1 ) ;
num_bits_prev_frame = get_bits ( gb , s -> log2_frame_size ) ;
if ( ! s -> packet_loss && ( ( s -> packet_sequence_number + 1 ) & 0xF ) != packet_sequence_number ) {
s -> packet_loss = 1 ;
av_log ( avctx , AV_LOG_ERROR , "Packet loss detected! seq %x vs %x\n" , s -> packet_sequence_number , packet_sequence_number ) ;
}
s -> packet_sequence_number = packet_sequence_number ;
if ( num_bits_prev_frame > 0 ) {
int remaining_packet_bits = s -> buf_bit_size - get_bits_count ( gb ) ;
if ( num_bits_prev_frame >= remaining_packet_bits ) {
num_bits_prev_frame = remaining_packet_bits ;
s -> packet_done = 1 ;
}
save_bits ( s , gb , num_bits_prev_frame , 1 ) ;
if ( num_bits_prev_frame < remaining_packet_bits && ! s -> packet_loss ) decode_frame ( s ) ;
}
else if ( s -> num_saved_bits - s -> frame_offset ) {
av_dlog ( avctx , "ignoring %x previously saved bits\n" , s -> num_saved_bits - s -> frame_offset ) ;
}
if ( s -> packet_loss ) {
s -> num_saved_bits = 0 ;
s -> packet_loss = 0 ;
init_put_bits ( & s -> pb , s -> frame_data , MAX_FRAMESIZE ) ;
}
}
else {
int frame_size ;
s -> buf_bit_size = ( avpkt -> size - s -> next_packet_start ) << 3 ;
init_get_bits ( gb , avpkt -> data , s -> buf_bit_size ) ;
skip_bits ( gb , s -> packet_offset ) ;
if ( s -> len_prefix && remaining_bits ( s , gb ) > s -> log2_frame_size && ( frame_size = show_bits ( gb , s -> log2_frame_size ) ) && frame_size <= remaining_bits ( s , gb ) ) {
save_bits ( s , gb , frame_size , 0 ) ;
s -> packet_done = ! decode_frame ( s ) ;
}
else if ( ! s -> len_prefix && s -> num_saved_bits > get_bits_count ( & s -> gb ) ) {
s -> packet_done = ! decode_frame ( s ) ;
}
else {
s -> packet_done = 1 ;
}
}
if ( s -> packet_done && ! s -> packet_loss && remaining_bits ( s , gb ) > 0 ) {
save_bits ( s , gb , remaining_bits ( s , gb ) , 0 ) ;
}
* ( AVFrame * ) data = s -> frame ;
* got_frame_ptr = s -> frame . nb_samples > 0 ;
s -> packet_offset = get_bits_count ( gb ) & 7 ;
return ( s -> packet_loss ) ? AVERROR_INVALIDDATA : get_bits_count ( gb ) >> 3 ;
} |
-5,780,611,388,839,126,000 | chrome | 8 | 0 | int xmlThrDefGetWarningsDefaultValue ( int v ) {
int ret ;
xmlMutexLock ( xmlThrDefMutex ) ;
ret = xmlGetWarningsDefaultValueThrDef ;
xmlGetWarningsDefaultValueThrDef = v ;
xmlMutexUnlock ( xmlThrDefMutex ) ;
return ret ;
} |
-5,697,857,125,570,094,000 | chrome | 11 | 0 | static UBool _isAlphaNumericString ( const char * s , int32_t len ) {
int32_t i ;
for ( i = 0 ;
i < len ;
i ++ ) {
if ( ! ISALPHA ( * ( s + i ) ) && ! ISNUMERIC ( * ( s + i ) ) ) {
return FALSE ;
}
}
return TRUE ;
} |
3,668,456,668,028,960,000 | debian | 4 | 0 | static VALUE cState_space ( VALUE self ) {
GET_STATE ( self ) ;
return state -> space ? rb_str_new ( state -> space , state -> space_len ) : rb_str_new2 ( "" ) ;
} |
-3,703,054,730,362,685,400 | debian | 52 | 0 | static int decode_frame ( AVCodecContext * avctx , void * data , int * got_frame , AVPacket * avpkt ) {
int field , ret ;
AVFrame * pic = data ;
const uint8_t * buf = avpkt -> data ;
const uint8_t * buf_end = buf + avpkt -> size ;
if ( avpkt -> size < avctx -> width * 2 * avctx -> height + 4 + 2 * 8 ) {
av_log ( avctx , AV_LOG_ERROR , "Packet is too small.\n" ) ;
return AVERROR_INVALIDDATA ;
}
if ( bytestream_get_le32 ( & buf ) != MKTAG ( 'F' , 'R' , 'W' , '1' ) ) {
av_log ( avctx , AV_LOG_ERROR , "incorrect marker\n" ) ;
return AVERROR_INVALIDDATA ;
}
if ( ( ret = ff_get_buffer ( avctx , pic , 0 ) ) < 0 ) {
av_log ( avctx , AV_LOG_ERROR , "get_buffer() failed\n" ) ;
return ret ;
}
pic -> pict_type = AV_PICTURE_TYPE_I ;
pic -> key_frame = 1 ;
pic -> interlaced_frame = 1 ;
pic -> top_field_first = 1 ;
for ( field = 0 ;
field < 2 ;
field ++ ) {
int i ;
int field_h = ( avctx -> height + ! field ) >> 1 ;
int field_size , min_field_size = avctx -> width * 2 * field_h ;
uint8_t * dst = pic -> data [ 0 ] ;
if ( buf_end - buf < 8 ) return AVERROR_INVALIDDATA ;
buf += 4 ;
field_size = bytestream_get_le32 ( & buf ) ;
if ( field_size < min_field_size ) {
av_log ( avctx , AV_LOG_ERROR , "Field size %i is too small (required %i)\n" , field_size , min_field_size ) ;
return AVERROR_INVALIDDATA ;
}
if ( buf_end - buf < field_size ) {
av_log ( avctx , AV_LOG_ERROR , "Packet is too small, need %i, have %i\n" , field_size , ( int ) ( buf_end - buf ) ) ;
return AVERROR_INVALIDDATA ;
}
if ( field ) dst += pic -> linesize [ 0 ] ;
for ( i = 0 ;
i < field_h ;
i ++ ) {
memcpy ( dst , buf , avctx -> width * 2 ) ;
buf += avctx -> width * 2 ;
dst += pic -> linesize [ 0 ] << 1 ;
}
buf += field_size - min_field_size ;
}
* got_frame = 1 ;
return avpkt -> size ;
} |
-4,271,192,073,087,307,000 | debian | 4 | 0 | static void cavs_flush ( AVCodecContext * avctx ) {
AVSContext * h = avctx -> priv_data ;
h -> got_keyframe = 0 ;
} |
1,366,214,969,540,455,700 | debian | 71 | 0 | static int tls_process_cke_gost ( SSL * s , PACKET * pkt , int * al ) {
# ifndef OPENSSL_NO_GOST EVP_PKEY_CTX * pkey_ctx ;
EVP_PKEY * client_pub_pkey = NULL , * pk = NULL ;
unsigned char premaster_secret [ 32 ] ;
const unsigned char * start ;
size_t outlen = 32 , inlen ;
unsigned long alg_a ;
int Ttag , Tclass ;
long Tlen ;
long sess_key_len ;
const unsigned char * data ;
int ret = 0 ;
alg_a = s -> s3 -> tmp . new_cipher -> algorithm_auth ;
if ( alg_a & SSL_aGOST12 ) {
pk = s -> cert -> pkeys [ SSL_PKEY_GOST12_512 ] . privatekey ;
if ( pk == NULL ) {
pk = s -> cert -> pkeys [ SSL_PKEY_GOST12_256 ] . privatekey ;
}
if ( pk == NULL ) {
pk = s -> cert -> pkeys [ SSL_PKEY_GOST01 ] . privatekey ;
}
}
else if ( alg_a & SSL_aGOST01 ) {
pk = s -> cert -> pkeys [ SSL_PKEY_GOST01 ] . privatekey ;
}
pkey_ctx = EVP_PKEY_CTX_new ( pk , NULL ) ;
if ( pkey_ctx == NULL ) {
* al = SSL_AD_INTERNAL_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , ERR_R_MALLOC_FAILURE ) ;
return 0 ;
}
if ( EVP_PKEY_decrypt_init ( pkey_ctx ) <= 0 ) {
* al = SSL_AD_INTERNAL_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , ERR_R_INTERNAL_ERROR ) ;
return 0 ;
}
client_pub_pkey = X509_get0_pubkey ( s -> session -> peer ) ;
if ( client_pub_pkey ) {
if ( EVP_PKEY_derive_set_peer ( pkey_ctx , client_pub_pkey ) <= 0 ) ERR_clear_error ( ) ;
}
sess_key_len = PACKET_remaining ( pkt ) ;
if ( ! PACKET_get_bytes ( pkt , & data , sess_key_len ) ) {
* al = SSL_AD_INTERNAL_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , ERR_R_INTERNAL_ERROR ) ;
goto err ;
}
if ( ASN1_get_object ( ( const unsigned char * * ) & data , & Tlen , & Ttag , & Tclass , sess_key_len ) != V_ASN1_CONSTRUCTED || Ttag != V_ASN1_SEQUENCE || Tclass != V_ASN1_UNIVERSAL ) {
* al = SSL_AD_DECODE_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , SSL_R_DECRYPTION_FAILED ) ;
goto err ;
}
start = data ;
inlen = Tlen ;
if ( EVP_PKEY_decrypt ( pkey_ctx , premaster_secret , & outlen , start , inlen ) <= 0 ) {
* al = SSL_AD_DECODE_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , SSL_R_DECRYPTION_FAILED ) ;
goto err ;
}
if ( ! ssl_generate_master_secret ( s , premaster_secret , sizeof ( premaster_secret ) , 0 ) ) {
* al = SSL_AD_INTERNAL_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , ERR_R_INTERNAL_ERROR ) ;
goto err ;
}
if ( EVP_PKEY_CTX_ctrl ( pkey_ctx , - 1 , - 1 , EVP_PKEY_CTRL_PEER_KEY , 2 , NULL ) > 0 ) s -> statem . no_cert_verify = 1 ;
ret = 1 ;
err : EVP_PKEY_CTX_free ( pkey_ctx ) ;
return ret ;
# else * al = SSL_AD_INTERNAL_ERROR ;
SSLerr ( SSL_F_TLS_PROCESS_CKE_GOST , ERR_R_INTERNAL_ERROR ) ;
return 0 ;
# endif } |
-7,855,974,557,509,681,000 | debian | 13 | 0 | char * get_language_name ( Oid langoid , bool missing_ok ) {
HeapTuple tp ;
tp = SearchSysCache1 ( LANGOID , ObjectIdGetDatum ( langoid ) ) ;
if ( HeapTupleIsValid ( tp ) ) {
Form_pg_language lantup = ( Form_pg_language ) GETSTRUCT ( tp ) ;
char * result ;
result = pstrdup ( NameStr ( lantup -> lanname ) ) ;
ReleaseSysCache ( tp ) ;
return result ;
}
if ( ! missing_ok ) elog ( ERROR , "cache lookup failed for language %u" , langoid ) ;
return NULL ;
} |
4,383,303,759,030,234,600 | debian | 56 | 1 | static krb5_error_code build_principal_va ( krb5_context context , krb5_principal princ , unsigned int rlen , const char * realm , va_list ap ) {
krb5_error_code retval = 0 ;
char * r = NULL ;
krb5_data * data = NULL ;
krb5_int32 count = 0 ;
krb5_int32 size = 2 ;
char * component = NULL ;
data = malloc ( size * sizeof ( krb5_data ) ) ;
if ( ! data ) {
retval = ENOMEM ;
}
if ( ! retval ) {
r = strdup ( realm ) ;
if ( ! r ) {
retval = ENOMEM ;
}
}
while ( ! retval && ( component = va_arg ( ap , char * ) ) ) {
if ( count == size ) {
krb5_data * new_data = NULL ;
size *= 2 ;
new_data = realloc ( data , size * sizeof ( krb5_data ) ) ;
if ( new_data ) {
data = new_data ;
}
else {
retval = ENOMEM ;
}
}
if ( ! retval ) {
data [ count ] . length = strlen ( component ) ;
data [ count ] . data = strdup ( component ) ;
if ( ! data [ count ] . data ) {
retval = ENOMEM ;
}
count ++ ;
}
}
if ( ! retval ) {
princ -> type = KRB5_NT_UNKNOWN ;
princ -> magic = KV5M_PRINCIPAL ;
princ -> realm = make_data ( r , rlen ) ;
princ -> data = data ;
princ -> length = count ;
r = NULL ;
data = NULL ;
}
if ( data ) {
while ( -- count >= 0 ) {
free ( data [ count ] . data ) ;
}
free ( data ) ;
}
free ( r ) ;
return retval ;
} |
-5,268,859,819,325,808,000 | debian | 12 | 0 | static void nautilus_directory_invalidate_file_attributes ( NautilusDirectory * directory , NautilusFileAttributes file_attributes ) {
GList * node ;
cancel_loading_attributes ( directory , file_attributes ) ;
for ( node = directory -> details -> file_list ;
node != NULL ;
node = node -> next ) {
nautilus_file_invalidate_attributes_internal ( NAUTILUS_FILE ( node -> data ) , file_attributes ) ;
}
if ( directory -> details -> as_file != NULL ) {
nautilus_file_invalidate_attributes_internal ( directory -> details -> as_file , file_attributes ) ;
}
} |
-7,775,977,291,865,553,000 | debian | 12 | 0 | int qemuAssignDeviceRNGAlias ( virDomainDefPtr def , virDomainRNGDefPtr rng ) {
size_t i ;
int maxidx = 0 ;
int idx ;
for ( i = 0 ;
i < def -> nrngs ;
i ++ ) {
if ( ( idx = qemuDomainDeviceAliasIndex ( & def -> rngs [ i ] -> info , "rng" ) ) >= maxidx ) maxidx = idx + 1 ;
}
if ( virAsprintf ( & rng -> info . alias , "rng%d" , maxidx ) < 0 ) return - 1 ;
return 0 ;
} |
-3,725,939,782,329,394,000 | debian | 5 | 0 | static void _tiffUnmapProc ( thandle_t fd , void * base , toff_t size ) {
( void ) fd ;
( void ) size ;
UnmapViewOfFile ( base ) ;
} |
8,320,716,512,483,418,000 | chrome | 35 | 1 | void vp9_iht4x4_16_add_c ( const int16_t * input , uint8_t * dest , int stride , int tx_type ) {
const transform_2d IHT_4 [ ] = {
{
idct4 , idct4 }
, {
iadst4 , idct4 }
, {
idct4 , iadst4 }
, {
iadst4 , iadst4 }
}
;
int i , j ;
int16_t out [ 4 * 4 ] ;
int16_t * outptr = out ;
int16_t temp_in [ 4 ] , temp_out [ 4 ] ;
for ( i = 0 ;
i < 4 ;
++ i ) {
IHT_4 [ tx_type ] . rows ( input , outptr ) ;
input += 4 ;
outptr += 4 ;
}
for ( i = 0 ;
i < 4 ;
++ i ) {
for ( j = 0 ;
j < 4 ;
++ j ) temp_in [ j ] = out [ j * 4 + i ] ;
IHT_4 [ tx_type ] . cols ( temp_in , temp_out ) ;
for ( j = 0 ;
j < 4 ;
++ j ) dest [ j * stride + i ] = clip_pixel ( ROUND_POWER_OF_TWO ( temp_out [ j ] , 4 ) + dest [ j * stride + i ] ) ;
}
} |
-5,385,892,304,146,931,000 | debian | 28 | 0 | static int put_payload_parsing_info ( AVFormatContext * s , unsigned sendtime , unsigned duration , int nb_payloads , int padsize ) {
ASFContext * asf = s -> priv_data ;
AVIOContext * pb = s -> pb ;
int ppi_size , i ;
int64_t start = avio_tell ( pb ) ;
int iLengthTypeFlags = ASF_PPI_LENGTH_TYPE_FLAGS ;
padsize -= PACKET_HEADER_MIN_SIZE ;
if ( asf -> multi_payloads_present ) padsize -- ;
av_assert0 ( padsize >= 0 ) ;
avio_w8 ( pb , ASF_PACKET_ERROR_CORRECTION_FLAGS ) ;
for ( i = 0 ;
i < ASF_PACKET_ERROR_CORRECTION_DATA_SIZE ;
i ++ ) avio_w8 ( pb , 0x0 ) ;
if ( asf -> multi_payloads_present ) iLengthTypeFlags |= ASF_PPI_FLAG_MULTIPLE_PAYLOADS_PRESENT ;
if ( padsize > 0 ) {
if ( padsize < 256 ) iLengthTypeFlags |= ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_BYTE ;
else iLengthTypeFlags |= ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_WORD ;
}
avio_w8 ( pb , iLengthTypeFlags ) ;
avio_w8 ( pb , ASF_PPI_PROPERTY_FLAGS ) ;
if ( iLengthTypeFlags & ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_WORD ) avio_wl16 ( pb , padsize - 2 ) ;
if ( iLengthTypeFlags & ASF_PPI_FLAG_PADDING_LENGTH_FIELD_IS_BYTE ) avio_w8 ( pb , padsize - 1 ) ;
avio_wl32 ( pb , sendtime ) ;
avio_wl16 ( pb , duration ) ;
if ( asf -> multi_payloads_present ) avio_w8 ( pb , nb_payloads | ASF_PAYLOAD_FLAGS ) ;
ppi_size = avio_tell ( pb ) - start ;
return ppi_size ;
} |
-2,504,372,172,279,755,000 | debian | 52 | 0 | static int decode ( MimicContext * ctx , int quality , int num_coeffs , int is_iframe ) {
int ret , y , x , plane , cur_row = 0 ;
for ( plane = 0 ;
plane < 3 ;
plane ++ ) {
const int is_chroma = ! ! plane ;
const int qscale = av_clip ( 10000 - quality , is_chroma ? 1000 : 2000 , 10000 ) << 2 ;
const int stride = ctx -> flipped_ptrs [ ctx -> cur_index ] . linesize [ plane ] ;
const uint8_t * src = ctx -> flipped_ptrs [ ctx -> prev_index ] . data [ plane ] ;
uint8_t * dst = ctx -> flipped_ptrs [ ctx -> cur_index ] . data [ plane ] ;
for ( y = 0 ;
y < ctx -> num_vblocks [ plane ] ;
y ++ ) {
for ( x = 0 ;
x < ctx -> num_hblocks [ plane ] ;
x ++ ) {
if ( is_iframe || get_bits1 ( & ctx -> gb ) == is_chroma ) {
if ( is_chroma || is_iframe || ! get_bits1 ( & ctx -> gb ) ) {
if ( ( ret = vlc_decode_block ( ctx , num_coeffs , qscale ) ) < 0 ) {
av_log ( ctx -> avctx , AV_LOG_ERROR , "Error decoding " "block.\n" ) ;
return ret ;
}
ctx -> dsp . idct_put ( dst , stride , ctx -> dct_block ) ;
}
else {
unsigned int backref = get_bits ( & ctx -> gb , 4 ) ;
int index = ( ctx -> cur_index + backref ) & 15 ;
uint8_t * p = ctx -> flipped_ptrs [ index ] . data [ 0 ] ;
if ( index != ctx -> cur_index && p ) {
ff_thread_await_progress ( & ctx -> frames [ index ] , cur_row , 0 ) ;
p += src - ctx -> flipped_ptrs [ ctx -> prev_index ] . data [ plane ] ;
ctx -> dsp . put_pixels_tab [ 1 ] [ 0 ] ( dst , p , stride , 8 ) ;
}
else {
av_log ( ctx -> avctx , AV_LOG_ERROR , "No such backreference! Buggy sample.\n" ) ;
}
}
}
else {
ff_thread_await_progress ( & ctx -> frames [ ctx -> prev_index ] , cur_row , 0 ) ;
ctx -> dsp . put_pixels_tab [ 1 ] [ 0 ] ( dst , src , stride , 8 ) ;
}
src += 8 ;
dst += 8 ;
}
src += ( stride - ctx -> num_hblocks [ plane ] ) << 3 ;
dst += ( stride - ctx -> num_hblocks [ plane ] ) << 3 ;
ff_thread_report_progress ( & ctx -> frames [ ctx -> cur_index ] , cur_row ++ , 0 ) ;
}
}
return 0 ;
} |
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 ) FileInfoFunction ( getATime , FS_ATIME ) FileInfoFunction ( getMTime , FS_MTIME ) FileInfoFunction ( getCTime , FS_CTIME ) FileInfoFunction ( getType , FS_TYPE ) FileInfoFunction ( isWritable , FS_IS_W ) FileInfoFunction ( isReadable , FS_IS_R ) FileInfoFunction ( isExecutable , FS_IS_X ) FileInfoFunction ( isFile , FS_IS_FILE ) FileInfoFunction ( isDir , FS_IS_DIR ) FileInfoFunction ( isLink , FS_IS_LINK ) |
229,962,612,204,197,000 | debian | 39 | 0 | static void start_fetch_packed ( struct transfer_request * request ) {
struct packed_git * target ;
struct transfer_request * check_request = request_queue_head ;
struct http_pack_request * preq ;
target = find_sha1_pack ( request -> obj -> oid . hash , repo -> packs ) ;
if ( ! target ) {
fprintf ( stderr , "Unable to fetch %s, will not be able to update server info refs\n" , oid_to_hex ( & request -> obj -> oid ) ) ;
repo -> can_update_info_refs = 0 ;
release_request ( request ) ;
return ;
}
fprintf ( stderr , "Fetching pack %s\n" , sha1_to_hex ( target -> sha1 ) ) ;
fprintf ( stderr , " which contains %s\n" , oid_to_hex ( & request -> obj -> oid ) ) ;
preq = new_http_pack_request ( target , repo -> url ) ;
if ( preq == NULL ) {
repo -> can_update_info_refs = 0 ;
return ;
}
preq -> lst = & repo -> packs ;
while ( check_request ) {
if ( check_request -> state == RUN_FETCH_PACKED && ! strcmp ( check_request -> url , preq -> url ) ) {
release_http_pack_request ( preq ) ;
release_request ( request ) ;
return ;
}
check_request = check_request -> next ;
}
preq -> slot -> callback_func = process_response ;
preq -> slot -> callback_data = request ;
request -> slot = preq -> slot ;
request -> userData = preq ;
request -> state = RUN_FETCH_PACKED ;
if ( ! start_active_slot ( preq -> slot ) ) {
fprintf ( stderr , "Unable to start GET request\n" ) ;
release_http_pack_request ( preq ) ;
repo -> can_update_info_refs = 0 ;
release_request ( request ) ;
}
} |
-1,283,648,210,945,038,800 | chrome | 35 | 1 | void vp9_fht4x4_c ( const int16_t * input , int16_t * output , int stride , int tx_type ) {
if ( tx_type == DCT_DCT ) {
vp9_fdct4x4_c ( input , output , stride ) ;
}
else {
int16_t out [ 4 * 4 ] ;
int16_t * outptr = & out [ 0 ] ;
int i , j ;
int16_t temp_in [ 4 ] , temp_out [ 4 ] ;
const transform_2d ht = FHT_4 [ tx_type ] ;
for ( i = 0 ;
i < 4 ;
++ i ) {
for ( j = 0 ;
j < 4 ;
++ j ) temp_in [ j ] = input [ j * stride + i ] * 16 ;
if ( i == 0 && temp_in [ 0 ] ) temp_in [ 0 ] += 1 ;
ht . cols ( temp_in , temp_out ) ;
for ( j = 0 ;
j < 4 ;
++ j ) outptr [ j * 4 + i ] = temp_out [ j ] ;
}
for ( i = 0 ;
i < 4 ;
++ i ) {
for ( j = 0 ;
j < 4 ;
++ j ) temp_in [ j ] = out [ j + i * 4 ] ;
ht . rows ( temp_in , temp_out ) ;
for ( j = 0 ;
j < 4 ;
++ j ) output [ j + i * 4 ] = ( temp_out [ j ] + 1 ) >> 2 ;
}
}
} |
-7,855,974,557,509,681,000 | debian | 12 | 0 | char * get_constraint_name ( Oid conoid ) {
HeapTuple tp ;
tp = SearchSysCache1 ( CONSTROID , ObjectIdGetDatum ( conoid ) ) ;
if ( HeapTupleIsValid ( tp ) ) {
Form_pg_constraint contup = ( Form_pg_constraint ) GETSTRUCT ( tp ) ;
char * result ;
result = pstrdup ( NameStr ( contup -> conname ) ) ;
ReleaseSysCache ( tp ) ;
return result ;
}
else return NULL ;
} |
5,506,079,590,431,503,000 | debian | 1,139 | 0 | void proto_register_dns ( void ) {
static hf_register_info hf [ ] = {
{
& hf_dns_length , {
"Length" , "dns.length" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Length of DNS-over-TCP request or response" , HFILL }
}
, {
& hf_dns_flags , {
"Flags" , "dns.flags" , FT_UINT16 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_flags_response , {
"Response" , "dns.flags.response" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_response ) , F_RESPONSE , "Is the message a response?" , HFILL }
}
, {
& hf_dns_flags_opcode , {
"Opcode" , "dns.flags.opcode" , FT_UINT16 , BASE_DEC , VALS ( opcode_vals ) , F_OPCODE , "Operation code" , HFILL }
}
, {
& hf_dns_flags_authoritative , {
"Authoritative" , "dns.flags.authoritative" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_authoritative ) , F_AUTHORITATIVE , "Is the server is an authority for the domain?" , HFILL }
}
, {
& hf_dns_flags_conflict_query , {
"Conflict" , "dns.flags.conflict" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_conflict_query ) , F_CONFLICT , "Did we receive multiple responses to a query?" , HFILL }
}
, {
& hf_dns_flags_conflict_response , {
"Conflict" , "dns.flags.conflict" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_conflict_response ) , F_CONFLICT , "Is the name considered unique?" , HFILL }
}
, {
& hf_dns_flags_truncated , {
"Truncated" , "dns.flags.truncated" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_truncated ) , F_TRUNCATED , "Is the message truncated?" , HFILL }
}
, {
& hf_dns_flags_recdesired , {
"Recursion desired" , "dns.flags.recdesired" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_recdesired ) , F_RECDESIRED , "Do query recursively?" , HFILL }
}
, {
& hf_dns_flags_tentative , {
"Tentative" , "dns.flags.tentative" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_tentative ) , F_TENTATIVE , "Is the responder authoritative for the name, but not yet verified the uniqueness?" , HFILL }
}
, {
& hf_dns_flags_recavail , {
"Recursion available" , "dns.flags.recavail" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_recavail ) , F_RECAVAIL , "Can the server do recursive queries?" , HFILL }
}
, {
& hf_dns_flags_z , {
"Z" , "dns.flags.z" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_z ) , F_Z , "Z flag" , HFILL }
}
, {
& hf_dns_flags_authenticated , {
"Answer authenticated" , "dns.flags.authenticated" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_authenticated ) , F_AUTHENTIC , "Was the reply data authenticated by the server?" , HFILL }
}
, {
& hf_dns_flags_ad , {
"AD bit" , "dns.flags.authenticated" , FT_BOOLEAN , 16 , TFS ( & tfs_set_notset ) , F_AUTHENTIC , NULL , HFILL }
}
, {
& hf_dns_flags_checkdisable , {
"Non-authenticated data" , "dns.flags.checkdisable" , FT_BOOLEAN , 16 , TFS ( & tfs_flags_checkdisable ) , F_CHECKDISABLE , "Is non-authenticated data acceptable?" , HFILL }
}
, {
& hf_dns_flags_rcode , {
"Reply code" , "dns.flags.rcode" , FT_UINT16 , BASE_DEC , VALS ( rcode_vals ) , F_RCODE , NULL , HFILL }
}
, {
& hf_dns_transaction_id , {
"Transaction ID" , "dns.id" , FT_UINT16 , BASE_HEX , NULL , 0x0 , "Identification of transaction" , HFILL }
}
, {
& hf_dns_qry_type , {
"Type" , "dns.qry.type" , FT_UINT16 , BASE_DEC | BASE_EXT_STRING , & dns_types_description_vals_ext , 0 , "Query Type" , HFILL }
}
, {
& hf_dns_qry_class , {
"Class" , "dns.qry.class" , FT_UINT16 , BASE_HEX , VALS ( dns_classes ) , 0x0 , "Query Class" , HFILL }
}
, {
& hf_dns_qry_class_mdns , {
"Class" , "dns.qry.class" , FT_UINT16 , BASE_HEX , VALS ( dns_classes ) , 0x7FFF , "Query Class" , HFILL }
}
, {
& hf_dns_qry_qu , {
"\"QU\" question" , "dns.qry.qu" , FT_BOOLEAN , 16 , NULL , C_QU , "QU flag" , HFILL }
}
, {
& hf_dns_qry_name , {
"Name" , "dns.qry.name" , FT_STRING , BASE_NONE , NULL , 0x0 , "Query Name" , HFILL }
}
, {
& hf_dns_qry_name_len , {
"Name Length" , "dns.qry.name.len" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Query Name Len" , HFILL }
}
, {
& hf_dns_count_labels , {
"Label Count" , "dns.count.labels" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Query Label Count" , HFILL }
}
, {
& hf_dns_rr_type , {
"Type" , "dns.resp.type" , FT_UINT16 , BASE_DEC | BASE_EXT_STRING , & dns_types_description_vals_ext , 0x0 , "Response Type" , HFILL }
}
, {
& hf_dns_rr_class , {
"Class" , "dns.resp.class" , FT_UINT16 , BASE_HEX , VALS ( dns_classes ) , 0x0 , "Response Class" , HFILL }
}
, {
& hf_dns_rr_class_mdns , {
"Class" , "dns.resp.class" , FT_UINT16 , BASE_HEX , VALS ( dns_classes ) , 0x7FFF , "Response Class" , HFILL }
}
, {
& hf_dns_rr_cache_flush , {
"Cache flush" , "dns.resp.cache_flush" , FT_BOOLEAN , 16 , NULL , C_FLUSH , "Cache flush flag" , HFILL }
}
, {
& hf_dns_rr_ext_rcode , {
"Higher bits in extended RCODE" , "dns.resp.ext_rcode" , FT_UINT8 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_rr_edns0_version , {
"EDNS0 version" , "dns.resp.edns0_version" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_rr_z , {
"Z" , "dns.resp.z" , FT_UINT16 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_rr_z_do , {
"DO bit" , "dns.resp.z.do" , FT_BOOLEAN , 16 , TFS ( & tfs_dns_rr_z_do ) , 0x8000 , "DNSSEC OK" , HFILL }
}
, {
& hf_dns_rr_z_reserved , {
"Reserved" , "dns.resp.z.reserved" , FT_UINT16 , BASE_HEX , NULL , 0x7FFF , NULL , HFILL }
}
, {
& hf_dns_srv_service , {
"Service" , "dns.srv.service" , FT_STRING , BASE_NONE , NULL , 0x0 , "Desired service" , HFILL }
}
, {
& hf_dns_srv_proto , {
"Protocol" , "dns.srv.proto" , FT_STRING , BASE_NONE , NULL , 0x0 , "Desired protocol" , HFILL }
}
, {
& hf_dns_srv_name , {
"Name" , "dns.srv.name" , FT_STRING , BASE_NONE , NULL , 0x0 , "Domain this resource record refers to" , HFILL }
}
, {
& hf_dns_srv_priority , {
"Priority" , "dns.srv.priority" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_srv_weight , {
"Weight" , "dns.srv.weight" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_srv_port , {
"Port" , "dns.srv.port" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_srv_target , {
"Target" , "dns.srv.target" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_order , {
"Order" , "dns.naptr.order" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_preference , {
"Preference" , "dns.naptr.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_flags_length , {
"Flags Length" , "dns.naptr.flags_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_flags , {
"Flags" , "dns.naptr.flags" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_service_length , {
"Service Length" , "dns.naptr.service_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_service , {
"Service" , "dns.naptr.service" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_regex_length , {
"Regex Length" , "dns.naptr.regex_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_regex , {
"Regex" , "dns.naptr.regex" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_replacement_length , {
"Replacement Length" , "dns.naptr.replacement_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_naptr_replacement , {
"Replacement" , "dns.naptr.replacement" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_rr_name , {
"Name" , "dns.resp.name" , FT_STRING , BASE_NONE , NULL , 0x0 , "Response Name" , HFILL }
}
, {
& hf_dns_rr_ttl , {
"Time to live" , "dns.resp.ttl" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "Response TTL" , HFILL }
}
, {
& hf_dns_rr_len , {
"Data length" , "dns.resp.len" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "Response Length" , HFILL }
}
, {
& hf_dns_a , {
"Address" , "dns.a" , FT_IPv4 , BASE_NONE , NULL , 0x0 , "Response Address" , HFILL }
}
, {
& hf_dns_md , {
"Mail Destination" , "dns.md" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_mf , {
"Mail Forwarder" , "dns.mf" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_mb , {
"MailBox Domaine" , "dns.mb" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_mg , {
"Mail Group member" , "dns.mg" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_mr , {
"Mail Rename domaine" , "dns.mr" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_null , {
"Null (data)" , "dns.null" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_aaaa , {
"AAAA Address" , "dns.aaaa" , FT_IPv6 , BASE_NONE , NULL , 0x0 , "AAAA Response Address" , HFILL }
}
, {
& hf_dns_cname , {
"CNAME" , "dns.cname" , FT_STRING , BASE_NONE , NULL , 0x0 , "Response Primary Name" , HFILL }
}
, {
& hf_dns_rr_udp_payload_size_mdns , {
"UDP payload size" , "dns.rr.udp_payload_size" , FT_UINT16 , BASE_HEX , NULL , 0x7FFF , NULL , HFILL }
}
, {
& hf_dns_rr_udp_payload_size , {
"UDP payload size" , "dns.rr.udp_payload_size" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_mname , {
"Primary name server" , "dns.soa.mname" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_rname , {
"Responsible authority's mailbox" , "dns.soa.rname" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_serial_number , {
"Serial Number" , "dns.soa.serial_number" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_refresh_interval , {
"Refresh Interval" , "dns.soa.refresh_interval" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_retry_interval , {
"Retry Interval" , "dns.soa.retry_interval" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_expire_limit , {
"Expire limit" , "dns.soa.expire_limit" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_soa_minimum_ttl , {
"Minimum TTL" , "dns.soa.mininum_ttl" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ptr_domain_name , {
"Domain Name" , "dns.ptr.domain_name" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_wks_address , {
"Address" , "dns.wks.address" , FT_IPv4 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_wks_protocol , {
"Protocol" , "dns.wks.protocol" , FT_UINT8 , BASE_DEC | BASE_EXT_STRING , & ipproto_val_ext , 0x0 , NULL , HFILL }
}
, {
& hf_dns_wks_bits , {
"Bits" , "dns.wks.bits" , FT_UINT8 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_hinfo_cpu_length , {
"CPU Length" , "dns.hinfo.cpu_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_hinfo_cpu , {
"CPU" , "dns.hinfo.cpu" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_hinfo_os_length , {
"OS Length" , "dns.hinfo.os_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_hinfo_os , {
"OS" , "dns.hinfo.os" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_minfo_r_mailbox , {
"Responsible Mailbox" , "dns.minfo.r" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_minfo_e_mailbox , {
"Error Mailbox" , "dns.minfo.e" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_mx_preference , {
"Preference" , "dns.mx.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_mx_mail_exchange , {
"Mail Exchange" , "dns.mx.mail_exchange" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_txt_length , {
"TXT Length" , "dns.txt.length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_txt , {
"TXT" , "dns.txt" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_openpgpkey , {
"OpenPGP Key" , "dns.openpgpkey" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_spf_length , {
"SPF Length" , "dns.spf.length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_spf , {
"SPF" , "dns.spf" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_nodeid_preference , {
"Preference" , "dns.ilnp.nid.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_nodeid , {
"NodeID" , "dns.ilnp.nid" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_locator32_preference , {
"Preference" , "dns.ilnp.l32.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_locator32 , {
"Locator32" , "dns.ilnp.l32" , FT_IPv4 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_locator64_preference , {
"Preference" , "dns.ilnp.l64.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_locator64 , {
"Locator64" , "dns.ilnp.l64" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_locatorfqdn_preference , {
"Preference" , "dns.ilnp.lp.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ilnp_locatorfqdn , {
"Locator FQDN" , "dns.ilnp.lp" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_eui48 , {
"EUI48 Address" , "dns.eui48" , FT_ETHER , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_eui64 , {
"EUI64 Address" , "dns.eui64" , FT_EUI64 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_rrsig_type_covered , {
"Type Covered" , "dns.rrsig.type_covered" , FT_UINT16 , BASE_DEC | BASE_EXT_STRING , & dns_types_description_vals_ext , 0x0 , "Identifies the type of the RRset that is covered by this RRSIG record" , HFILL }
}
, {
& hf_dns_rrsig_algorithm , {
"Algorithm" , "dns.rrsig.algorithm" , FT_UINT8 , BASE_DEC , VALS ( dnssec_algo_vals ) , 0x0 , "Identifies the cryptographic algorithm used to create the signature" , HFILL }
}
, {
& hf_dns_rrsig_labels , {
"Labels" , "dns.rrsig.labels" , FT_UINT8 , BASE_DEC , NULL , 0x0 , "Specifies the number of labels in the original RRSIG RR owner name" , HFILL }
}
, {
& hf_dns_rrsig_original_ttl , {
"Original TTL" , "dns.rrsig.original_ttl" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "Specifies the TTL of the covered RRset as it appears in the authoritative zone" , HFILL }
}
, {
& hf_dns_rrsig_signature_expiration , {
"Signature Expiration" , "dns.rrsig.signature_expiration" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_LOCAL , NULL , 0x0 , "Specify a validity period for the signature" , HFILL }
}
, {
& hf_dns_rrsig_signature_inception , {
"Signature Inception" , "dns.rrsig.signature_inception" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_LOCAL , NULL , 0x0 , "Specify a validity period for the signature" , HFILL }
}
, {
& hf_dns_rrsig_key_tag , {
"Key Tag" , "dns.rrsig.key_tag" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Contains the key tag value of the DNSKEY RR that validates this signature" , HFILL }
}
, {
& hf_dns_rrsig_signers_name , {
"Signer's name" , "dns.rrsig.signers_name" , FT_STRING , BASE_NONE , NULL , 0x0 , "Identifies the owner name of the DNSKEY RR that a validator is supposed to use to validate this signature" , HFILL }
}
, {
& hf_dns_rrsig_signature , {
"Signature" , "dns.rrsig.signature" , FT_BYTES , BASE_NONE , NULL , 0x0 , "Contains the cryptographic signature that covers the RRSIG RDATA" , HFILL }
}
, {
& hf_dns_dnskey_flags , {
"Flags" , "dns.dnskey.flags" , FT_UINT16 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_dnskey_flags_zone_key , {
"Zone Key" , "dns.dnskey.flags.zone_key" , FT_BOOLEAN , 16 , TFS ( & dns_dnskey_zone_key_tfs ) , DNSKEY_FLAGS_ZK , NULL , HFILL }
}
, {
& hf_dns_dnskey_flags_key_revoked , {
"Key Revoked" , "dns.dnskey.flags.key_revoked" , FT_BOOLEAN , 16 , TFS ( & tfs_yes_no ) , DNSKEY_FLAGS_KR , NULL , HFILL }
}
, {
& hf_dns_dnskey_flags_secure_entry_point , {
"Key Signing Key" , "dns.dnskey.flags.secure_entry_point" , FT_BOOLEAN , 16 , TFS ( & tfs_yes_no ) , DNSKEY_FLAGS_SEP , NULL , HFILL }
}
, {
& hf_dns_dnskey_flags_reserved , {
"Key Signing Key" , "dns.dnskey.flags.reserved" , FT_UINT16 , BASE_HEX , NULL , DNSKEY_FLAGS_RSV , "Must be zero" , HFILL }
}
, {
& hf_dns_dnskey_protocol , {
"Protocol" , "dns.dnskey.protocol" , FT_UINT8 , BASE_DEC , NULL , 0x0 , "Must be 3" , HFILL }
}
, {
& hf_dns_dnskey_algorithm , {
"Algorithm" , "dns.dnskey.algorithm" , FT_UINT8 , BASE_DEC , VALS ( dnssec_algo_vals ) , 0x0 , "Identifies the public key's cryptographic algorithm and determines the format of the Public Key field" , HFILL }
}
, {
& hf_dns_dnskey_key_id , {
"Key id" , "dns.dnskey.key_id" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_dnskey_public_key , {
"Public Key" , "dns.dnskey.public_key" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_key_flags , {
"Flags" , "dns.key.flags" , FT_UINT16 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_key_flags_authentication , {
"Key allowed for authentication" , "dns.key.flags.authentication" , FT_BOOLEAN , 16 , TFS ( & tfs_not_allowed_allowed ) , 0x8000 , NULL , HFILL }
}
, {
& hf_dns_key_flags_confidentiality , {
"Key allowed for confidentiality" , "dns.key.flags.confidentiality" , FT_BOOLEAN , 16 , TFS ( & tfs_not_allowed_allowed ) , 0x4000 , NULL , HFILL }
}
, {
& hf_dns_key_flags_key_required , {
"Key required" , "dns.key.flags.required" , FT_BOOLEAN , 16 , TFS ( & tfs_required_experimental ) , 0x2000 , NULL , HFILL }
}
, {
& hf_dns_key_flags_associated_user , {
"Key is associated with a user" , "dns.key.flags.associated_user" , FT_BOOLEAN , 16 , TFS ( & tfs_yes_no ) , 0x0400 , NULL , HFILL }
}
, {
& hf_dns_key_flags_associated_named_entity , {
"Key is associated with the named entity" , "dns.key.flags.associated_named_entity" , FT_BOOLEAN , 16 , TFS ( & tfs_yes_no ) , 0x0200 , NULL , HFILL }
}
, {
& hf_dns_key_flags_ipsec , {
"Key use with IPSEC" , "dns.key.flags.ipsec" , FT_BOOLEAN , 16 , TFS ( & tfs_valid_invalid ) , 0x0080 , NULL , HFILL }
}
, {
& hf_dns_key_flags_mime , {
"Key use with MIME security multiparts" , "dns.key.flags.mime" , FT_BOOLEAN , 16 , TFS ( & tfs_valid_invalid ) , 0x0040 , NULL , HFILL }
}
, {
& hf_dns_key_flags_signatory , {
"Signatory" , "dns.key.flags.signatory" , FT_UINT16 , BASE_DEC , NULL , 0x000F , NULL , HFILL }
}
, {
& hf_dns_key_protocol , {
"Protocol" , "dns.key.protocol" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_key_algorithm , {
"Algorithm" , "dns.key.algorithm" , FT_UINT8 , BASE_DEC , VALS ( dnssec_algo_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_key_key_id , {
"Key ID" , "dns.key.key_id" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_key_public_key , {
"Public Key" , "dns.key.public_key" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_px_preference , {
"Preference" , "dns.px.preference" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_px_map822 , {
"MAP822" , "dns.px.map822" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_px_mapx400 , {
"MAPX400" , "dns.px.map400" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_algo_name , {
"Algorithm name" , "dns.tkey.algo_name" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_signature_expiration , {
"Signature Expiration" , "dns.tkey.signature_expiration" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_LOCAL , NULL , 0x0 , "Specify a validity period for the signature" , HFILL }
}
, {
& hf_dns_tkey_signature_inception , {
"Signature Inception" , "dns.tkey.signature_inception" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_LOCAL , NULL , 0x0 , "Specify a validity period for the signature" , HFILL }
}
, {
& hf_dns_tkey_mode , {
"Mode" , "dns.tkey.mode" , FT_UINT16 , BASE_DEC , VALS ( tkey_mode_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_error , {
"Error" , "dns.tkey.error" , FT_UINT16 , BASE_DEC , VALS ( rcode_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_key_size , {
"Key Size" , "dns.tkey.key_size" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_key_data , {
"Key Data" , "dns.tkey.key_data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_other_size , {
"Other Size" , "dns.tkey.other_size" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tkey_other_data , {
"Other Data" , "dns.tkey.other_data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_gateway_precedence , {
"Gateway Precedence" , "dns.ipseckey.gateway_precedence" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_gateway_algorithm , {
"Gateway Algorithm" , "dns.ipseckey.gateway_algorithm" , FT_UINT8 , BASE_DEC , VALS ( gw_algo_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_gateway_type , {
"Gateway Type" , "dns.ipseckey.gateway_type" , FT_UINT8 , BASE_DEC , VALS ( gw_type_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_gateway_ipv4 , {
"IPv4 Gateway" , "dns.ipseckey.gateway_ipv4" , FT_IPv4 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_gateway_ipv6 , {
"IPv6 Gateway" , "dns.ipseckey.gateway_ipv6" , FT_IPv6 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_gateway_dns , {
"DNS Gateway" , "dns.ipseckey.gateway_dns" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ipseckey_public_key , {
"Public Key" , "dns.ipseckey.public_key" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_a6_prefix_len , {
"Prefix len" , "dns.a6.prefix_len" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_a6_address_suffix , {
"Address Suffix" , "dns.a6.address_suffix" , FT_IPv6 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_a6_prefix_name , {
"Prefix name" , "dns.a6.prefix_name" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_dname , {
"Dname" , "dns.dname" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_version , {
"Version" , "dns.loc.version" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_size , {
"Size" , "dns.loc.size" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_horizontal_precision , {
"Horizontal Precision" , "dns.loc.horizontal_precision" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_vertical_precision , {
"Vertial Precision" , "dns.loc.vertial_precision" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_latitude , {
"Latitude" , "dns.loc.latitude" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_longitude , {
"Longitude" , "dns.loc.longitude" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_altitude , {
"Altitude" , "dns.loc.altitude" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_loc_unknown_data , {
"Unknown data" , "dns.loc.unknown_data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_nxt_next_domain_name , {
"Next Domain Name" , "dns.nxt.next_domain_name" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_kx_preference , {
"Preference" , "dns.kx.preference" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_kx_key_exchange , {
"Key Exchange" , "dns.kx.key_exchange" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_cert_type , {
"Type" , "dns.cert.type" , FT_UINT16 , BASE_DEC , VALS ( dns_cert_type_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_cert_key_tag , {
"Key Tag" , "dns.cert.key_tag" , FT_UINT16 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_cert_algorithm , {
"Algorithm" , "dns.cert.algorithm" , FT_UINT8 , BASE_DEC , VALS ( dnssec_algo_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_cert_certificate , {
"Certificate (or CRL)" , "dns.cert.certificate" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_nsec_next_domain_name , {
"Next Domain Name" , "dns.nsec.next_domain_name" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_ns , {
"Name Server" , "dns.ns" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt , {
"Option" , "dns.opt" , FT_NONE , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_code , {
"Option Code" , "dns.opt.code" , FT_UINT16 , BASE_DEC , VALS ( edns0_opt_code_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_len , {
"Option Length" , "dns.opt.len" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_data , {
"Option Data" , "dns.opt.data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_dau , {
"DAU" , "dns.opt.dau" , FT_UINT8 , BASE_DEC , VALS ( dnssec_algo_vals ) , 0x0 , "DNSSEC Algorithm Understood" , HFILL }
}
, {
& hf_dns_opt_dhu , {
"DHU" , "dns.opt.dhu" , FT_UINT8 , BASE_DEC , VALS ( dns_ds_digest_vals ) , 0x0 , "DS Hash Understood" , HFILL }
}
, {
& hf_dns_opt_n3u , {
"N3U" , "dns.opt.n3u" , FT_UINT8 , BASE_DEC , VALS ( hash_algorithms ) , 0x0 , "NSEC3 Hash Understood" , HFILL }
}
, {
& hf_dns_opt_client_family , {
"Family" , "dns.opt.client.family" , FT_UINT16 , BASE_DEC , VALS ( afamily_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_client_netmask , {
"Source Netmask" , "dns.opt.client.netmask" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_client_scope , {
"Scope Netmask" , "dns.opt.client.scope" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_client_addr , {
"Client Subnet" , "dns.opt.client.addr" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_client_addr4 , {
"Client Subnet" , "dns.opt.client.addr4" , FT_IPv4 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_opt_client_addr6 , {
"Client Subnet" , "dns.opt.client.addr6" , FT_IPv6 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_count_questions , {
"Questions" , "dns.count.queries" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of queries in packet" , HFILL }
}
, {
& hf_dns_count_zones , {
"Zones" , "dns.count.zones" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of zones in packet" , HFILL }
}
, {
& hf_dns_count_answers , {
"Answer RRs" , "dns.count.answers" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of answers in packet" , HFILL }
}
, {
& hf_dns_count_prerequisites , {
"Prerequisites" , "dns.count.prerequisites" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of prerequisites in packet" , HFILL }
}
, {
& hf_dns_count_auth_rr , {
"Authority RRs" , "dns.count.auth_rr" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of authoritative records in packet" , HFILL }
}
, {
& hf_dns_count_updates , {
"Updates" , "dns.count.updates" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of updates records in packet" , HFILL }
}
, {
& hf_dns_nsec3_algo , {
"Hash algorithm" , "dns.nsec3.algo" , FT_UINT8 , BASE_DEC , VALS ( hash_algorithms ) , 0 , NULL , HFILL }
}
, {
& hf_dns_nsec3_flags , {
"NSEC3 flags" , "dns.nsec3.flags" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_nsec3_flag_optout , {
"NSEC3 Opt-out flag" , "dns.nsec3.flags.opt_out" , FT_BOOLEAN , 8 , TFS ( & tfs_flags_nsec3_optout ) , NSEC3_FLAG_OPTOUT , NULL , HFILL }
}
, {
& hf_dns_nsec3_iterations , {
"NSEC3 iterations" , "dns.nsec3.iterations" , FT_UINT16 , BASE_DEC , NULL , 0 , "Number of hashing iterations" , HFILL }
}
, {
& hf_dns_nsec3_salt_length , {
"Salt length" , "dns.nsec3.salt_length" , FT_UINT8 , BASE_DEC , NULL , 0 , "Length of salt in bytes" , HFILL }
}
, {
& hf_dns_nsec3_salt_value , {
"Salt value" , "dns.nsec3.salt_value" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_nsec3_hash_length , {
"Hash length" , "dns.nsec3.hash_length" , FT_UINT8 , BASE_DEC , NULL , 0 , "Length in bytes of next hashed owner" , HFILL }
}
, {
& hf_dns_nsec3_hash_value , {
"Next hashed owner" , "dns.nsec3.hash_value" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_tlsa_certificate_usage , {
"Certificate Usage" , "dns.tlsa.certificate_usage" , FT_UINT8 , BASE_DEC , VALS ( tlsa_certificate_usage_vals ) , 0 , "Specifies the provided association that will be used to match the certificate presented in the TLS handshake" , HFILL }
}
, {
& hf_dns_tlsa_selector , {
"Selector" , "dns.tlsa.selector" , FT_UINT8 , BASE_DEC , VALS ( tlsa_selector_vals ) , 0 , "Specifies which part of the TLS certificate presented by the server will be matched against the association data" , HFILL }
}
, {
& hf_dns_tlsa_matching_type , {
"Matching Type" , "dns.tlsa.matching_type" , FT_UINT8 , BASE_DEC , VALS ( tlsa_matching_type_vals ) , 0 , "Specifies how the certificate association is presented" , HFILL }
}
, {
& hf_dns_tlsa_certificate_association_data , {
"Certificate Association Data" , "dns.tlsa.certificate_association_data" , FT_BYTES , BASE_NONE , NULL , 0 , "The data refers to the certificate in the association" , HFILL }
}
, {
& hf_dns_tsig_algorithm_name , {
"Algorithm Name" , "dns.tsig.algorithm_name" , FT_STRING , BASE_NONE , NULL , 0x0 , "Name of algorithm used for the MAC" , HFILL }
}
, {
& hf_dns_tsig_time_signed , {
"Time Signed" , "dns.tsig.time_signed" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_LOCAL , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tsig_original_id , {
"Original Id" , "dns.tsig.original_id" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tsig_error , {
"Error" , "dns.tsig.error" , FT_UINT16 , BASE_DEC , VALS ( rcode_vals ) , 0x0 , "Expanded RCODE for TSIG" , HFILL }
}
, {
& hf_dns_tsig_fudge , {
"Fudge" , "dns.tsig.fudge" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of bytes for the MAC" , HFILL }
}
, {
& hf_dns_tsig_mac_size , {
"MAC Size" , "dns.tsig.mac_size" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of bytes for the MAC" , HFILL }
}
, {
& hf_dns_tsig_other_len , {
"Other Len" , "dns.tsig.other_len" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of bytes for Other Data" , HFILL }
}
, {
& hf_dns_tsig_mac , {
"MAC" , "dns.tsig.mac" , FT_NONE , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_tsig_other_data , {
"Other Data" , "dns.tsig.other_data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_response_in , {
"Response In" , "dns.response_in" , FT_FRAMENUM , BASE_NONE , NULL , 0x0 , "The response to this DNS query is in this frame" , HFILL }
}
, {
& hf_dns_response_to , {
"Request In" , "dns.response_to" , FT_FRAMENUM , BASE_NONE , NULL , 0x0 , "This is a response to the DNS query in this frame" , HFILL }
}
, {
& hf_dns_time , {
"Time" , "dns.time" , FT_RELATIVE_TIME , BASE_NONE , NULL , 0x0 , "The time between the Query and the Response" , HFILL }
}
, {
& hf_dns_count_add_rr , {
"Additional RRs" , "dns.count.add_rr" , FT_UINT16 , BASE_DEC , NULL , 0x0 , "Number of additional records in packet" , HFILL }
}
, {
& hf_dns_sshfp_algorithm , {
"Algorithm" , "dns.sshfp.algorithm" , FT_UINT8 , BASE_DEC , VALS ( sshfp_algo_vals ) , 0 , NULL , HFILL }
}
, {
& hf_dns_sshfp_fingerprint_type , {
"Fingerprint type" , "dns.sshfp.fingerprint.type" , FT_UINT8 , BASE_DEC , VALS ( sshfp_fingertype_vals ) , 0 , NULL , HFILL }
}
, {
& hf_dns_sshfp_fingerprint , {
"Fingerprint" , "dns.sshfp.fingerprint" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_hip_hit_length , {
"HIT length" , "dns.hip.hit.length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_hip_pk_algo , {
"HIT length" , "dns.hip.hit.pk.algo" , FT_UINT8 , BASE_DEC , VALS ( hip_algo_vals ) , 0 , NULL , HFILL }
}
, {
& hf_dns_hip_pk_length , {
"PK length" , "dns.hip.pk.length" , FT_UINT16 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_hip_hit , {
"Host Identity Tag" , "dns.hip.hit" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_hip_pk , {
"HIP Public Key" , "dns.hip.pk" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_hip_rendezvous_server , {
"Rendezvous Server" , "dns.hip.rendezvous_server" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_dhcid_rdata , {
"DHCID Data" , "dns.dhcid.rdata" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_ds_key_id , {
"Key id" , "dns.ds.key_id" , FT_UINT16 , BASE_HEX , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_ds_algorithm , {
"Algorithm" , "dns.ds.algorithm" , FT_UINT8 , BASE_DEC , VALS ( dnssec_algo_vals ) , 0 , NULL , HFILL }
}
, {
& hf_dns_ds_digest_type , {
"Digest Type" , "dns.ds.digest_type" , FT_UINT8 , BASE_DEC , VALS ( dns_ds_digest_vals ) , 0 , NULL , HFILL }
}
, {
& hf_dns_ds_digest , {
"Digest" , "dns.ds.digest" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_apl_address_family , {
"Address Family" , "dns.apl.address_family" , FT_UINT16 , BASE_DEC , VALS ( afamily_vals ) , 0 , NULL , HFILL }
}
, {
& hf_dns_apl_coded_prefix , {
"Prefix Length" , "dns.apl.coded_prefix" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_apl_negation , {
"Negation Flag" , "dns.apl.negation" , FT_BOOLEAN , 8 , TFS ( & tfs_dns_apl_negation ) , DNS_APL_NEGATION , NULL , HFILL }
}
, {
& hf_dns_apl_afdlength , {
"Address Length" , "dns.apl.afdlength" , FT_UINT8 , BASE_DEC , NULL , DNS_APL_AFDLENGTH , "in octets" , HFILL }
}
, {
& hf_dns_apl_afdpart_ipv4 , {
"Address" , "dns.apl.afdpart.ipv4" , FT_IPv4 , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_apl_afdpart_ipv6 , {
"Address" , "dns.apl.afdpart.ipv6" , FT_IPv6 , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_apl_afdpart_data , {
"Address" , "dns.apl.afdpart.data" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_gpos_longitude_length , {
"Longitude length" , "dns.gpos.longitude_length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_gpos_longitude , {
"Longitude" , "dns.gpos.longitude" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_gpos_latitude_length , {
"Latitude length" , "dns.gpos.latitude_length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_gpos_latitude , {
"Latitude" , "dns.gpos.latitude" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_gpos_altitude_length , {
"Altitude length" , "dns.gpos.altitude_length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_gpos_altitude , {
"Altitude" , "dns.gpos.altitude" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_rp_mailbox , {
"Mailbox" , "dns.rp.mailbox" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_rp_txt_rr , {
"TXT RR" , "dns.rp.txt_rr" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_afsdb_subtype , {
"Subtype" , "dns.afsdb.subtype" , FT_UINT16 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_afsdb_hostname , {
"Hostname" , "dns.afsdb.hostname" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_x25_length , {
"Length" , "dns.x25.length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_x25_psdn_address , {
"PSDN-Address" , "dns.x25.psdn_address" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_isdn_length , {
"Length" , "dns.idsn.length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_isdn_address , {
"ISDN Address" , "dns.idsn.address" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_isdn_sa_length , {
"Length" , "dns.idsn.sa.length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_isdn_sa , {
"Sub Address" , "dns.idsn.sa.address" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_rt_preference , {
"Preference" , "dns.rt.subtype" , FT_UINT16 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_rt_intermediate_host , {
"Intermediate Hostname" , "dns.rt.intermediate_host" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_nsap_rdata , {
"NSAP Data" , "dns.nsap.rdata" , FT_BYTES , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_nsap_ptr_owner , {
"Owner" , "dns.nsap_ptr.owner" , FT_STRING , BASE_NONE , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_caa_flags , {
"CAA Flags" , "dns.caa.flags" , FT_UINT8 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_caa_flag_issuer_critical , {
"Issuer Critical" , "dns.caa.flags.issuer_critical" , FT_BOOLEAN , 8 , TFS ( & tfs_critical_not_critical ) , CAA_FLAG_ISSUER_CRITICAL , "Other CAs must not issue certificates" , HFILL }
}
, {
& hf_dns_caa_issue , {
"Issue" , "dns.caa.issue" , FT_STRING , BASE_NONE , NULL , 0x0 , "CA which is allowed to issue certificates" , HFILL }
}
, {
& hf_dns_caa_issuewild , {
"Issue Wildcard" , "dns.caa.issuewild" , FT_STRING , BASE_NONE , NULL , 0x0 , "CA which is allowed to issue wildcard certificates" , HFILL }
}
, {
& hf_dns_caa_iodef , {
"Report URL" , "dns.caa.iodef" , FT_STRING , BASE_NONE , NULL , 0x0 , "URL or email address for certificate issue requests and violation reports" , HFILL }
}
, {
& hf_dns_caa_unknown , {
"Unkown tag" , "dns.caa.unknown" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_caa_tag_length , {
"Tag length" , "dns.caa.tag_length" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_dns_caa_tag , {
"Tag" , "dns.caa.tag" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_caa_value , {
"Value" , "dns.caa.value" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_wins_local_flag , {
"Local Flag" , "dns.wins.local_flag" , FT_BOOLEAN , 32 , TFS ( & tfs_true_false ) , 0x1 , NULL , HFILL }
}
, {
& hf_dns_wins_lookup_timeout , {
"Lookup timeout" , "dns.wins.lookup_timeout" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "In seconds" , HFILL }
}
, {
& hf_dns_wins_cache_timeout , {
"Cache timeout" , "dns.wins.cache_timeout" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "In seconds" , HFILL }
}
, {
& hf_dns_wins_nb_wins_servers , {
"Number of WINS servers" , "dns.wins.nb_wins_servers" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_wins_server , {
"WINS Server Address" , "dns.wins.wins_server" , FT_IPv4 , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_winsr_local_flag , {
"Local Flag" , "dns.winsr.local_flag" , FT_BOOLEAN , 32 , TFS ( & tfs_true_false ) , 0x1 , NULL , HFILL }
}
, {
& hf_dns_winsr_lookup_timeout , {
"Lookup timeout" , "dns.winsr.lookup_timeout" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "In seconds" , HFILL }
}
, {
& hf_dns_winsr_cache_timeout , {
"Cache timeout" , "dns.winsr.cache_timeout" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "In seconds" , HFILL }
}
, {
& hf_dns_winsr_name_result_domain , {
"Name Result Domain" , "dns.winsr.name_result_domain" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_dns_data , {
"Data" , "dns.data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, }
;
static ei_register_info ei [ ] = {
{
& ei_dns_opt_bad_length , {
"dns.rr.opt.bad_length" , PI_MALFORMED , PI_ERROR , "Length too long for any type of IP address." , EXPFILL }
}
, {
& ei_dns_undecoded_option , {
"dns.undecoded.type" , PI_UNDECODED , PI_NOTE , "Undecoded option" , EXPFILL }
}
, {
& ei_dns_depr_opc , {
"dns.depr.opc" , PI_PROTOCOL , PI_WARN , "Deprecated opcode" , EXPFILL }
}
, {
& ei_ttl_negative , {
"dns.ttl.negative" , PI_PROTOCOL , PI_WARN , "TTL can't be negative" , EXPFILL }
}
, {
& ei_dns_tsig_alg , {
"dns.tsig.noalg" , PI_UNDECODED , PI_WARN , "No dissector for algorithm" , EXPFILL }
}
, }
;
static gint * ett [ ] = {
& ett_dns , & ett_dns_qd , & ett_dns_rr , & ett_dns_qry , & ett_dns_ans , & ett_dns_flags , & ett_dns_opts , & ett_nsec3_flags , & ett_key_flags , & ett_t_key , & ett_dns_mac , & ett_caa_flags , & ett_caa_data , }
;
module_t * dns_module ;
expert_module_t * expert_dns ;
proto_dns = proto_register_protocol ( "Domain Name Service" , "DNS" , "dns" ) ;
proto_register_field_array ( proto_dns , hf , array_length ( hf ) ) ;
proto_register_subtree_array ( ett , array_length ( ett ) ) ;
expert_dns = expert_register_protocol ( proto_dns ) ;
expert_register_field_array ( expert_dns , ei , array_length ( ei ) ) ;
range_convert_str ( & global_dns_tcp_port_range , DEFAULT_DNS_PORT_RANGE , MAX_TCP_PORT ) ;
range_convert_str ( & global_dns_udp_port_range , DEFAULT_DNS_PORT_RANGE , MAX_UDP_PORT ) ;
dns_module = prefs_register_protocol ( proto_dns , proto_reg_handoff_dns ) ;
prefs_register_range_preference ( dns_module , "tcp.ports" , "DNS TCP ports" , "TCP ports to be decoded as DNS (default: " DEFAULT_DNS_PORT_RANGE ")" , & global_dns_tcp_port_range , MAX_TCP_PORT ) ;
prefs_register_range_preference ( dns_module , "udp.ports" , "DNS UDP ports" , "UDP ports to be decoded as DNS (default: " DEFAULT_DNS_PORT_RANGE ")" , & global_dns_udp_port_range , MAX_UDP_PORT ) ;
prefs_register_bool_preference ( dns_module , "desegment_dns_messages" , "Reassemble DNS messages spanning multiple TCP segments" , "Whether the DNS dissector should reassemble messages spanning multiple TCP segments." " To use this option, you must also enable \"Allow subdissectors to reassemble TCP streams\" in the TCP protocol settings." , & dns_desegment ) ;
prefs_register_bool_preference ( dns_module , "use_for_addr_resolution" , "Use DNS packet data for address resolution" , "Whether addressame pairs found in dissected DNS packets should be used by Wireshark for name resolution." , & dns_use_for_addr_resolution ) ;
dns_tsig_dissector_table = register_dissector_table ( "dns.tsig.mac" , "DNS TSIG MAC Dissectors" , FT_STRING , BASE_NONE ) ;
dns_tap = register_tap ( "dns" ) ;
} |
3,599,206,110,384,554,500 | debian | 31 | 0 | int PEM_write_ ## name ( FILE * fp , type * x ) ;
# define DECLARE_PEM_write_fp_const ( name , type ) 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 ) |
2,895,622,461,494,525,400 | debian | 46 | 0 | static void test_bug28386 ( ) {
int rc ;
MYSQL_STMT * stmt ;
MYSQL_RES * result ;
MYSQL_ROW row ;
MYSQL_BIND bind ;
const char hello [ ] = "hello world!" ;
DBUG_ENTER ( "test_bug28386" ) ;
myheader ( "test_bug28386" ) ;
rc = mysql_query ( mysql , "select @@global.log_output" ) ;
myquery ( rc ) ;
result = mysql_store_result ( mysql ) ;
DIE_UNLESS ( result ) ;
row = mysql_fetch_row ( result ) ;
if ( ! strstr ( row [ 0 ] , "TABLE" ) ) {
mysql_free_result ( result ) ;
if ( ! opt_silent ) printf ( "Skipping the test since logging to tables is not enabled\n" ) ;
return ;
}
mysql_free_result ( result ) ;
enable_query_logs ( 1 ) ;
stmt = mysql_simple_prepare ( mysql , "SELECT ?" ) ;
check_stmt ( stmt ) ;
memset ( & bind , 0 , sizeof ( bind ) ) ;
bind . buffer_type = MYSQL_TYPE_STRING ;
bind . buffer = ( void * ) hello ;
bind . buffer_length = sizeof ( hello ) ;
mysql_stmt_bind_param ( stmt , & bind ) ;
mysql_stmt_send_long_data ( stmt , 0 , hello , sizeof ( hello ) ) ;
rc = mysql_stmt_execute ( stmt ) ;
check_execute ( stmt , rc ) ;
rc = my_process_stmt_result ( stmt ) ;
DIE_UNLESS ( rc == 1 ) ;
rc = mysql_stmt_reset ( stmt ) ;
check_execute ( stmt , rc ) ;
rc = mysql_stmt_close ( stmt ) ;
DIE_UNLESS ( ! rc ) ;
rc = mysql_query ( mysql , "select * from mysql.general_log where " "command_type='Close stmt' or " "command_type='Reset stmt' or " "command_type='Long Data'" ) ;
myquery ( rc ) ;
result = mysql_store_result ( mysql ) ;
mytest ( result ) ;
DIE_UNLESS ( mysql_num_rows ( result ) == 3 ) ;
mysql_free_result ( result ) ;
restore_query_logs ( ) ;
DBUG_VOID_RETURN ;
} |
8,320,716,512,483,418,000 | chrome | 31 | 1 | static void iadst4 ( const int16_t * input , int16_t * output ) {
int s0 , s1 , s2 , s3 , s4 , s5 , s6 , s7 ;
int x0 = input [ 0 ] ;
int x1 = input [ 1 ] ;
int x2 = input [ 2 ] ;
int x3 = input [ 3 ] ;
if ( ! ( x0 | x1 | x2 | x3 ) ) {
output [ 0 ] = output [ 1 ] = output [ 2 ] = output [ 3 ] = 0 ;
return ;
}
s0 = sinpi_1_9 * x0 ;
s1 = sinpi_2_9 * x0 ;
s2 = sinpi_3_9 * x1 ;
s3 = sinpi_4_9 * x2 ;
s4 = sinpi_1_9 * x2 ;
s5 = sinpi_2_9 * x3 ;
s6 = sinpi_4_9 * x3 ;
s7 = x0 - x2 + x3 ;
x0 = s0 + s3 + s5 ;
x1 = s1 - s4 - s6 ;
x2 = sinpi_3_9 * s7 ;
x3 = s2 ;
s0 = x0 + x3 ;
s1 = x1 + x3 ;
s2 = x2 ;
s3 = x0 + x1 - x3 ;
output [ 0 ] = dct_const_round_shift ( s0 ) ;
output [ 1 ] = dct_const_round_shift ( s1 ) ;
output [ 2 ] = dct_const_round_shift ( s2 ) ;
output [ 3 ] = dct_const_round_shift ( s3 ) ;
} |
-7,549,575,329,765,818,000 | debian | 7 | 0 | static bool Curl_isunreserved ( unsigned char in ) {
switch ( in ) {
case '0' : case '1' : case '2' : case '3' : case '4' : case '5' : case '6' : case '7' : case '8' : case '9' : case 'a' : case 'b' : case 'c' : case 'd' : case 'e' : case 'f' : case 'g' : case 'h' : case 'i' : case 'j' : case 'k' : case 'l' : case 'm' : case 'n' : case 'o' : case 'p' : case 'q' : case 'r' : case 's' : case 't' : case 'u' : case 'v' : case 'w' : case 'x' : case 'y' : case 'z' : case 'A' : case 'B' : case 'C' : case 'D' : case 'E' : case 'F' : case 'G' : case 'H' : case 'I' : case 'J' : case 'K' : case 'L' : case 'M' : case 'N' : case 'O' : case 'P' : case 'Q' : case 'R' : case 'S' : case 'T' : case 'U' : case 'V' : case 'W' : case 'X' : case 'Y' : case 'Z' : case '-' : case '.' : case '_' : case '~' : return TRUE ;
default : break ;
}
return FALSE ;
} |
-5,390,559,971,540,708,000 | debian | 117 | 0 | static int x8_decode_intra_mb ( IntraX8Context * const w , const int chroma ) {
MpegEncContext * const s = w -> s ;
uint8_t * scantable ;
int final , run , level ;
int ac_mode , dc_mode , est_run , dc_level ;
int pos , n ;
int zeros_only ;
int use_quant_matrix ;
int sign ;
assert ( w -> orient < 12 ) ;
s -> dsp . clear_block ( s -> block [ 0 ] ) ;
if ( chroma ) {
dc_mode = 2 ;
}
else {
dc_mode = ! ! w -> est_run ;
}
if ( x8_get_dc_rlf ( w , dc_mode , & dc_level , & final ) ) return - 1 ;
n = 0 ;
zeros_only = 0 ;
if ( ! final ) {
use_quant_matrix = w -> use_quant_matrix ;
if ( chroma ) {
ac_mode = 1 ;
est_run = 64 ;
/ ot used }
else {
if ( w -> raw_orient < 3 ) {
use_quant_matrix = 0 ;
}
if ( w -> raw_orient > 4 ) {
ac_mode = 0 ;
est_run = 64 ;
}
else {
if ( w -> est_run > 1 ) {
ac_mode = 2 ;
est_run = w -> est_run ;
}
else {
ac_mode = 3 ;
est_run = 64 ;
}
}
}
x8_select_ac_table ( w , ac_mode ) ;
scantable = w -> scantable [ ( 0x928548 >> ( 2 * w -> orient ) ) & 3 ] . permutated ;
pos = 0 ;
do {
n ++ ;
if ( n >= est_run ) {
ac_mode = 3 ;
x8_select_ac_table ( w , 3 ) ;
}
x8_get_ac_rlf ( w , ac_mode , & run , & level , & final ) ;
pos += run + 1 ;
if ( pos > 63 ) {
return - 1 ;
}
level = ( level + 1 ) * w -> dquant ;
level += w -> qsum ;
sign = - get_bits1 ( & s -> gb ) ;
level = ( level ^ sign ) - sign ;
if ( use_quant_matrix ) {
level = ( level * quant_table [ pos ] ) >> 8 ;
}
s -> block [ 0 ] [ scantable [ pos ] ] = level ;
}
while ( ! final ) ;
s -> block_last_index [ 0 ] = pos ;
}
else {
s -> block_last_index [ 0 ] = 0 ;
if ( w -> flat_dc && ( ( unsigned ) ( dc_level + 1 ) ) < 3 ) {
int32_t divide_quant = ! chroma ? w -> divide_quant_dc_luma : w -> divide_quant_dc_chroma ;
int32_t dc_quant = ! chroma ? w -> quant : w -> quant_dc_chroma ;
dc_level += ( w -> predicted_dc * divide_quant + ( 1 << 12 ) ) >> 13 ;
dsp_x8_put_solidcolor ( av_clip_uint8 ( ( dc_level * dc_quant + 4 ) >> 3 ) , s -> dest [ chroma ] , s -> current_picture . f . linesize [ ! ! chroma ] ) ;
goto block_placed ;
}
zeros_only = ( dc_level == 0 ) ;
}
if ( ! chroma ) {
s -> block [ 0 ] [ 0 ] = dc_level * w -> quant ;
}
else {
s -> block [ 0 ] [ 0 ] = dc_level * w -> quant_dc_chroma ;
}
if ( ( unsigned int ) ( dc_level + 1 ) >= 3 && ( w -> edges & 3 ) != 3 ) {
int direction ;
direction = ( 0x6A017C >> ( w -> orient * 2 ) ) & 3 ;
if ( direction != 3 ) {
x8_ac_compensation ( w , direction , s -> block [ 0 ] [ 0 ] ) ;
}
}
if ( w -> flat_dc ) {
dsp_x8_put_solidcolor ( w -> predicted_dc , s -> dest [ chroma ] , s -> current_picture . f . linesize [ ! ! chroma ] ) ;
}
else {
w -> dsp . spatial_compensation [ w -> orient ] ( s -> edge_emu_buffer , s -> dest [ chroma ] , s -> current_picture . f . linesize [ ! ! chroma ] ) ;
}
if ( ! zeros_only ) s -> dsp . idct_add ( s -> dest [ chroma ] , s -> current_picture . f . linesize [ ! ! chroma ] , s -> block [ 0 ] ) ;
block_placed : if ( ! chroma ) {
x8_update_predictions ( w , w -> orient , n ) ;
}
if ( s -> loop_filter ) {
uint8_t * ptr = s -> dest [ chroma ] ;
int linesize = s -> current_picture . f . linesize [ ! ! chroma ] ;
if ( ! ( ( w -> edges & 2 ) || ( zeros_only && ( w -> orient | 4 ) == 4 ) ) ) {
w -> dsp . h_loop_filter ( ptr , linesize , w -> quant ) ;
}
if ( ! ( ( w -> edges & 1 ) || ( zeros_only && ( w -> orient | 8 ) == 8 ) ) ) {
w -> dsp . v_loop_filter ( ptr , linesize , w -> quant ) ;
}
}
return 0 ;
} |
-1,111,775,978,048,960,300 | chrome | 15 | 0 | TEST_F ( BrowsingDataRemoverImplTest , RemoveProtectedLocalStorageForever ) {
# if BUILDFLAG ( ENABLE_EXTENSIONS ) MockExtensionSpecialStoragePolicy * policy = CreateMockPolicy ( ) ;
policy -> AddProtected ( kOrigin1 . GetOrigin ( ) ) ;
# endif BlockUntilBrowsingDataRemoved ( base : : Time ( ) , base : : Time : : Max ( ) , BrowsingDataRemover : : REMOVE_LOCAL_STORAGE , true ) ;
EXPECT_EQ ( BrowsingDataRemover : : REMOVE_LOCAL_STORAGE , GetRemovalMask ( ) ) ;
EXPECT_EQ ( BrowsingDataHelper : : UNPROTECTED_WEB | BrowsingDataHelper : : PROTECTED_WEB , GetOriginTypeMask ( ) ) ;
StoragePartitionRemovalData removal_data = GetStoragePartitionRemovalData ( ) ;
EXPECT_EQ ( removal_data . remove_mask , StoragePartition : : REMOVE_DATA_MASK_LOCAL_STORAGE ) ;
EXPECT_EQ ( removal_data . quota_storage_remove_mask , StoragePartition : : QUOTA_MANAGED_STORAGE_MASK_ALL ) ;
EXPECT_EQ ( removal_data . remove_begin , GetBeginTime ( ) ) ;
EXPECT_TRUE ( removal_data . origin_matcher . Run ( kOrigin1 , mock_policy ( ) ) ) ;
EXPECT_TRUE ( removal_data . origin_matcher . Run ( kOrigin2 , mock_policy ( ) ) ) ;
EXPECT_TRUE ( removal_data . origin_matcher . Run ( kOrigin3 , mock_policy ( ) ) ) ;
EXPECT_FALSE ( removal_data . origin_matcher . Run ( kOriginExt , mock_policy ( ) ) ) ;
} |
3,919,646,340,804,521,500 | debian | 33 | 0 | static void add_objects_in_unpacked_packs ( struct rev_info * revs ) {
struct packed_git * p ;
struct in_pack in_pack ;
uint32_t i ;
memset ( & in_pack , 0 , sizeof ( in_pack ) ) ;
for ( p = packed_git ;
p ;
p = p -> next ) {
const unsigned char * sha1 ;
struct object * o ;
if ( ! p -> pack_local || p -> pack_keep ) continue ;
if ( open_pack_index ( p ) ) die ( "cannot open pack index" ) ;
ALLOC_GROW ( in_pack . array , in_pack . nr + p -> num_objects , in_pack . alloc ) ;
for ( i = 0 ;
i < p -> num_objects ;
i ++ ) {
sha1 = nth_packed_object_sha1 ( p , i ) ;
o = lookup_unknown_object ( sha1 ) ;
if ( ! ( o -> flags & OBJECT_ADDED ) ) mark_in_pack_object ( o , p , & in_pack ) ;
o -> flags |= OBJECT_ADDED ;
}
}
if ( in_pack . nr ) {
qsort ( in_pack . array , in_pack . nr , sizeof ( in_pack . array [ 0 ] ) , ofscmp ) ;
for ( i = 0 ;
i < in_pack . nr ;
i ++ ) {
struct object * o = in_pack . array [ i ] . object ;
add_object_entry ( o -> oid . hash , o -> type , "" , 0 ) ;
}
}
free ( in_pack . array ) ;
} |
-8,933,711,118,846,966,000 | debian | 26 | 0 | static void cirrus_bitblt_cputovideo_next ( CirrusVGAState * s ) {
int copy_count ;
uint8_t * end_ptr ;
if ( s -> cirrus_srccounter > 0 ) {
if ( s -> cirrus_blt_mode & CIRRUS_BLTMODE_PATTERNCOPY ) {
cirrus_bitblt_common_patterncopy ( s ) ;
the_end : s -> cirrus_srccounter = 0 ;
cirrus_bitblt_reset ( s ) ;
}
else {
do {
( * s -> cirrus_rop ) ( s , s -> cirrus_blt_dstaddr , 0 , 0 , 0 , s -> cirrus_blt_width , 1 ) ;
cirrus_invalidate_region ( s , s -> cirrus_blt_dstaddr , 0 , s -> cirrus_blt_width , 1 ) ;
s -> cirrus_blt_dstaddr += s -> cirrus_blt_dstpitch ;
s -> cirrus_srccounter -= s -> cirrus_blt_srcpitch ;
if ( s -> cirrus_srccounter <= 0 ) goto the_end ;
end_ptr = s -> cirrus_bltbuf + s -> cirrus_blt_srcpitch ;
copy_count = s -> cirrus_srcptr_end - end_ptr ;
memmove ( s -> cirrus_bltbuf , end_ptr , copy_count ) ;
s -> cirrus_srcptr = s -> cirrus_bltbuf + copy_count ;
s -> cirrus_srcptr_end = s -> cirrus_bltbuf + s -> cirrus_blt_srcpitch ;
}
while ( s -> cirrus_srcptr >= s -> cirrus_srcptr_end ) ;
}
}
} |
3,246,343,243,711,264,300 | debian | 21 | 1 | static void handle_raw_login ( char * packet , int len , struct query * q , int fd , int userid ) {
char myhash [ 16 ] ;
if ( len < 16 ) return ;
if ( userid < 0 || userid >= created_users ) return ;
if ( ! users [ userid ] . active || users [ userid ] . disabled ) return ;
if ( users [ userid ] . last_pkt + 60 < time ( NULL ) ) return ;
if ( debug >= 1 ) {
fprintf ( stderr , "IN login raw, len %d, from user %d\n" , len , userid ) ;
}
login_calculate ( myhash , 16 , password , users [ userid ] . seed + 1 ) ;
if ( memcmp ( packet , myhash , 16 ) == 0 ) {
struct sockaddr_in * tempin ;
users [ userid ] . last_pkt = time ( NULL ) ;
memcpy ( & ( users [ userid ] . q ) , q , sizeof ( struct query ) ) ;
tempin = ( struct sockaddr_in * ) & ( q -> from ) ;
memcpy ( & ( users [ userid ] . host ) , & ( tempin -> sin_addr ) , sizeof ( struct in_addr ) ) ;
user_set_conn_type ( userid , CONN_RAW_UDP ) ;
login_calculate ( myhash , 16 , password , users [ userid ] . seed - 1 ) ;
send_raw ( fd , myhash , 16 , userid , RAW_HDR_CMD_LOGIN , q ) ;
}
} |
1,458,662,858,915,721,500 | debian | 28 | 0 | static TranslationBlock * tb_find_pc ( uintptr_t tc_ptr ) {
int m_min , m_max , m ;
uintptr_t v ;
TranslationBlock * tb ;
if ( tcg_ctx . tb_ctx . nb_tbs <= 0 ) {
return NULL ;
}
if ( tc_ptr < ( uintptr_t ) tcg_ctx . code_gen_buffer || tc_ptr >= ( uintptr_t ) tcg_ctx . code_gen_ptr ) {
return NULL ;
}
m_min = 0 ;
m_max = tcg_ctx . tb_ctx . nb_tbs - 1 ;
while ( m_min <= m_max ) {
m = ( m_min + m_max ) >> 1 ;
tb = & tcg_ctx . tb_ctx . tbs [ m ] ;
v = ( uintptr_t ) tb -> tc_ptr ;
if ( v == tc_ptr ) {
return tb ;
}
else if ( tc_ptr < v ) {
m_max = m - 1 ;
}
else {
m_min = m + 1 ;
}
}
return & tcg_ctx . tb_ctx . tbs [ m_max ] ;
} |
6,451,388,340,908,335,000 | debian | 53 | 0 | static int zrsdparams ( i_ctx_t * i_ctx_p ) {
os_ptr op = osp ;
ref * pFilter ;
ref * pDecodeParms ;
int Intent = 0 ;
bool AsyncRead = false ;
ref empty_array , filter1_array , parms1_array ;
uint i ;
int code = 0 ;
if ( ref_stack_count ( & o_stack ) < 1 ) return_error ( gs_error_stackunderflow ) ;
if ( ! r_has_type ( op , t_dictionary ) && ! r_has_type ( op , t_null ) ) {
return_error ( gs_error_typecheck ) ;
}
make_empty_array ( & empty_array , a_readonly ) ;
if ( r_has_type ( op , t_dictionary ) && dict_find_string ( op , "Filter" , & pFilter ) > 0 ) {
if ( ! r_is_array ( pFilter ) ) {
if ( ! r_has_type ( pFilter , t_name ) ) return_error ( gs_error_typecheck ) ;
make_array ( & filter1_array , a_readonly , 1 , pFilter ) ;
pFilter = & filter1_array ;
}
}
else pFilter = & empty_array ;
if ( pFilter != & empty_array && dict_find_string ( op , "DecodeParms" , & pDecodeParms ) > 0 ) {
if ( pFilter == & filter1_array ) {
make_array ( & parms1_array , a_readonly , 1 , pDecodeParms ) ;
pDecodeParms = & parms1_array ;
}
else if ( ! r_is_array ( pDecodeParms ) ) return_error ( gs_error_typecheck ) ;
else if ( r_size ( pFilter ) != r_size ( pDecodeParms ) ) return_error ( gs_error_rangecheck ) ;
}
else pDecodeParms = 0 ;
for ( i = 0 ;
i < r_size ( pFilter ) ;
++ i ) {
ref f , fname , dp ;
array_get ( imemory , pFilter , ( long ) i , & f ) ;
if ( ! r_has_type ( & f , t_name ) ) return_error ( gs_error_typecheck ) ;
name_string_ref ( imemory , & f , & fname ) ;
if ( r_size ( & fname ) < 6 || memcmp ( fname . value . bytes + r_size ( & fname ) - 6 , "Decode" , 6 ) ) return_error ( gs_error_rangecheck ) ;
if ( pDecodeParms ) {
array_get ( imemory , pDecodeParms , ( long ) i , & dp ) ;
if ( ! ( r_has_type ( & dp , t_dictionary ) || r_has_type ( & dp , t_null ) ) ) return_error ( gs_error_typecheck ) ;
}
}
if ( r_has_type ( op , t_dictionary ) ) code = dict_int_param ( op , "Intent" , 0 , 3 , 0 , & Intent ) ;
if ( code < 0 && code != gs_error_rangecheck ) return code ;
if ( r_has_type ( op , t_dictionary ) ) if ( ( code = dict_bool_param ( op , "AsyncRead" , false , & AsyncRead ) ) < 0 ) return code ;
push ( 1 ) ;
op [ - 1 ] = * pFilter ;
if ( pDecodeParms ) * op = * pDecodeParms ;
else make_null ( op ) ;
return 0 ;
} |
3,599,206,110,384,554,500 | debian | 51 | 0 | static ossl_inline t2 * sk_ ## t1 ## _delete ( STACK_OF ( t1 ) * sk , int i ) {
return ( t2 * ) OPENSSL_sk_delete ( ( OPENSSL_STACK * ) sk , i ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _delete_ptr ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return ( t2 * ) OPENSSL_sk_delete_ptr ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _push ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_push ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _unshift ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_unshift ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _pop ( STACK_OF ( t1 ) * sk ) {
return ( t2 * ) OPENSSL_sk_pop ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _shift ( STACK_OF ( t1 ) * sk ) {
return ( t2 * ) OPENSSL_sk_shift ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline void sk_ ## t1 ## _pop_free ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _freefunc freefunc ) {
OPENSSL_sk_pop_free ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline int sk_ ## t1 ## _insert ( STACK_OF ( t1 ) * sk , t2 * ptr , int idx ) {
return OPENSSL_sk_insert ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr , idx ) ;
}
static ossl_inline t2 * sk_ ## t1 ## _set ( STACK_OF ( t1 ) * sk , int idx , t2 * ptr ) {
return ( t2 * ) OPENSSL_sk_set ( ( OPENSSL_STACK * ) sk , idx , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _find ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_find ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline int sk_ ## t1 ## _find_ex ( STACK_OF ( t1 ) * sk , t2 * ptr ) {
return OPENSSL_sk_find_ex ( ( OPENSSL_STACK * ) sk , ( const void * ) ptr ) ;
}
static ossl_inline void sk_ ## t1 ## _sort ( STACK_OF ( t1 ) * sk ) {
OPENSSL_sk_sort ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline int sk_ ## t1 ## _is_sorted ( const STACK_OF ( t1 ) * sk ) {
return OPENSSL_sk_is_sorted ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _dup ( const STACK_OF ( t1 ) * sk ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_dup ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _deep_copy ( const STACK_OF ( t1 ) * sk , sk_ ## t1 ## _copyfunc copyfunc , sk_ ## t1 ## _freefunc freefunc ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_deep_copy ( ( const OPENSSL_STACK * ) sk , ( OPENSSL_sk_copyfunc ) copyfunc , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline sk_ ## t1 ## _compfunc sk_ ## t1 ## _set_cmp_func ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _compfunc compare ) {
return ( sk_ ## t1 ## _compfunc ) OPENSSL_sk_set_cmp_func ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_compfunc ) compare ) ;
}
# define DEFINE_SPECIAL_STACK_OF ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , t2 , t2 ) # define DEFINE_STACK_OF ( t ) SKM_DEFINE_STACK_OF ( t , t , t ) # define DEFINE_SPECIAL_STACK_OF_CONST ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , const t2 , t2 ) # define DEFINE_STACK_OF_CONST ( t ) SKM_DEFINE_STACK_OF ( t , const t , t ) typedef char * OPENSSL_STRING ;
typedef const char * OPENSSL_CSTRING ;
DEFINE_SPECIAL_STACK_OF ( OPENSSL_STRING , char ) |
5,991,533,509,192,664,000 | debian | 178 | 0 | static int collector_decode_htmlnumericentity ( int c , void * data ) {
struct collector_htmlnumericentity_data * pc = ( struct collector_htmlnumericentity_data * ) data ;
int f , n , s , r , d , size , * mapelm ;
switch ( pc -> status ) {
case 1 : if ( c == 0x23 ) {
pc -> status = 2 ;
}
else {
pc -> status = 0 ;
( * pc -> decoder -> filter_function ) ( 0x26 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
case 2 : if ( c == 0x78 ) {
pc -> status = 4 ;
}
else if ( c >= 0x30 && c <= 0x39 ) {
pc -> cache = c - 0x30 ;
pc -> status = 3 ;
pc -> digit = 1 ;
}
else {
pc -> status = 0 ;
( * pc -> decoder -> filter_function ) ( 0x26 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( 0x23 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
case 3 : s = 0 ;
f = 0 ;
if ( c >= 0x30 && c <= 0x39 ) {
if ( pc -> digit > 9 ) {
pc -> status = 0 ;
s = pc -> cache ;
f = 1 ;
}
else {
s = pc -> cache * 10 + c - 0x30 ;
pc -> cache = s ;
pc -> digit ++ ;
}
}
else {
pc -> status = 0 ;
s = pc -> cache ;
f = 1 ;
n = 0 ;
size = pc -> mapsize ;
while ( n < size ) {
mapelm = & ( pc -> convmap [ n * 4 ] ) ;
d = s - mapelm [ 2 ] ;
if ( d >= mapelm [ 0 ] && d <= mapelm [ 1 ] ) {
f = 0 ;
( * pc -> decoder -> filter_function ) ( d , pc -> decoder ) ;
if ( c != 0x3b ) {
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
}
n ++ ;
}
}
if ( f ) {
( * pc -> decoder -> filter_function ) ( 0x26 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( 0x23 , pc -> decoder ) ;
r = 1 ;
n = pc -> digit ;
while ( n > 0 ) {
r *= 10 ;
n -- ;
}
s %= r ;
r /= 10 ;
while ( r > 0 ) {
d = s / r ;
s %= r ;
r /= 10 ;
( * pc -> decoder -> filter_function ) ( mbfl_hexchar_table [ d ] , pc -> decoder ) ;
}
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
case 4 : if ( c >= 0x30 && c <= 0x39 ) {
pc -> cache = c - 0x30 ;
pc -> status = 5 ;
pc -> digit = 1 ;
}
else if ( c >= 0x41 && c <= 0x46 ) {
pc -> cache = c - 0x41 + 10 ;
pc -> status = 5 ;
pc -> digit = 1 ;
}
else if ( c >= 0x61 && c <= 0x66 ) {
pc -> cache = c - 0x61 + 10 ;
pc -> status = 5 ;
pc -> digit = 1 ;
}
else {
pc -> status = 0 ;
( * pc -> decoder -> filter_function ) ( 0x26 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( 0x23 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( 0x78 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
case 5 : s = 0 ;
f = 0 ;
if ( ( c >= 0x30 && c <= 0x39 ) || ( c >= 0x41 && c <= 0x46 ) || ( c >= 0x61 && c <= 0x66 ) ) {
if ( pc -> digit > 9 ) {
pc -> status = 0 ;
s = pc -> cache ;
f = 1 ;
}
else {
if ( c >= 0x30 && c <= 0x39 ) {
s = pc -> cache * 16 + ( c - 0x30 ) ;
}
else if ( c >= 0x41 && c <= 0x46 ) {
s = pc -> cache * 16 + ( c - 0x41 + 10 ) ;
}
else {
s = pc -> cache * 16 + ( c - 0x61 + 10 ) ;
}
pc -> cache = s ;
pc -> digit ++ ;
}
}
else {
pc -> status = 0 ;
s = pc -> cache ;
f = 1 ;
n = 0 ;
size = pc -> mapsize ;
while ( n < size ) {
mapelm = & ( pc -> convmap [ n * 4 ] ) ;
d = s - mapelm [ 2 ] ;
if ( d >= mapelm [ 0 ] && d <= mapelm [ 1 ] ) {
f = 0 ;
( * pc -> decoder -> filter_function ) ( d , pc -> decoder ) ;
if ( c != 0x3b ) {
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
}
n ++ ;
}
}
if ( f ) {
( * pc -> decoder -> filter_function ) ( 0x26 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( 0x23 , pc -> decoder ) ;
( * pc -> decoder -> filter_function ) ( 0x78 , pc -> decoder ) ;
r = 1 ;
n = pc -> digit ;
while ( n > 0 ) {
r *= 16 ;
n -- ;
}
s %= r ;
r /= 16 ;
while ( r > 0 ) {
d = s / r ;
s %= r ;
r /= 16 ;
( * pc -> decoder -> filter_function ) ( mbfl_hexchar_table [ d ] , pc -> decoder ) ;
}
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
default : if ( c == 0x26 ) {
pc -> status = 1 ;
}
else {
( * pc -> decoder -> filter_function ) ( c , pc -> decoder ) ;
}
break ;
}
return c ;
} |
-4,558,261,210,024,070,700 | chrome | 4 | 0 | void * xmlLinkGetData ( xmlLinkPtr lk ) {
if ( lk == NULL ) return ( NULL ) ;
return lk -> data ;
} |
-7,187,272,991,279,784,000 | debian | 41 | 0 | static unsigned long sun4m_load_kernel ( const char * kernel_filename , const char * initrd_filename , ram_addr_t RAM_size ) {
int linux_boot ;
unsigned int i ;
long initrd_size , kernel_size ;
uint8_t * ptr ;
linux_boot = ( kernel_filename != NULL ) ;
kernel_size = 0 ;
if ( linux_boot ) {
int bswap_needed ;
# ifdef BSWAP_NEEDED bswap_needed = 1 ;
# else bswap_needed = 0 ;
# endif kernel_size = load_elf ( kernel_filename , translate_kernel_address , NULL , NULL , NULL , NULL , 1 , ELF_MACHINE , 0 ) ;
if ( kernel_size < 0 ) kernel_size = load_aout ( kernel_filename , KERNEL_LOAD_ADDR , RAM_size - KERNEL_LOAD_ADDR , bswap_needed , TARGET_PAGE_SIZE ) ;
if ( kernel_size < 0 ) kernel_size = load_image_targphys ( kernel_filename , KERNEL_LOAD_ADDR , RAM_size - KERNEL_LOAD_ADDR ) ;
if ( kernel_size < 0 ) {
fprintf ( stderr , "qemu: could not load kernel '%s'\n" , kernel_filename ) ;
exit ( 1 ) ;
}
initrd_size = 0 ;
if ( initrd_filename ) {
initrd_size = load_image_targphys ( initrd_filename , INITRD_LOAD_ADDR , RAM_size - INITRD_LOAD_ADDR ) ;
if ( initrd_size < 0 ) {
fprintf ( stderr , "qemu: could not load initial ram disk '%s'\n" , initrd_filename ) ;
exit ( 1 ) ;
}
}
if ( initrd_size > 0 ) {
for ( i = 0 ;
i < 64 * TARGET_PAGE_SIZE ;
i += TARGET_PAGE_SIZE ) {
ptr = rom_ptr ( KERNEL_LOAD_ADDR + i ) ;
if ( ldl_p ( ptr ) == 0x48647253 ) {
stl_p ( ptr + 16 , INITRD_LOAD_ADDR ) ;
stl_p ( ptr + 20 , initrd_size ) ;
break ;
}
}
}
}
return kernel_size ;
} |
-5,706,788,925,640,467,000 | chrome | 27 | 0 | static void encode_tiles ( VP9_COMP * cpi ) {
const VP9_COMMON * const cm = & cpi -> common ;
const int tile_cols = 1 << cm -> log2_tile_cols ;
const int tile_rows = 1 << cm -> log2_tile_rows ;
int tile_col , tile_row ;
TOKENEXTRA * tok = cpi -> tok ;
for ( tile_row = 0 ;
tile_row < tile_rows ;
++ tile_row ) {
for ( tile_col = 0 ;
tile_col < tile_cols ;
++ tile_col ) {
TileInfo tile ;
TOKENEXTRA * old_tok = tok ;
int mi_row ;
vp9_tile_init ( & tile , cm , tile_row , tile_col ) ;
for ( mi_row = tile . mi_row_start ;
mi_row < tile . mi_row_end ;
mi_row += MI_BLOCK_SIZE ) {
if ( cpi -> sf . use_nonrd_pick_mode && ! frame_is_intra_only ( cm ) ) encode_nonrd_sb_row ( cpi , & tile , mi_row , & tok ) ;
else encode_rd_sb_row ( cpi , & tile , mi_row , & tok ) ;
}
cpi -> tok_count [ tile_row ] [ tile_col ] = ( unsigned int ) ( tok - old_tok ) ;
assert ( tok - cpi -> tok <= get_token_alloc ( cm -> mb_rows , cm -> mb_cols ) ) ;
}
}
} |
8,572,106,347,813,672,000 | debian | 7 | 0 | static inline int pfkey_sockaddr_len ( sa_family_t family ) {
switch ( family ) {
case AF_INET : return sizeof ( struct sockaddr_in ) ;
# if IS_ENABLED ( CONFIG_IPV6 ) case AF_INET6 : return sizeof ( struct sockaddr_in6 ) ;
# endif }
return 0 ;
} |
7,651,945,086,108,393,000 | debian | 95 | 0 | int qemuMonitorJSONGetMemoryStats ( qemuMonitorPtr mon , virDomainMemoryStatPtr stats , unsigned int nr_stats ) {
int ret ;
int got = 0 ;
virJSONValuePtr cmd = qemuMonitorJSONMakeCommand ( "query-balloon" , NULL ) ;
virJSONValuePtr reply = NULL ;
if ( ! cmd ) return - 1 ;
ret = qemuMonitorJSONCommand ( mon , cmd , & reply ) ;
if ( ret == 0 ) {
if ( qemuMonitorJSONHasError ( reply , "DeviceNotActive" ) || qemuMonitorJSONHasError ( reply , "KVMMissingCap" ) ) goto cleanup ;
ret = qemuMonitorJSONCheckError ( cmd , reply ) ;
if ( ret == 0 ) {
virJSONValuePtr data ;
unsigned long long mem ;
if ( ! ( data = virJSONValueObjectGet ( reply , "return" ) ) ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing return data" ) ) ;
ret = - 1 ;
goto cleanup ;
}
if ( virJSONValueObjectHasKey ( data , "actual" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "actual" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon actual" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_ACTUAL_BALLOON ;
stats [ got ] . val = ( mem / 1024 ) ;
got ++ ;
}
if ( virJSONValueObjectHasKey ( data , "mem_swapped_in" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "mem_swapped_in" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon mem_swapped_in" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_SWAP_IN ;
stats [ got ] . val = ( mem / 1024 ) ;
got ++ ;
}
if ( virJSONValueObjectHasKey ( data , "mem_swapped_out" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "mem_swapped_out" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon mem_swapped_out" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_SWAP_OUT ;
stats [ got ] . val = ( mem / 1024 ) ;
got ++ ;
}
if ( virJSONValueObjectHasKey ( data , "major_page_faults" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "major_page_faults" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon major_page_faults" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_MAJOR_FAULT ;
stats [ got ] . val = mem ;
got ++ ;
}
if ( virJSONValueObjectHasKey ( data , "minor_page_faults" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "minor_page_faults" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon minor_page_faults" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_MINOR_FAULT ;
stats [ got ] . val = mem ;
got ++ ;
}
if ( virJSONValueObjectHasKey ( data , "free_mem" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "free_mem" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon free_mem" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_UNUSED ;
stats [ got ] . val = ( mem / 1024 ) ;
got ++ ;
}
if ( virJSONValueObjectHasKey ( data , "total_mem" ) && ( got < nr_stats ) ) {
if ( virJSONValueObjectGetNumberUlong ( data , "total_mem" , & mem ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "info balloon reply was missing balloon total_mem" ) ) ;
ret = - 1 ;
goto cleanup ;
}
stats [ got ] . tag = VIR_DOMAIN_MEMORY_STAT_AVAILABLE ;
stats [ got ] . val = ( mem / 1024 ) ;
got ++ ;
}
}
}
if ( got > 0 ) ret = got ;
cleanup : virJSONValueFree ( cmd ) ;
virJSONValueFree ( reply ) ;
return ret ;
} |
-8,884,965,407,551,054,000 | debian | 31 | 0 | static void DecoderProcessSpu ( decoder_t * p_dec , block_t * p_block , bool b_flush ) {
decoder_owner_sys_t * p_owner = p_dec -> p_owner ;
input_thread_t * p_input = p_owner -> p_input ;
vout_thread_t * p_vout ;
subpicture_t * p_spu ;
while ( ( p_spu = p_dec -> pf_decode_sub ( p_dec , p_block ? & p_block : NULL ) ) ) {
if ( p_input != NULL ) {
vlc_mutex_lock ( & p_input -> p -> counters . counters_lock ) ;
stats_Update ( p_input -> p -> counters . p_decoded_sub , 1 , NULL ) ;
vlc_mutex_unlock ( & p_input -> p -> counters . counters_lock ) ;
}
p_vout = input_resource_HoldVout ( p_owner -> p_resource ) ;
if ( p_vout && p_owner -> p_spu_vout == p_vout ) {
if ( p_spu -> i_start > VLC_TS_INVALID && p_spu -> i_start < p_owner -> i_preroll_end && ( p_spu -> i_stop <= VLC_TS_INVALID || p_spu -> i_stop < p_owner -> i_preroll_end ) ) {
subpicture_Delete ( p_spu ) ;
}
else {
DecoderPlaySpu ( p_dec , p_spu ) ;
}
}
else {
subpicture_Delete ( p_spu ) ;
}
if ( p_vout ) vlc_object_release ( p_vout ) ;
}
if ( b_flush && p_owner -> p_spu_vout ) {
p_vout = input_resource_HoldVout ( p_owner -> p_resource ) ;
if ( p_vout && p_owner -> p_spu_vout == p_vout ) vout_FlushSubpictureChannel ( p_vout , p_owner -> i_spu_channel ) ;
if ( p_vout ) vlc_object_release ( p_vout ) ;
}
} |
7,092,216,800,726,730,000 | debian | 4 | 0 | int dissect_h245_MulticastAddress ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
offset = dissect_per_choice ( tvb , offset , actx , tree , hf_index , ett_h245_MulticastAddress , MulticastAddress_choice , NULL ) ;
return offset ;
} |
-7,076,754,245,473,579,000 | chrome | 13 | 0 | static int evhttp_append_to_last_header ( struct evkeyvalq * headers , const char * line ) {
struct evkeyval * header = TAILQ_LAST ( headers , evkeyvalq ) ;
char * newval ;
size_t old_len , line_len ;
if ( header == NULL ) return ( - 1 ) ;
old_len = strlen ( header -> value ) ;
line_len = strlen ( line ) ;
newval = realloc ( header -> value , old_len + line_len + 1 ) ;
if ( newval == NULL ) return ( - 1 ) ;
memcpy ( newval + old_len , line , line_len + 1 ) ;
header -> value = newval ;
return ( 0 ) ;
} |
-1,658,505,547,857,059,300 | debian | 47 | 1 | int ff_h264_fill_default_ref_list ( H264Context * h ) {
int i , len ;
if ( h -> slice_type_nos == AV_PICTURE_TYPE_B ) {
Picture * sorted [ 32 ] ;
int cur_poc , list ;
int lens [ 2 ] ;
if ( FIELD_PICTURE ) cur_poc = h -> cur_pic_ptr -> field_poc [ h -> picture_structure == PICT_BOTTOM_FIELD ] ;
else cur_poc = h -> cur_pic_ptr -> poc ;
for ( list = 0 ;
list < 2 ;
list ++ ) {
len = add_sorted ( sorted , h -> short_ref , h -> short_ref_count , cur_poc , 1 ^ list ) ;
len += add_sorted ( sorted + len , h -> short_ref , h -> short_ref_count , cur_poc , 0 ^ list ) ;
assert ( len <= 32 ) ;
len = build_def_list ( h -> default_ref_list [ list ] , sorted , len , 0 , h -> picture_structure ) ;
len += build_def_list ( h -> default_ref_list [ list ] + len , h -> long_ref , 16 , 1 , h -> picture_structure ) ;
assert ( len <= 32 ) ;
if ( len < h -> ref_count [ list ] ) memset ( & h -> default_ref_list [ list ] [ len ] , 0 , sizeof ( Picture ) * ( h -> ref_count [ list ] - len ) ) ;
lens [ list ] = len ;
}
if ( lens [ 0 ] == lens [ 1 ] && lens [ 1 ] > 1 ) {
for ( i = 0 ;
h -> default_ref_list [ 0 ] [ i ] . f . data [ 0 ] == h -> default_ref_list [ 1 ] [ i ] . f . data [ 0 ] && i < lens [ 0 ] ;
i ++ ) ;
if ( i == lens [ 0 ] ) FFSWAP ( Picture , h -> default_ref_list [ 1 ] [ 0 ] , h -> default_ref_list [ 1 ] [ 1 ] ) ;
}
}
else {
len = build_def_list ( h -> default_ref_list [ 0 ] , h -> short_ref , h -> short_ref_count , 0 , h -> picture_structure ) ;
len += build_def_list ( h -> default_ref_list [ 0 ] + len , h -> long_ref , 16 , 1 , h -> picture_structure ) ;
assert ( len <= 32 ) ;
if ( len < h -> ref_count [ 0 ] ) memset ( & h -> default_ref_list [ 0 ] [ len ] , 0 , sizeof ( Picture ) * ( h -> ref_count [ 0 ] - len ) ) ;
}
# ifdef TRACE for ( i = 0 ;
i < h -> ref_count [ 0 ] ;
i ++ ) {
tprintf ( h -> avctx , "List0: %s fn:%d 0x%p\n" , ( h -> default_ref_list [ 0 ] [ i ] . long_ref ? "LT" : "ST" ) , h -> default_ref_list [ 0 ] [ i ] . pic_id , h -> default_ref_list [ 0 ] [ i ] . f . data [ 0 ] ) ;
}
if ( h -> slice_type_nos == AV_PICTURE_TYPE_B ) {
for ( i = 0 ;
i < h -> ref_count [ 1 ] ;
i ++ ) {
tprintf ( h -> avctx , "List1: %s fn:%d 0x%p\n" , ( h -> default_ref_list [ 1 ] [ i ] . long_ref ? "LT" : "ST" ) , h -> default_ref_list [ 1 ] [ i ] . pic_id , h -> default_ref_list [ 1 ] [ i ] . f . data [ 0 ] ) ;
}
}
# endif return 0 ;
} |
5,045,872,831,385,413,000 | debian | 23 | 0 | static int dissect_btgatt_microbit_pin_data ( tvbuff_t * tvb , packet_info * pinfo _U_ , proto_tree * tree , void * data ) {
btatt_data_t * att_data = ( btatt_data_t * ) data ;
proto_item * sub_item ;
proto_tree * sub_tree ;
gint offset = 0 ;
gint num_pins ;
guint32 number , value ;
if ( bluetooth_gatt_has_no_parameter ( att_data -> opcode ) ) return - 1 ;
num_pins = tvb_captured_length ( tvb ) / 2 ;
for ( gint i = 0 ;
i < num_pins ;
i ++ ) {
sub_item = proto_tree_add_item ( tree , hf_gatt_microbit_pin_data , tvb , offset , 2 , ENC_NA ) ;
sub_tree = proto_item_add_subtree ( sub_item , ett_btgatt_microbit_pin_data ) ;
proto_tree_add_item_ret_uint ( sub_tree , hf_gatt_microbit_pin_number , tvb , offset , 1 , ENC_NA , & number ) ;
offset ++ ;
value = tvb_get_guint8 ( tvb , offset ) * 4 ;
proto_tree_add_uint ( sub_tree , hf_gatt_microbit_pin_value , tvb , offset , 1 , value ) ;
offset ++ ;
proto_item_set_text ( sub_item , "Pin %u: %u" , number , value ) ;
}
return offset ;
} |
7,092,216,800,726,730,000 | debian | 7 | 0 | static int dissect_h245_GenericCapability ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
# line 664 "../../asn1/h245/h245.cnf" void * priv_data = actx -> private_data ;
actx -> private_data = gef_ctx_alloc ( NULL , "GenericCapability" ) ;
offset = dissect_per_sequence ( tvb , offset , actx , tree , hf_index , ett_h245_GenericCapability , GenericCapability_sequence ) ;
# line 667 "../../asn1/h245/h245.cnf" actx -> private_data = priv_data ;
return offset ;
} |
-3,740,862,514,502,467,000 | debian | 6 | 0 | static void dumpcffheader ( FILE * cfff ) {
putc ( '\1' , cfff ) ;
putc ( '\0' , cfff ) ;
putc ( '\4' , cfff ) ;
putc ( '\4' , cfff ) ;
} |
6,249,489,553,242,543,000 | debian | 11 | 0 | static void destroy_int_fifo ( int_fifo * fifo ) {
int_node * i_n ;
if ( fifo != NULL ) {
do {
UNLINK_FIFO ( i_n , * fifo , link ) ;
if ( i_n != NULL ) free ( i_n ) ;
}
while ( i_n != NULL ) ;
free ( fifo ) ;
}
} |
-7,334,302,271,653,595,000 | debian | 22 | 0 | void mark_select_range_as_dependent ( THD * thd , SELECT_LEX * last_select , SELECT_LEX * current_sel , Field * found_field , Item * found_item , Item_ident * resolved_item ) {
SELECT_LEX * previous_select = current_sel ;
for ( ;
previous_select -> outer_select ( ) != last_select ;
previous_select = previous_select -> outer_select ( ) ) {
Item_subselect * prev_subselect_item = previous_select -> master_unit ( ) -> item ;
prev_subselect_item -> used_tables_cache |= OUTER_REF_TABLE_BIT ;
prev_subselect_item -> const_item_cache = 0 ;
}
{
Item_subselect * prev_subselect_item = previous_select -> master_unit ( ) -> item ;
Item_ident * dependent = resolved_item ;
if ( found_field == view_ref_found ) {
Item : : Type type = found_item -> type ( ) ;
prev_subselect_item -> used_tables_cache |= found_item -> used_tables ( ) ;
dependent = ( ( type == Item : : REF_ITEM || type == Item : : FIELD_ITEM ) ? ( Item_ident * ) found_item : 0 ) ;
}
else prev_subselect_item -> used_tables_cache |= found_field -> table -> map ;
prev_subselect_item -> const_item_cache = 0 ;
mark_as_dependent ( thd , last_select , current_sel , resolved_item , dependent ) ;
}
} |
-5,420,171,864,670,539,000 | debian | 24 | 0 | static void qemu_cpu_kick_thread ( CPUState * cpu ) {
# ifndef _WIN32 int err ;
err = pthread_kill ( cpu -> thread -> thread , SIG_IPI ) ;
if ( err ) {
fprintf ( stderr , "qemu:%s: %s" , __func__ , strerror ( err ) ) ;
exit ( 1 ) ;
}
# else if ( ! qemu_cpu_is_self ( cpu ) ) {
CONTEXT tcgContext ;
if ( SuspendThread ( cpu -> hThread ) == ( DWORD ) - 1 ) {
fprintf ( stderr , "qemu:%s: GetLastError:%lu\n" , __func__ , GetLastError ( ) ) ;
exit ( 1 ) ;
}
tcgContext . ContextFlags = CONTEXT_CONTROL ;
while ( GetThreadContext ( cpu -> hThread , & tcgContext ) != 0 ) {
continue ;
}
cpu_signal ( 0 ) ;
if ( ResumeThread ( cpu -> hThread ) == ( DWORD ) - 1 ) {
fprintf ( stderr , "qemu:%s: GetLastError:%lu\n" , __func__ , GetLastError ( ) ) ;
exit ( 1 ) ;
}
}
# endif } |
7,863,876,744,031,385,000 | debian | 8 | 0 | int fts_build_mail ( struct fts_backend_update_context * update_ctx , struct mail * mail ) {
int ret ;
T_BEGIN {
ret = fts_build_mail_real ( update_ctx , mail ) ;
}
T_END ;
return ret ;
} |
-8,933,711,118,846,966,000 | debian | 14 | 0 | static void cirrus_vga_class_init ( ObjectClass * klass , void * data ) {
DeviceClass * dc = DEVICE_CLASS ( klass ) ;
PCIDeviceClass * k = PCI_DEVICE_CLASS ( klass ) ;
k -> realize = pci_cirrus_vga_realize ;
k -> romfile = VGABIOS_CIRRUS_FILENAME ;
k -> vendor_id = PCI_VENDOR_ID_CIRRUS ;
k -> device_id = CIRRUS_ID_CLGD5446 ;
k -> class_id = PCI_CLASS_DISPLAY_VGA ;
set_bit ( DEVICE_CATEGORY_DISPLAY , dc -> categories ) ;
dc -> desc = "Cirrus CLGD 54xx VGA" ;
dc -> vmsd = & vmstate_pci_cirrus_vga ;
dc -> props = pci_vga_cirrus_properties ;
dc -> hotpluggable = false ;
} |
4,511,225,370,772,574,700 | debian | 13 | 0 | PHP_FUNCTION ( uwsgi_cache_exists ) {
char * key = NULL ;
int keylen = 0 ;
char * cache = NULL ;
int cachelen = 0 ;
if ( zend_parse_parameters ( ZEND_NUM_ARGS ( ) TSRMLS_CC , "s|s" , & key , & keylen , & cache , & cachelen ) == FAILURE ) {
RETURN_NULL ( ) ;
}
if ( uwsgi_cache_magic_exists ( key , keylen , cache ) ) {
RETURN_TRUE ;
}
RETURN_NULL ( ) ;
} |
-8,199,454,075,838,226,000 | debian | 183 | 0 | void proto_register_amf ( void ) {
static hf_register_info hf [ ] = {
{
& hf_amf_version , {
"AMF version" , "amf.version" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_header_count , {
"Header count" , "amf.header_count" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_header_name , {
"Name" , "amf.header.name" , FT_UINT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_header_must_understand , {
"Must understand" , "amf.header.must_understand" , FT_BOOLEAN , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_header_length , {
"Length" , "amf.header.length" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, # if 0 {
& hf_amf_header_value_type , {
"Value type" , "amf.header.value_type" , FT_UINT32 , BASE_HEX , VALS ( rtmpt_type_vals ) , 0x0 , NULL , HFILL }
}
, # endif {
& hf_amf_message_count , {
"Message count" , "amf.message_count" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_message_target_uri , {
"Target URI" , "amf.message.target_uri" , FT_UINT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_message_response_uri , {
"Response URI" , "amf.message.response_uri" , FT_UINT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_message_length , {
"Length" , "amf.message.length" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_amf0_type , {
"AMF0 type" , "amf.amf0_type" , FT_UINT8 , BASE_HEX , VALS ( amf0_type_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_amf_amf3_type , {
"AMF3 type" , "amf.amf3_type" , FT_UINT8 , BASE_HEX , VALS ( amf3_type_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_amf_number , {
"Number" , "amf.number" , FT_DOUBLE , BASE_NONE , NULL , 0x0 , "AMF number" , HFILL }
}
, {
& hf_amf_integer , {
"Integer" , "amf.integer" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "RTMPT AMF3 integer" , HFILL }
}
, {
& hf_amf_boolean , {
"Boolean" , "amf.boolean" , FT_BOOLEAN , BASE_NONE , NULL , 0x0 , "AMF boolean" , HFILL }
}
, {
& hf_amf_stringlength , {
"String length" , "amf.stringlength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF string length" , HFILL }
}
, {
& hf_amf_string , {
"String" , "amf.string" , FT_STRING , BASE_NONE , NULL , 0x0 , "AMF string" , HFILL }
}
, {
& hf_amf_string_reference , {
"String reference" , "amf.string_reference" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "RTMPT AMF3 string reference" , HFILL }
}
, {
& hf_amf_object_reference , {
"Object reference" , "amf.object_reference" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF object reference" , HFILL }
}
, {
& hf_amf_date , {
"Date" , "amf.date" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_LOCAL , NULL , 0x0 , "AMF date" , HFILL }
}
, # if 0 {
& hf_amf_longstringlength , {
"String length" , "amf.longstringlength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF long string length" , HFILL }
}
, # endif {
& hf_amf_longstring , {
"Long string" , "amf.longstring" , FT_STRING , BASE_NONE , NULL , 0x0 , "AMF long string" , HFILL }
}
, {
& hf_amf_xml_doc , {
"XML document" , "amf.xml_doc" , FT_STRING , BASE_NONE , NULL , 0x0 , "AMF XML document" , HFILL }
}
, {
& hf_amf_xmllength , {
"XML text length" , "amf.xmllength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF E4X XML length" , HFILL }
}
, {
& hf_amf_xml , {
"XML" , "amf.xml" , FT_STRING , BASE_NONE , NULL , 0x0 , "AMF E4X XML" , HFILL }
}
, {
& hf_amf_int64 , {
"Int64" , "amf.int64" , FT_INT64 , BASE_DEC , NULL , 0x0 , "AMF int64" , HFILL }
}
, {
& hf_amf_bytearraylength , {
"ByteArray length" , "amf.bytearraylength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "RTMPT AMF3 ByteArray length" , HFILL }
}
, {
& hf_amf_bytearray , {
"ByteArray" , "amf.bytearray" , FT_BYTES , BASE_NONE , NULL , 0x0 , "RTMPT AMF3 ByteArray" , HFILL }
}
, {
& hf_amf_object , {
"Object" , "amf.object" , FT_NONE , BASE_NONE , NULL , 0x0 , "AMF object" , HFILL }
}
, {
& hf_amf_traitcount , {
"Trait count" , "amf.traitcount" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF count of traits for an object" , HFILL }
}
, {
& hf_amf_classnamelength , {
"Class name length" , "amf.classnamelength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF class name length" , HFILL }
}
, {
& hf_amf_classname , {
"Class name" , "amf.classname" , FT_STRING , BASE_NONE , NULL , 0x0 , "AMF class name" , HFILL }
}
, {
& hf_amf_membernamelength , {
"Member name length" , "amf.membernamelength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF member name length" , HFILL }
}
, {
& hf_amf_membername , {
"Member name" , "amf.membername" , FT_STRING , BASE_NONE , NULL , 0x0 , "AMF member name" , HFILL }
}
, {
& hf_amf_trait_reference , {
"Trait reference" , "amf.trait_reference" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF trait reference" , HFILL }
}
, {
& hf_amf_ecmaarray , {
"ECMA array" , "amf.ecmaarray" , FT_NONE , BASE_NONE , NULL , 0x0 , "AMF ECMA array" , HFILL }
}
, {
& hf_amf_strictarray , {
"Strict array" , "amf.strictarray" , FT_NONE , BASE_NONE , NULL , 0x0 , "AMF strict array" , HFILL }
}
, {
& hf_amf_array , {
"Array" , "amf.array" , FT_NONE , BASE_NONE , NULL , 0x0 , "RTMPT AMF3 array" , HFILL }
}
, {
& hf_amf_arraylength , {
"Array length" , "amf.arraylength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF array length" , HFILL }
}
, {
& hf_amf_arraydenselength , {
"Length of dense portion" , "amf.arraydenselength" , FT_UINT32 , BASE_DEC , NULL , 0x0 , "AMF length of dense portion of array" , HFILL }
}
, {
& hf_amf_end_of_object_marker , {
"End Of Object Marker" , "amf.end_of_object_marker" , FT_NONE , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_end_of_associative_part , {
"End of associative part" , "amf.end_of_associative_part" , FT_NONE , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_amf_end_of_dynamic_members , {
"End Of dynamic members" , "amf.end_of_dynamic_members" , FT_NONE , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, }
;
static gint * ett [ ] = {
& ett_amf , & ett_amf_headers , & ett_amf_messages , & ett_amf_value , & ett_amf_property , & ett_amf_string , & ett_amf_array_element , & ett_amf_traits , & ett_amf_trait_member , }
;
proto_amf = proto_register_protocol ( "Action Message Format" , "AMF" , "amf" ) ;
proto_register_field_array ( proto_amf , hf , array_length ( hf ) ) ;
proto_register_subtree_array ( ett , array_length ( ett ) ) ;
} |
-7,137,859,843,679,923,000 | chrome | 3 | 0 | static void inter_predictor ( const uint8_t * src , int src_stride , uint8_t * dst , int dst_stride , const int subpel_x , const int subpel_y , const struct scale_factors * sf , int w , int h , int ref , const InterpKernel * kernel , int xs , int ys ) {
sf -> predict [ subpel_x != 0 ] [ subpel_y != 0 ] [ ref ] ( src , src_stride , dst , dst_stride , kernel [ subpel_x ] , xs , kernel [ subpel_y ] , ys , w , h ) ;
} |
6,415,329,349,331,063,000 | chrome | 11 | 0 | static void http_chunked_cb ( struct evhttp_request * req , void * arg ) {
struct timeval when = {
0 , 0 }
;
struct chunk_req_state * state = malloc ( sizeof ( struct chunk_req_state ) ) ;
event_debug ( ( "%s: called\n" , __func__ ) ) ;
memset ( state , 0 , sizeof ( struct chunk_req_state ) ) ;
state -> req = req ;
evhttp_send_reply_start ( req , HTTP_OK , "Everything is fine" ) ;
event_once ( - 1 , EV_TIMEOUT , http_chunked_trickle_cb , state , & when ) ;
} |
-5,268,859,819,325,808,000 | debian | 46 | 0 | void nautilus_directory_monitor_add_internal ( NautilusDirectory * directory , NautilusFile * file , gconstpointer client , gboolean monitor_hidden_files , NautilusFileAttributes file_attributes , NautilusDirectoryCallback callback , gpointer callback_data ) {
Monitor * monitor ;
GList * file_list ;
char * file_uri = NULL ;
char * dir_uri = NULL ;
g_assert ( NAUTILUS_IS_DIRECTORY ( directory ) ) ;
if ( file != NULL ) {
file_uri = nautilus_file_get_uri ( file ) ;
}
if ( directory != NULL ) {
dir_uri = nautilus_directory_get_uri ( directory ) ;
}
nautilus_profile_start ( "uri %s file-uri %s client %p" , dir_uri , file_uri , client ) ;
g_free ( dir_uri ) ;
g_free ( file_uri ) ;
remove_monitor ( directory , file , client ) ;
monitor = g_new ( Monitor , 1 ) ;
monitor -> file = file ;
monitor -> monitor_hidden_files = monitor_hidden_files ;
monitor -> client = client ;
monitor -> request = nautilus_directory_set_up_request ( file_attributes ) ;
if ( file == NULL ) {
REQUEST_SET_TYPE ( monitor -> request , REQUEST_FILE_LIST ) ;
}
directory -> details -> monitor_list = g_list_prepend ( directory -> details -> monitor_list , monitor ) ;
request_counter_add_request ( directory -> details -> monitor_counters , monitor -> request ) ;
if ( callback != NULL ) {
file_list = nautilus_directory_get_file_list ( directory ) ;
( * callback ) ( directory , file_list , callback_data ) ;
nautilus_file_list_free ( file_list ) ;
}
if ( directory -> details -> monitor == NULL ) {
directory -> details -> monitor = nautilus_monitor_directory ( directory -> details -> location ) ;
}
if ( REQUEST_WANTS_TYPE ( monitor -> request , REQUEST_FILE_INFO ) && directory -> details -> mime_db_monitor == 0 ) {
directory -> details -> mime_db_monitor = g_signal_connect_object ( nautilus_signaller_get_current ( ) , "mime-data-changed" , G_CALLBACK ( mime_db_changed_callback ) , directory , 0 ) ;
}
if ( file != NULL ) {
nautilus_directory_add_file_to_work_queue ( directory , file ) ;
}
else {
add_all_files_to_work_queue ( directory ) ;
}
nautilus_directory_async_state_changed ( directory ) ;
nautilus_profile_end ( NULL ) ;
} |
-1,676,420,406,744,178,400 | debian | 4 | 0 | char * _ksba_oid_node_to_str ( const unsigned char * image , AsnNode node ) {
if ( ! node || node -> type != TYPE_OBJECT_ID || node -> off == - 1 ) return NULL ;
return ksba_oid_to_str ( image + node -> off + node -> nhdr , node -> len ) ;
} |
3,919,646,340,804,521,500 | debian | 10 | 0 | static int mark_tagged ( const char * path , const struct object_id * oid , int flag , void * cb_data ) {
unsigned char peeled [ 20 ] ;
struct object_entry * entry = packlist_find ( & to_pack , oid -> hash , NULL ) ;
if ( entry ) entry -> tagged = 1 ;
if ( ! peel_ref ( path , peeled ) ) {
entry = packlist_find ( & to_pack , peeled , NULL ) ;
if ( entry ) entry -> tagged = 1 ;
}
return 0 ;
} |
-2,614,908,340,588,220,400 | chrome | 9 | 0 | TEST_P ( GLES2DecoderTestWithCHROMIUMPathRendering , IsPathCHROMIUMInvalidArgsBadSharedMemoryId ) {
EXPECT_CALL ( * gl_ , IsPathNV ( kServicePathId ) ) . Times ( 0 ) ;
SpecializedSetup < cmds : : IsPathCHROMIUM , 0 > ( false ) ;
cmds : : IsPathCHROMIUM cmd ;
cmd . Init ( client_path_id_ , kInvalidSharedMemoryId , shared_memory_offset_ ) ;
EXPECT_EQ ( error : : kOutOfBounds , ExecuteCmd ( cmd ) ) ;
cmd . Init ( client_path_id_ , shared_memory_id_ , kInvalidSharedMemoryOffset ) ;
EXPECT_EQ ( error : : kOutOfBounds , ExecuteCmd ( cmd ) ) ;
} |
-1,055,531,103,257,174,900 | debian | 7 | 0 | static void sig_nick_removed ( CHANNEL_REC * channel , NICK_REC * nick ) {
MODULE_CHANNEL_REC * mchannel ;
LAST_MSG_REC * rec ;
mchannel = MODULE_DATA ( channel ) ;
rec = last_msg_find ( mchannel -> lastmsgs , nick -> nick ) ;
if ( rec != NULL ) last_msg_destroy ( & mchannel -> lastmsgs , rec ) ;
} |
7,191,899,184,788,440,000 | debian | 107 | 0 | int main ( int argc , char * argv [ ] ) {
char buff [ 80 ] ;
MY_INIT ( argv [ 0 ] ) ;
DBUG_ENTER ( "main" ) ;
DBUG_PROCESS ( argv [ 0 ] ) ;
charset_index = get_command_index ( 'C' ) ;
delimiter_index = get_command_index ( 'd' ) ;
delimiter_str = delimiter ;
default_prompt = my_strdup ( getenv ( "MYSQL_PS1" ) ? getenv ( "MYSQL_PS1" ) : "\\N [\\d]> " , MYF ( MY_WME ) ) ;
current_prompt = my_strdup ( default_prompt , MYF ( MY_WME ) ) ;
prompt_counter = 0 ;
aborted = 0 ;
outfile [ 0 ] = 0 ;
strmov ( pager , "stdout" ) ;
{
char * tmp = getenv ( "PAGER" ) ;
if ( tmp && strlen ( tmp ) ) {
default_pager_set = 1 ;
strmov ( default_pager , tmp ) ;
}
}
if ( ! isatty ( 0 ) || ! isatty ( 1 ) ) {
status . batch = 1 ;
opt_silent = 1 ;
ignore_errors = 0 ;
}
else status . add_to_history = 1 ;
status . exit_status = 1 ;
{
int stdout_fileno_copy ;
stdout_fileno_copy = dup ( fileno ( stdout ) ) ;
if ( stdout_fileno_copy == - 1 ) fclose ( stdout ) ;
else close ( stdout_fileno_copy ) ;
}
if ( load_defaults ( "my" , load_default_groups , & argc , & argv ) ) {
my_end ( 0 ) ;
exit ( 1 ) ;
}
defaults_argv = argv ;
if ( get_options ( argc , ( char * * ) argv ) ) {
free_defaults ( defaults_argv ) ;
my_end ( 0 ) ;
exit ( 1 ) ;
}
if ( status . batch && ! status . line_buff && ! ( status . line_buff = batch_readline_init ( MAX_BATCH_BUFFER_SIZE , stdin ) ) ) {
put_info ( "Can't initialize batch_readline - may be the input source is " "a directory or a block device." , INFO_ERROR , 0 ) ;
free_defaults ( defaults_argv ) ;
my_end ( 0 ) ;
exit ( 1 ) ;
}
if ( mysql_server_init ( embedded_server_arg_count , embedded_server_args , ( char * * ) embedded_server_groups ) ) {
put_error ( NULL ) ;
free_defaults ( defaults_argv ) ;
my_end ( 0 ) ;
exit ( 1 ) ;
}
glob_buffer . realloc ( 512 ) ;
completion_hash_init ( & ht , 128 ) ;
init_alloc_root ( & hash_mem_root , 16384 , 0 ) ;
bzero ( ( char * ) & mysql , sizeof ( mysql ) ) ;
if ( sql_connect ( current_host , current_db , current_user , opt_password , opt_silent ) ) {
quick = 1 ;
status . exit_status = 1 ;
mysql_end ( - 1 ) ;
}
if ( ! status . batch ) ignore_errors = 1 ;
if ( opt_sigint_ignore ) signal ( SIGINT , SIG_IGN ) ;
else signal ( SIGINT , handle_sigint ) ;
signal ( SIGQUIT , mysql_end ) ;
# if defined ( HAVE_TERMIOS_H ) && defined ( GWINSZ_IN_SYS_IOCTL ) signal ( SIGWINCH , window_resize ) ;
window_resize ( 0 ) ;
# endif put_info ( "Welcome to the MariaDB monitor. Commands end with ;
or \\g." , INFO_INFO ) ;
my_snprintf ( ( char * ) glob_buffer . ptr ( ) , glob_buffer . alloced_length ( ) , "Your %s connection id is %lu\nServer version: %s\n" , mysql_get_server_name ( & mysql ) , mysql_thread_id ( & mysql ) , server_version_string ( & mysql ) ) ;
put_info ( ( char * ) glob_buffer . ptr ( ) , INFO_INFO ) ;
put_info ( ORACLE_WELCOME_COPYRIGHT_NOTICE ( "2000" ) , INFO_INFO ) ;
# ifdef HAVE_READLINE initialize_readline ( ( char * ) my_progname ) ;
if ( ! status . batch && ! quick && ! opt_html && ! opt_xml ) {
if ( getenv ( "MYSQL_HISTFILE" ) ) histfile = my_strdup ( getenv ( "MYSQL_HISTFILE" ) , MYF ( MY_WME ) ) ;
else if ( getenv ( "HOME" ) ) {
histfile = ( char * ) my_malloc ( ( uint ) strlen ( getenv ( "HOME" ) ) + ( uint ) strlen ( "/.mysql_history" ) + 2 , MYF ( MY_WME ) ) ;
if ( histfile ) sprintf ( histfile , "%s/.mysql_history" , getenv ( "HOME" ) ) ;
char link_name [ FN_REFLEN ] ;
if ( my_readlink ( link_name , histfile , 0 ) == 0 && strncmp ( link_name , "/devull" , 10 ) == 0 ) {
my_free ( histfile ) ;
histfile = 0 ;
}
}
if ( histfile && strncmp ( histfile , "/devull" , 10 ) == 0 ) histfile = NULL ;
if ( histfile && histfile [ 0 ] ) {
if ( verbose ) tee_fprintf ( stdout , "Reading history-file %s\n" , histfile ) ;
read_history ( histfile ) ;
if ( ! ( histfile_tmp = ( char * ) my_malloc ( ( uint ) strlen ( histfile ) + 5 , MYF ( MY_WME ) ) ) ) {
fprintf ( stderr , "Couldn't allocate memory for temp histfile!\n" ) ;
exit ( 1 ) ;
}
sprintf ( histfile_tmp , "%s.TMP" , histfile ) ;
}
}
# endif sprintf ( buff , "%s" , "Type 'help;
' or '\\h' for help. Type '\\c' to clear the current input statement.\n" ) ;
put_info ( buff , INFO_INFO ) ;
status . exit_status = read_and_execute ( ! status . batch ) ;
if ( opt_outfile ) end_tee ( ) ;
mysql_end ( 0 ) ;
# ifndef _lint DBUG_RETURN ( 0 ) ;
# endif } |
1,245,821,301,839,614,700 | debian | 8 | 1 | static void mark_trusted_task_done ( GObject * source_object , GAsyncResult * res , gpointer user_data ) {
MarkTrustedJob * job = user_data ;
g_object_unref ( job -> file ) ;
if ( job -> done_callback ) {
job -> done_callback ( ! job_aborted ( ( CommonJob * ) job ) , job -> done_callback_data ) ;
}
finalize_common ( ( CommonJob * ) job ) ;
} |
2,895,622,461,494,525,400 | debian | 14 | 0 | static void test_client_character_set ( ) {
MY_CHARSET_INFO cs ;
char * csname = ( char * ) "utf8" ;
char * csdefault = ( char * ) mysql_character_set_name ( mysql ) ;
int rc ;
myheader ( "test_client_character_set" ) ;
rc = mysql_set_character_set ( mysql , csname ) ;
DIE_UNLESS ( rc == 0 ) ;
mysql_get_character_set_info ( mysql , & cs ) ;
DIE_UNLESS ( ! strcmp ( cs . csname , "utf8" ) ) ;
DIE_UNLESS ( ! strcmp ( cs . name , "utf8_general_ci" ) ) ;
rc = mysql_set_character_set ( mysql , csdefault ) ;
myquery ( rc ) ;
} |
6,667,142,528,452,942,000 | debian | 41 | 0 | static my_bool dump_all_views_in_db ( char * database ) {
char * table ;
uint numrows ;
char table_buff [ NAME_LEN * 2 + 3 ] ;
char hash_key [ 2 * NAME_LEN + 2 ] ;
char * afterdot ;
afterdot = strmov ( hash_key , database ) ;
* afterdot ++ = '.' ;
if ( init_dumping ( database , init_dumping_views ) ) return 1 ;
if ( opt_xml ) print_xml_tag ( md_result_file , "" , "\n" , "database" , "name=" , database , NullS ) ;
if ( lock_tables ) {
DYNAMIC_STRING query ;
init_dynamic_string_checked ( & query , "LOCK TABLES " , 256 , 1024 ) ;
for ( numrows = 0 ;
( table = getTableName ( 1 ) ) ;
) {
char * end = strmov ( afterdot , table ) ;
if ( include_table ( ( uchar * ) hash_key , end - hash_key ) ) {
numrows ++ ;
dynstr_append_checked ( & query , quote_name ( table , table_buff , 1 ) ) ;
dynstr_append_checked ( & query , " READ /*!32311 LOCAL */," ) ;
}
}
if ( numrows && mysql_real_query ( mysql , query . str , query . length - 1 ) ) DB_error ( mysql , "when using LOCK TABLES" ) ;
dynstr_free ( & query ) ;
}
if ( flush_logs ) {
if ( mysql_refresh ( mysql , REFRESH_LOG ) ) DB_error ( mysql , "when doing refresh" ) ;
else verbose_msg ( "-- dump_all_views_in_db : logs flushed successfully!\n" ) ;
}
while ( ( table = getTableName ( 0 ) ) ) {
char * end = strmov ( afterdot , table ) ;
if ( include_table ( ( uchar * ) hash_key , end - hash_key ) ) get_view_structure ( table , database ) ;
}
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" ) ;
return 0 ;
} |
1,223,258,652,239,369,200 | debian | 42 | 0 | PHP_MINIT_FUNCTION ( spl_directory ) {
REGISTER_SPL_STD_CLASS_EX ( SplFileInfo , spl_filesystem_object_new , spl_SplFileInfo_functions ) ;
memcpy ( & spl_filesystem_object_handlers , zend_get_std_object_handlers ( ) , sizeof ( zend_object_handlers ) ) ;
spl_filesystem_object_handlers . clone_obj = spl_filesystem_object_clone ;
spl_filesystem_object_handlers . cast_object = spl_filesystem_object_cast ;
spl_filesystem_object_handlers . get_debug_info = spl_filesystem_object_get_debug_info ;
spl_ce_SplFileInfo -> serialize = zend_class_serialize_deny ;
spl_ce_SplFileInfo -> unserialize = zend_class_unserialize_deny ;
REGISTER_SPL_SUB_CLASS_EX ( DirectoryIterator , SplFileInfo , spl_filesystem_object_new , spl_DirectoryIterator_functions ) ;
zend_class_implements ( spl_ce_DirectoryIterator TSRMLS_CC , 1 , zend_ce_iterator ) ;
REGISTER_SPL_IMPLEMENTS ( DirectoryIterator , SeekableIterator ) ;
spl_ce_DirectoryIterator -> get_iterator = spl_filesystem_dir_get_iterator ;
REGISTER_SPL_SUB_CLASS_EX ( FilesystemIterator , DirectoryIterator , spl_filesystem_object_new , spl_FilesystemIterator_functions ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "CURRENT_MODE_MASK" , SPL_FILE_DIR_CURRENT_MODE_MASK ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "CURRENT_AS_PATHNAME" , SPL_FILE_DIR_CURRENT_AS_PATHNAME ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "CURRENT_AS_FILEINFO" , SPL_FILE_DIR_CURRENT_AS_FILEINFO ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "CURRENT_AS_SELF" , SPL_FILE_DIR_CURRENT_AS_SELF ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "KEY_MODE_MASK" , SPL_FILE_DIR_KEY_MODE_MASK ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "KEY_AS_PATHNAME" , SPL_FILE_DIR_KEY_AS_PATHNAME ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "FOLLOW_SYMLINKS" , SPL_FILE_DIR_FOLLOW_SYMLINKS ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "KEY_AS_FILENAME" , SPL_FILE_DIR_KEY_AS_FILENAME ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "NEW_CURRENT_AND_KEY" , SPL_FILE_DIR_KEY_AS_FILENAME | SPL_FILE_DIR_CURRENT_AS_FILEINFO ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "OTHER_MODE_MASK" , SPL_FILE_DIR_OTHERS_MASK ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "SKIP_DOTS" , SPL_FILE_DIR_SKIPDOTS ) ;
REGISTER_SPL_CLASS_CONST_LONG ( FilesystemIterator , "UNIX_PATHS" , SPL_FILE_DIR_UNIXPATHS ) ;
spl_ce_FilesystemIterator -> get_iterator = spl_filesystem_tree_get_iterator ;
REGISTER_SPL_SUB_CLASS_EX ( RecursiveDirectoryIterator , FilesystemIterator , spl_filesystem_object_new , spl_RecursiveDirectoryIterator_functions ) ;
REGISTER_SPL_IMPLEMENTS ( RecursiveDirectoryIterator , RecursiveIterator ) ;
memcpy ( & spl_filesystem_object_check_handlers , & spl_filesystem_object_handlers , sizeof ( zend_object_handlers ) ) ;
spl_filesystem_object_check_handlers . get_method = spl_filesystem_object_get_method_check ;
# ifdef HAVE_GLOB REGISTER_SPL_SUB_CLASS_EX ( GlobIterator , FilesystemIterator , spl_filesystem_object_new_check , spl_GlobIterator_functions ) ;
REGISTER_SPL_IMPLEMENTS ( GlobIterator , Countable ) ;
# endif REGISTER_SPL_SUB_CLASS_EX ( SplFileObject , SplFileInfo , spl_filesystem_object_new_check , spl_SplFileObject_functions ) ;
REGISTER_SPL_IMPLEMENTS ( SplFileObject , RecursiveIterator ) ;
REGISTER_SPL_IMPLEMENTS ( SplFileObject , SeekableIterator ) ;
REGISTER_SPL_CLASS_CONST_LONG ( SplFileObject , "DROP_NEW_LINE" , SPL_FILE_OBJECT_DROP_NEW_LINE ) ;
REGISTER_SPL_CLASS_CONST_LONG ( SplFileObject , "READ_AHEAD" , SPL_FILE_OBJECT_READ_AHEAD ) ;
REGISTER_SPL_CLASS_CONST_LONG ( SplFileObject , "SKIP_EMPTY" , SPL_FILE_OBJECT_SKIP_EMPTY ) ;
REGISTER_SPL_CLASS_CONST_LONG ( SplFileObject , "READ_CSV" , SPL_FILE_OBJECT_READ_CSV ) ;
REGISTER_SPL_SUB_CLASS_EX ( SplTempFileObject , SplFileObject , spl_filesystem_object_new_check , spl_SplTempFileObject_functions ) ;
return SUCCESS ;
} |
4,839,943,401,171,415,000 | chrome | 16 | 1 | IN_PROC_BROWSER_TEST_P ( BrowserCloseManagerWithDownloadsBrowserTest , TestWithDownloads ) {
SetDownloadPathForProfile ( browser ( ) -> profile ( ) ) ;
ASSERT_NO_FATAL_FAILURE ( CreateStalledDownload ( browser ( ) ) ) ;
content : : TestNavigationObserver navigation_observer ( browser ( ) -> tab_strip_model ( ) -> GetActiveWebContents ( ) , 1 ) ;
TestBrowserCloseManager : : AttemptClose ( TestBrowserCloseManager : : USER_CHOICE_USER_CANCELS_CLOSE ) ;
EXPECT_FALSE ( browser_shutdown : : IsTryingToQuit ( ) ) ;
navigation_observer . Wait ( ) ;
EXPECT_EQ ( GURL ( chrome : : kChromeUIDownloadsURL ) , browser ( ) -> tab_strip_model ( ) -> GetActiveWebContents ( ) -> GetURL ( ) ) ;
RepeatedNotificationObserver close_observer ( chrome : : NOTIFICATION_BROWSER_CLOSED , 1 ) ;
TestBrowserCloseManager : : AttemptClose ( TestBrowserCloseManager : : USER_CHOICE_USER_ALLOWS_CLOSE ) ;
close_observer . Wait ( ) ;
EXPECT_TRUE ( browser_shutdown : : IsTryingToQuit ( ) ) ;
EXPECT_TRUE ( BrowserList : : GetInstance ( ) -> empty ( ) ) ;
if ( browser_defaults : : kBrowserAliveWithNoWindows ) EXPECT_EQ ( 1 , DownloadCoreService : : NonMaliciousDownloadCountAllProfiles ( ) ) ;
else EXPECT_EQ ( 0 , DownloadCoreService : : NonMaliciousDownloadCountAllProfiles ( ) ) ;
} |
-7,422,764,464,424,761,000 | chrome | 13 | 0 | TEST_F ( ExtensionServiceSyncTest , DeferredSyncStartupPreInstalledNormal ) {
InitializeGoodInstalledExtensionService ( ) ;
bool flare_was_called = false ;
syncer : : ModelType triggered_type ( syncer : : UNSPECIFIED ) ;
base : : WeakPtrFactory < ExtensionServiceSyncTest > factory ( this ) ;
extension_sync_service ( ) -> SetSyncStartFlareForTesting ( base : : Bind ( & ExtensionServiceSyncTest : : MockSyncStartFlare , factory . GetWeakPtr ( ) , & flare_was_called , & triggered_type ) ) ;
ASSERT_FALSE ( service ( ) -> is_ready ( ) ) ;
service ( ) -> Init ( ) ;
ASSERT_EQ ( 3u , loaded_ . size ( ) ) ;
ASSERT_TRUE ( service ( ) -> is_ready ( ) ) ;
EXPECT_FALSE ( flare_was_called ) ;
ASSERT_EQ ( syncer : : UNSPECIFIED , triggered_type ) ;
} |
-1,315,695,702,746,584,300 | debian | 10 | 0 | proto_item * proto_tree_add_format_wsp_text ( proto_tree * tree , tvbuff_t * tvb , gint start , gint length ) {
proto_item * pi ;
header_field_info * hfinfo ;
CHECK_FOR_NULL_TREE ( tree ) ;
TRY_TO_FAKE_THIS_ITEM ( tree , hf_text_only , hfinfo ) ;
pi = proto_tree_add_text_node ( tree , tvb , start , length ) ;
TRY_TO_FAKE_THIS_REPR ( pi ) ;
proto_item_set_text ( pi , "%s" , tvb_format_text_wsp ( tvb , start , length ) ) ;
return pi ;
} |
5,610,242,550,647,094,000 | debian | 9 | 1 | static void fill_vaapi_RefPicList ( VAPictureH264 RefPicList [ 32 ] , Picture * ref_list , unsigned int ref_count ) {
unsigned int i , n = 0 ;
for ( i = 0 ;
i < ref_count ;
i ++ ) if ( ref_list [ i ] . f . reference ) fill_vaapi_pic ( & RefPicList [ n ++ ] , & ref_list [ i ] , 0 ) ;
for ( ;
n < 32 ;
n ++ ) init_vaapi_pic ( & RefPicList [ n ] ) ;
} |
1,223,258,652,239,369,200 | debian | 40 | 0 | SPL_METHOD ( SplFileObject , __construct ) {
spl_filesystem_object * intern = ( spl_filesystem_object * ) zend_object_store_get_object ( getThis ( ) TSRMLS_CC ) ;
zend_bool use_include_path = 0 ;
char * p1 , * p2 ;
char * tmp_path ;
int tmp_path_len ;
zend_error_handling error_handling ;
zend_replace_error_handling ( EH_THROW , spl_ce_RuntimeException , & error_handling TSRMLS_CC ) ;
intern -> u . file . open_mode = NULL ;
intern -> u . file . open_mode_len = 0 ;
if ( zend_parse_parameters ( ZEND_NUM_ARGS ( ) TSRMLS_CC , "p|sbr!" , & intern -> file_name , & intern -> file_name_len , & intern -> u . file . open_mode , & intern -> u . file . open_mode_len , & use_include_path , & intern -> u . file . zcontext ) == FAILURE ) {
intern -> u . file . open_mode = NULL ;
intern -> file_name = NULL ;
zend_restore_error_handling ( & error_handling TSRMLS_CC ) ;
return ;
}
if ( intern -> u . file . open_mode == NULL ) {
intern -> u . file . open_mode = "r" ;
intern -> u . file . open_mode_len = 1 ;
}
if ( spl_filesystem_file_open ( intern , use_include_path , 0 TSRMLS_CC ) == SUCCESS ) {
tmp_path_len = strlen ( intern -> u . file . stream -> orig_path ) ;
if ( tmp_path_len > 1 && IS_SLASH_AT ( intern -> u . file . stream -> orig_path , tmp_path_len - 1 ) ) {
tmp_path_len -- ;
}
tmp_path = estrndup ( intern -> u . file . stream -> orig_path , tmp_path_len ) ;
p1 = strrchr ( tmp_path , '/' ) ;
# if defined ( PHP_WIN32 ) || defined ( NETWARE ) p2 = strrchr ( tmp_path , '\\' ) ;
# else p2 = 0 ;
# endif if ( p1 || p2 ) {
intern -> _path_len = ( p1 > p2 ? p1 : p2 ) - tmp_path ;
}
else {
intern -> _path_len = 0 ;
}
efree ( tmp_path ) ;
intern -> _path = estrndup ( intern -> u . file . stream -> orig_path , intern -> _path_len ) ;
}
zend_restore_error_handling ( & error_handling TSRMLS_CC ) ;
} |
2,487,534,775,710,400,500 | chrome | 14 | 0 | TEST_F ( ExtensionWelcomeNotificationTest , ShowWelcomeNotificationAgain ) {
StartPreferenceSyncing ( ) ;
SetBooleanPref ( prefs : : kWelcomeNotificationPreviouslyPoppedUp , true ) ;
EXPECT_FALSE ( GetBooleanPref ( prefs : : kWelcomeNotificationDismissed ) ) ;
EXPECT_FALSE ( GetBooleanPref ( prefs : : kWelcomeNotificationDismissedLocal ) ) ;
EXPECT_TRUE ( GetBooleanPref ( prefs : : kWelcomeNotificationPreviouslyPoppedUp ) ) ;
ShowChromeNowNotification ( ) ;
EXPECT_EQ ( message_center ( ) -> add_notification_calls ( ) , 1 ) ;
EXPECT_EQ ( message_center ( ) -> remove_notification_calls ( ) , 0 ) ;
EXPECT_EQ ( message_center ( ) -> notifications_with_shown_as_popup ( ) , 1 ) ;
EXPECT_FALSE ( GetBooleanPref ( prefs : : kWelcomeNotificationDismissed ) ) ;
EXPECT_FALSE ( GetBooleanPref ( prefs : : kWelcomeNotificationDismissedLocal ) ) ;
EXPECT_TRUE ( GetBooleanPref ( prefs : : kWelcomeNotificationPreviouslyPoppedUp ) ) ;
} |
-3,528,294,111,382,233,600 | chrome | 6 | 0 | static void U_CALLCONV _Latin1GetUnicodeSet ( const UConverter * cnv , const USetAdder * sa , UConverterUnicodeSet which , UErrorCode * pErrorCode ) {
( void ) cnv ;
( void ) which ;
( void ) pErrorCode ;
sa -> addRange ( sa -> set , 0 , 0xff ) ;
} |
8,461,266,595,329,035,000 | chrome | 56 | 0 | int event_base_loop ( struct event_base * base , int flags ) {
const struct eventop * evsel = base -> evsel ;
void * evbase = base -> evbase ;
struct timeval tv ;
struct timeval * tv_p ;
int res , done ;
base -> tv_cache . tv_sec = 0 ;
if ( base -> sig . ev_signal_added ) evsignal_base = base ;
done = 0 ;
while ( ! done ) {
if ( base -> event_gotterm ) {
base -> event_gotterm = 0 ;
break ;
}
if ( base -> event_break ) {
base -> event_break = 0 ;
break ;
}
while ( event_gotsig ) {
event_gotsig = 0 ;
if ( event_sigcb ) {
res = ( * event_sigcb ) ( ) ;
if ( res == - 1 ) {
errno = EINTR ;
return ( - 1 ) ;
}
}
}
timeout_correct ( base , & tv ) ;
tv_p = & tv ;
if ( ! base -> event_count_active && ! ( flags & EVLOOP_NONBLOCK ) ) {
timeout_next ( base , & tv_p ) ;
}
else {
evutil_timerclear ( & tv ) ;
}
if ( ! event_haveevents ( base ) ) {
event_debug ( ( "%s: no events registered." , __func__ ) ) ;
return ( 1 ) ;
}
gettime ( base , & base -> event_tv ) ;
base -> tv_cache . tv_sec = 0 ;
res = evsel -> dispatch ( base , evbase , tv_p ) ;
if ( res == - 1 ) return ( - 1 ) ;
gettime ( base , & base -> tv_cache ) ;
timeout_process ( base ) ;
if ( base -> event_count_active ) {
event_process_active ( base ) ;
if ( ! base -> event_count_active && ( flags & EVLOOP_ONCE ) ) done = 1 ;
}
else if ( flags & EVLOOP_NONBLOCK ) done = 1 ;
}
base -> tv_cache . tv_sec = 0 ;
event_debug ( ( "%s: asked to terminate loop." , __func__ ) ) ;
return ( 0 ) ;
} |
-7,899,851,216,763,490,000 | chrome | 187 | 0 | static void U_CALLCONV ucnv_UTF8FromUTF8 ( UConverterFromUnicodeArgs * pFromUArgs , UConverterToUnicodeArgs * pToUArgs , UErrorCode * pErrorCode ) {
UConverter * utf8 ;
const uint8_t * source , * sourceLimit ;
uint8_t * target ;
int32_t targetCapacity ;
int32_t count ;
int8_t oldToULength , toULength , toULimit ;
UChar32 c ;
uint8_t b , t1 , t2 ;
utf8 = pToUArgs -> converter ;
source = ( uint8_t * ) pToUArgs -> source ;
sourceLimit = ( uint8_t * ) pToUArgs -> sourceLimit ;
target = ( uint8_t * ) pFromUArgs -> target ;
targetCapacity = ( int32_t ) ( pFromUArgs -> targetLimit - pFromUArgs -> target ) ;
c = ( UChar32 ) utf8 -> toUnicodeStatus ;
if ( c != 0 ) {
toULength = oldToULength = utf8 -> toULength ;
toULimit = ( int8_t ) utf8 -> mode ;
}
else {
toULength = oldToULength = toULimit = 0 ;
}
count = ( int32_t ) ( sourceLimit - source ) + oldToULength ;
if ( count < toULimit ) {
}
else if ( targetCapacity < toULimit ) {
* pErrorCode = U_USING_DEFAULT_WARNING ;
return ;
}
else {
int32_t i ;
if ( count > targetCapacity ) {
count = targetCapacity ;
}
i = 0 ;
while ( i < 3 && i < ( count - toULimit ) ) {
b = source [ count - oldToULength - i - 1 ] ;
if ( U8_IS_TRAIL ( b ) ) {
++ i ;
}
else {
if ( i < U8_COUNT_TRAIL_BYTES ( b ) ) {
count -= i + 1 ;
}
break ;
}
}
}
if ( c != 0 ) {
utf8 -> toUnicodeStatus = 0 ;
utf8 -> toULength = 0 ;
goto moreBytes ;
}
while ( count > 0 ) {
b = * source ++ ;
if ( ( int8_t ) b >= 0 ) {
* target ++ = b ;
-- count ;
continue ;
}
else {
if ( b > 0xe0 ) {
if ( ( t1 = source [ 0 ] ) >= 0x80 && ( ( b < 0xed && ( t1 <= 0xbf ) ) || ( b == 0xed && ( t1 <= 0x9f ) ) ) && ( t2 = source [ 1 ] ) >= 0x80 && t2 <= 0xbf ) {
source += 2 ;
* target ++ = b ;
* target ++ = t1 ;
* target ++ = t2 ;
count -= 3 ;
continue ;
}
}
else if ( b < 0xe0 ) {
if ( b >= 0xc2 && ( t1 = * source ) >= 0x80 && t1 <= 0xbf ) {
++ source ;
* target ++ = b ;
* target ++ = t1 ;
count -= 2 ;
continue ;
}
}
else if ( b == 0xe0 ) {
if ( ( t1 = source [ 0 ] ) >= 0xa0 && t1 <= 0xbf && ( t2 = source [ 1 ] ) >= 0x80 && t2 <= 0xbf ) {
source += 2 ;
* target ++ = b ;
* target ++ = t1 ;
* target ++ = t2 ;
count -= 3 ;
continue ;
}
}
oldToULength = 0 ;
toULength = 1 ;
toULimit = U8_COUNT_TRAIL_BYTES ( b ) + 1 ;
c = b ;
moreBytes : while ( toULength < toULimit ) {
if ( source < sourceLimit ) {
b = * source ;
if ( U8_IS_TRAIL ( b ) ) {
++ source ;
++ toULength ;
c = ( c << 6 ) + b ;
}
else {
break ;
}
}
else {
source -= ( toULength - oldToULength ) ;
while ( oldToULength < toULength ) {
utf8 -> toUBytes [ oldToULength ++ ] = * source ++ ;
}
utf8 -> toUnicodeStatus = c ;
utf8 -> toULength = toULength ;
utf8 -> mode = toULimit ;
pToUArgs -> source = ( char * ) source ;
pFromUArgs -> target = ( char * ) target ;
return ;
}
}
if ( toULength == toULimit && ( toULength == 3 || toULength == 2 ) && ( c -= utf8_offsets [ toULength ] ) >= utf8_minLegal [ toULength ] && ( c <= 0xd7ff || 0xe000 <= c ) ) {
}
else if ( toULength == toULimit && toULength == 4 && ( 0x10000 <= ( c -= utf8_offsets [ 4 ] ) && c <= 0x10ffff ) ) {
}
else {
source -= ( toULength - oldToULength ) ;
while ( oldToULength < toULength ) {
utf8 -> toUBytes [ oldToULength ++ ] = * source ++ ;
}
utf8 -> toULength = toULength ;
pToUArgs -> source = ( char * ) source ;
pFromUArgs -> target = ( char * ) target ;
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
return ;
}
{
int8_t i ;
for ( i = 0 ;
i < oldToULength ;
++ i ) {
* target ++ = utf8 -> toUBytes [ i ] ;
}
source -= ( toULength - oldToULength ) ;
for ( ;
i < toULength ;
++ i ) {
* target ++ = * source ++ ;
}
count -= toULength ;
}
}
}
if ( U_SUCCESS ( * pErrorCode ) && source < sourceLimit ) {
if ( target == ( const uint8_t * ) pFromUArgs -> targetLimit ) {
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
}
else {
b = * source ;
toULimit = U8_COUNT_TRAIL_BYTES ( b ) + 1 ;
if ( toULimit > ( sourceLimit - source ) ) {
toULength = 0 ;
c = b ;
for ( ;
;
) {
utf8 -> toUBytes [ toULength ++ ] = b ;
if ( ++ source == sourceLimit ) {
utf8 -> toUnicodeStatus = c ;
utf8 -> toULength = toULength ;
utf8 -> mode = toULimit ;
break ;
}
else if ( ! U8_IS_TRAIL ( b = * source ) ) {
utf8 -> toULength = toULength ;
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
break ;
}
c = ( c << 6 ) + b ;
}
}
else {
* pErrorCode = U_USING_DEFAULT_WARNING ;
}
}
}
pToUArgs -> source = ( char * ) source ;
pFromUArgs -> target = ( char * ) target ;
} |
-5,912,543,978,015,783,000 | debian | 108 | 0 | int main ( int argc , char * * argv ) {
int option_idx = 0 ;
int result ;
const char * adb_server_ip = NULL ;
unsigned short * adb_server_tcp_port = NULL ;
unsigned int logcat_text = 0 ;
const char * default_adb_server_ip = "127.0.0.1" ;
unsigned short default_adb_server_tcp_port = 5037 ;
unsigned short local_adb_server_tcp_port ;
unsigned short local_bt_server_tcp_port ;
unsigned short local_bt_local_tcp_port ;
unsigned short * bt_server_tcp_port = NULL ;
unsigned int bt_forward_socket = 0 ;
const char * bt_local_ip = NULL ;
unsigned short * bt_local_tcp_port = NULL ;
unsigned short default_bt_server_tcp_port = 4330 ;
const char * default_bt_local_ip = "127.0.0.1" ;
unsigned short default_bt_local_tcp_port = 4330 ;
extcap_parameters * extcap_conf = NULL ;
# ifdef _WIN32 WSADATA wsaData ;
attach_parent_console ( ) ;
# endif opterr = 0 ;
optind = 0 ;
if ( argc == 1 ) {
help ( ) ;
return EXIT_CODE_SUCCESS ;
}
extcap_conf = g_new0 ( extcap_parameters , 1 ) ;
extcap_base_set_util_info ( extcap_conf , ANDROIDDUMP_VERSION_MAJOR , ANDROIDDUMP_VERSION_MINOR , ANDROIDDUMP_VERSION_RELEASE , NULL ) ;
while ( ( result = getopt_long ( argc , argv , "" , longopts , & option_idx ) ) != - 1 ) {
switch ( result ) {
case OPT_VERSION : printf ( "%s.%s.%s\n" , ANDROIDDUMP_VERSION_MAJOR , ANDROIDDUMP_VERSION_MINOR , ANDROIDDUMP_VERSION_RELEASE ) ;
return EXIT_CODE_SUCCESS ;
case OPT_VERBOSE : if ( optarg ) verbose = ( g_ascii_strncasecmp ( optarg , "TRUE" , 4 ) == 0 ) ;
else verbose = 1 ;
{
int j = 0 ;
verbose_print ( "VERBOSE: Command line: " ) ;
while ( j < argc ) {
verbose_print ( "%s " , argv [ j ] ) ;
j += 1 ;
}
verbose_print ( "\n" ) ;
}
break ;
case OPT_HELP : help ( ) ;
return EXIT_CODE_SUCCESS ;
case OPT_CONFIG_ADB_SERVER_IP : adb_server_ip = optarg ;
break ;
case OPT_CONFIG_ADB_SERVER_TCP_PORT : adb_server_tcp_port = & local_adb_server_tcp_port ;
if ( ! optarg ) {
errmsg_print ( "ERROR: Impossible exception. Parameter required argument, but there is no it right now." ) ;
return EXIT_CODE_GENERIC ;
}
* adb_server_tcp_port = ( unsigned short ) g_ascii_strtoull ( optarg , NULL , 10 ) ;
break ;
case OPT_CONFIG_LOGCAT_TEXT : logcat_text = ( g_ascii_strncasecmp ( optarg , "TRUE" , 4 ) == 0 ) ;
break ;
case OPT_CONFIG_BT_SERVER_TCP_PORT : bt_server_tcp_port = & local_bt_server_tcp_port ;
if ( ! optarg ) {
errmsg_print ( "ERROR: Impossible exception. Parameter required argument, but there is no it right now." ) ;
return EXIT_CODE_GENERIC ;
}
* bt_server_tcp_port = ( unsigned short ) g_ascii_strtoull ( optarg , NULL , 10 ) ;
break ;
case OPT_CONFIG_BT_FORWARD_SOCKET : bt_forward_socket = ( g_ascii_strncasecmp ( optarg , "TRUE" , 4 ) == 0 ) ;
break ;
case OPT_CONFIG_BT_LOCAL_IP : bt_local_ip = optarg ;
break ;
case OPT_CONFIG_BT_LOCAL_TCP_PORT : bt_local_tcp_port = & local_bt_local_tcp_port ;
if ( ! optarg ) {
errmsg_print ( "ERROR: Impossible exception. Parameter required argument, but there is no it right now." ) ;
return EXIT_CODE_GENERIC ;
}
* bt_local_tcp_port = ( unsigned short ) g_ascii_strtoull ( optarg , NULL , 10 ) ;
break ;
default : if ( ! extcap_base_parse_options ( extcap_conf , result - EXTCAP_OPT_LIST_INTERFACES , optarg ) ) {
printf ( "Invalid argument <%s>. Try --help.\n" , argv [ optind - 1 ] ) ;
return EXIT_CODE_GENERIC ;
}
}
}
if ( ! adb_server_ip ) adb_server_ip = default_adb_server_ip ;
if ( ! adb_server_tcp_port ) adb_server_tcp_port = & default_adb_server_tcp_port ;
if ( ! bt_server_tcp_port ) bt_server_tcp_port = & default_bt_server_tcp_port ;
if ( ! bt_local_ip ) bt_local_ip = default_bt_local_ip ;
if ( ! bt_local_tcp_port ) bt_local_tcp_port = & default_bt_local_tcp_port ;
# ifdef _WIN32 result = WSAStartup ( MAKEWORD ( 1 , 1 ) , & wsaData ) ;
if ( result != 0 ) {
errmsg_print ( "ERROR: WSAStartup failed with error: %d" , result ) ;
return EXIT_CODE_GENERIC ;
}
# endif if ( extcap_conf -> do_list_interfaces ) register_interfaces ( extcap_conf , adb_server_ip , adb_server_tcp_port ) ;
if ( extcap_base_handle_interface ( extcap_conf ) ) return EXIT_CODE_SUCCESS ;
if ( extcap_conf -> show_config ) return list_config ( extcap_conf -> interface ) ;
if ( extcap_conf -> capture ) {
if ( extcap_conf -> interface && ( is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_MAIN ) || is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_SYSTEM ) || is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_RADIO ) || is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_EVENTS ) ) ) if ( logcat_text ) return capture_android_logcat_text ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port ) ;
else return capture_android_logcat ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port ) ;
else if ( extcap_conf -> interface && ( is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_TEXT_MAIN ) || is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_TEXT_SYSTEM ) || is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_TEXT_RADIO ) || is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_TEXT_EVENTS ) || ( is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_LOGCAT_TEXT_CRASH ) ) ) ) return capture_android_logcat_text ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port ) ;
else if ( extcap_conf -> interface && is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_BLUETOOTH_HCIDUMP ) ) return capture_android_bluetooth_hcidump ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port ) ;
else if ( extcap_conf -> interface && is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_BLUETOOTH_EXTERNAL_PARSER ) ) return capture_android_bluetooth_external_parser ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port , bt_server_tcp_port , bt_forward_socket , bt_local_ip , bt_local_tcp_port ) ;
else if ( extcap_conf -> interface && ( is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_BLUETOOTH_BTSNOOP_NET ) ) ) return capture_android_bluetooth_btsnoop_net ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port ) ;
else if ( extcap_conf -> interface && ( is_specified_interface ( extcap_conf -> interface , INTERFACE_ANDROID_WIFI_TCPDUMP ) ) ) return capture_android_wifi_tcpdump ( extcap_conf -> interface , extcap_conf -> fifo , adb_server_ip , adb_server_tcp_port ) ;
else return EXIT_CODE_GENERIC ;
}
extcap_base_cleanup ( & extcap_conf ) ;
return EXIT_CODE_SUCCESS ;
} |
-7,670,127,399,145,951,000 | debian | 9 | 0 | int gs_main_run_string_begin ( gs_main_instance * minst , int user_errors , int * pexit_code , ref * perror_object ) {
const char * setup = ".runstringbegin" ;
ref rstr ;
int code ;
gs_main_set_lib_paths ( minst ) ;
make_const_string ( & rstr , avm_foreign | a_readonly | a_executable , strlen ( setup ) , ( const byte * ) setup ) ;
code = gs_main_interpret ( minst , & rstr , user_errors , pexit_code , perror_object ) ;
return ( code == gs_error_NeedInput ? 0 : code == 0 ? gs_error_Fatal : code ) ;
} |
-2,915,908,172,644,761,000 | debian | 42 | 0 | static int decode_channel_residues ( WmallDecodeCtx * s , int ch , int tile_size ) {
int i = 0 ;
unsigned int ave_mean ;
s -> transient [ ch ] = get_bits1 ( & s -> gb ) ;
if ( s -> transient [ ch ] ) {
s -> transient_pos [ ch ] = get_bits ( & s -> gb , av_log2 ( tile_size ) ) ;
if ( s -> transient_pos [ ch ] ) s -> transient [ ch ] = 0 ;
s -> channel [ ch ] . transient_counter = FFMAX ( s -> channel [ ch ] . transient_counter , s -> samples_per_frame / 2 ) ;
}
else if ( s -> channel [ ch ] . transient_counter ) s -> transient [ ch ] = 1 ;
if ( s -> seekable_tile ) {
ave_mean = get_bits ( & s -> gb , s -> bits_per_sample ) ;
s -> ave_sum [ ch ] = ave_mean << ( s -> movave_scaling + 1 ) ;
}
if ( s -> seekable_tile ) {
if ( s -> do_inter_ch_decorr ) s -> channel_residues [ ch ] [ 0 ] = get_sbits ( & s -> gb , s -> bits_per_sample + 1 ) ;
else s -> channel_residues [ ch ] [ 0 ] = get_sbits ( & s -> gb , s -> bits_per_sample ) ;
i ++ ;
}
for ( ;
i < tile_size ;
i ++ ) {
int quo = 0 , rem , rem_bits , residue ;
while ( get_bits1 ( & s -> gb ) ) {
quo ++ ;
if ( get_bits_left ( & s -> gb ) <= 0 ) return - 1 ;
}
if ( quo >= 32 ) quo += get_bits_long ( & s -> gb , get_bits ( & s -> gb , 5 ) + 1 ) ;
ave_mean = ( s -> ave_sum [ ch ] + ( 1 << s -> movave_scaling ) ) >> ( s -> movave_scaling + 1 ) ;
if ( ave_mean <= 1 ) residue = quo ;
else {
rem_bits = av_ceil_log2 ( ave_mean ) ;
rem = rem_bits ? get_bits_long ( & s -> gb , rem_bits ) : 0 ;
residue = ( quo << rem_bits ) + rem ;
}
s -> ave_sum [ ch ] = residue + s -> ave_sum [ ch ] - ( s -> ave_sum [ ch ] >> s -> movave_scaling ) ;
if ( residue & 1 ) residue = - ( residue >> 1 ) - 1 ;
else residue = residue >> 1 ;
s -> channel_residues [ ch ] [ i ] = residue ;
}
return 0 ;
} |
6,667,142,528,452,942,000 | debian | 3 | 0 | static void dynstr_set_checked ( DYNAMIC_STRING * str , const char * init_str ) {
if ( dynstr_set ( str , init_str ) ) die ( EX_MYSQLERR , DYNAMIC_STR_ERROR_MSG ) ;
} |
-6,228,844,445,714,760,000 | debian | 29 | 0 | static void parse_content_disposition ( const char * content_disposition , const char * * filename_r ) {
struct rfc822_parser_context parser ;
const char * const * results , * filename2 ;
string_t * str ;
* filename_r = NULL ;
if ( content_disposition == NULL ) return ;
rfc822_parser_init ( & parser , ( const unsigned char * ) content_disposition , strlen ( content_disposition ) , NULL ) ;
rfc822_skip_lwsp ( & parser ) ;
str = t_str_new ( 32 ) ;
if ( rfc822_parse_mime_token ( & parser , str ) < 0 ) {
rfc822_parser_deinit ( & parser ) ;
return ;
}
rfc2231_parse ( & parser , & results ) ;
filename2 = NULL ;
for ( ;
* results != NULL ;
results += 2 ) {
if ( strcasecmp ( results [ 0 ] , "filename" ) == 0 ) {
* filename_r = results [ 1 ] ;
break ;
}
if ( strcasecmp ( results [ 0 ] , "filename*" ) == 0 ) filename2 = results [ 1 ] ;
}
if ( * filename_r == NULL ) {
* filename_r = filename2 ;
}
rfc822_parser_deinit ( & parser ) ;
} |
-6,734,821,889,507,212,000 | debian | 6 | 1 | static void cond_release_buffer ( AVFrame * pic ) {
if ( pic -> data [ 0 ] ) {
av_freep ( & pic -> data [ 0 ] ) ;
av_free ( pic -> data [ 1 ] ) ;
}
} |
4,180,964,683,905,831,000 | debian | 9 | 0 | static int __inode_security_revalidate ( struct inode * inode , struct dentry * opt_dentry , bool may_sleep ) {
struct inode_security_struct * isec = inode -> i_security ;
might_sleep_if ( may_sleep ) ;
if ( ss_initialized && isec -> initialized != LABEL_INITIALIZED ) {
if ( ! may_sleep ) return - ECHILD ;
inode_doinit_with_dentry ( inode , opt_dentry ) ;
}
return 0 ;
} |
-7,455,544,248,455,991,000 | debian | 8 | 0 | void kvm_synchronize_all_tsc ( void ) {
CPUState * cpu ;
if ( kvm_enabled ( ) ) {
CPU_FOREACH ( cpu ) {
run_on_cpu ( cpu , do_kvm_synchronize_tsc , RUN_ON_CPU_NULL ) ;
}
}
} |