hash
int64 -9,197,960,073,880,366,000
9,199,363,627B
| project
stringclasses 2
values | size
int64 2
5.68k
| label
int64 0
1
| functionSource
stringlengths 31
235k
|
---|---|---|---|---|
2,390,790,920,103,114,000 | debian | 6 | 0 | static void freesubre ( struct vars * v , struct subre * sr ) {
if ( sr == NULL ) return ;
if ( sr -> left != NULL ) freesubre ( v , sr -> left ) ;
if ( sr -> right != NULL ) freesubre ( v , sr -> right ) ;
freesrnode ( v , sr ) ;
} |
-1,502,790,318,857,378,300 | debian | 26 | 0 | int V1F_Setup_Fetch ( struct vfp_ctx * vfc , struct http_conn * htc ) {
struct vfp_entry * vfe ;
CHECK_OBJ_NOTNULL ( vfc , VFP_CTX_MAGIC ) ;
CHECK_OBJ_NOTNULL ( htc , HTTP_CONN_MAGIC ) ;
switch ( htc -> body_status ) {
case BS_EOF : assert ( htc -> content_length == - 1 ) ;
vfe = VFP_Push ( vfc , & v1f_eof , 0 ) ;
if ( vfe == NULL ) return ( ENOSPC ) ;
vfe -> priv2 = 0 ;
break ;
case BS_LENGTH : assert ( htc -> content_length > 0 ) ;
vfe = VFP_Push ( vfc , & v1f_straight , 0 ) ;
if ( vfe == NULL ) return ( ENOSPC ) ;
vfe -> priv2 = htc -> content_length ;
break ;
case BS_CHUNKED : assert ( htc -> content_length == - 1 ) ;
vfe = VFP_Push ( vfc , & v1f_chunked , 0 ) ;
if ( vfe == NULL ) return ( ENOSPC ) ;
vfe -> priv2 = - 1 ;
break ;
default : WRONG ( "Wrong body_status" ) ;
break ;
}
vfe -> priv1 = htc ;
return 0 ;
} |
8,572,106,347,813,672,000 | debian | 4 | 0 | static int pfkey_can_dump ( const struct sock * sk ) {
if ( 3 * atomic_read ( & sk -> sk_rmem_alloc ) <= 2 * sk -> sk_rcvbuf ) return 1 ;
return 0 ;
} |
-7,553,540,414,561,819,000 | debian | 62 | 0 | int test_sqrt ( BIO * bp , BN_CTX * ctx ) {
BN_GENCB cb ;
BIGNUM * a , * p , * r ;
int i , j ;
int ret = 0 ;
a = BN_new ( ) ;
p = BN_new ( ) ;
r = BN_new ( ) ;
if ( a == NULL || p == NULL || r == NULL ) goto err ;
BN_GENCB_set ( & cb , genprime_cb , NULL ) ;
for ( i = 0 ;
i < 16 ;
i ++ ) {
if ( i < 8 ) {
unsigned primes [ 8 ] = {
2 , 3 , 5 , 7 , 11 , 13 , 17 , 19 }
;
if ( ! BN_set_word ( p , primes [ i ] ) ) goto err ;
}
else {
if ( ! BN_set_word ( a , 32 ) ) goto err ;
if ( ! BN_set_word ( r , 2 * i + 1 ) ) goto err ;
if ( ! BN_generate_prime_ex ( p , 256 , 0 , a , r , & cb ) ) goto err ;
putc ( '\n' , stderr ) ;
}
p -> neg = rand_neg ( ) ;
for ( j = 0 ;
j < num2 ;
j ++ ) {
if ( ! BN_bntest_rand ( r , 256 , 0 , 3 ) ) goto err ;
if ( ! BN_nnmod ( r , r , p , ctx ) ) goto err ;
if ( ! BN_mod_sqr ( r , r , p , ctx ) ) goto err ;
if ( ! BN_bntest_rand ( a , 256 , 0 , 3 ) ) goto err ;
if ( ! BN_nnmod ( a , a , p , ctx ) ) goto err ;
if ( ! BN_mod_sqr ( a , a , p , ctx ) ) goto err ;
if ( ! BN_mul ( a , a , r , ctx ) ) goto err ;
if ( rand_neg ( ) ) if ( ! BN_sub ( a , a , p ) ) goto err ;
if ( ! BN_mod_sqrt ( r , a , p , ctx ) ) goto err ;
if ( ! BN_mod_sqr ( r , r , p , ctx ) ) goto err ;
if ( ! BN_nnmod ( a , a , p , ctx ) ) goto err ;
if ( BN_cmp ( a , r ) != 0 ) {
fprintf ( stderr , "BN_mod_sqrt failed: a = " ) ;
BN_print_fp ( stderr , a ) ;
fprintf ( stderr , ", r = " ) ;
BN_print_fp ( stderr , r ) ;
fprintf ( stderr , ", p = " ) ;
BN_print_fp ( stderr , p ) ;
fprintf ( stderr , "\n" ) ;
goto err ;
}
putc ( '.' , stderr ) ;
fflush ( stderr ) ;
}
putc ( '\n' , stderr ) ;
fflush ( stderr ) ;
}
ret = 1 ;
err : if ( a != NULL ) BN_free ( a ) ;
if ( p != NULL ) BN_free ( p ) ;
if ( r != NULL ) BN_free ( r ) ;
return ret ;
} |
3,668,456,668,028,960,000 | debian | 4 | 0 | static VALUE cState_indent ( VALUE self ) {
GET_STATE ( self ) ;
return state -> indent ? rb_str_new ( state -> indent , state -> indent_len ) : rb_str_new2 ( "" ) ;
} |
-6,126,432,314,261,452,000 | debian | 11 | 0 | int gs_opendevice ( gx_device * dev ) {
if ( dev -> is_open ) return 0 ;
check_device_separable ( dev ) ;
gx_device_fill_in_procs ( dev ) ;
{
int code = ( * dev_proc ( dev , open_device ) ) ( dev ) ;
if ( code < 0 ) return_error ( code ) ;
dev -> is_open = true ;
return 1 ;
}
} |
7,072,059,544,915,634,000 | chrome | 404 | 0 | static void U_CALLCONV _LMBCSOpen ## n ( UConverter * _this , UConverterLoadArgs * pArgs , UErrorCode * err ) \ {
_LMBCSOpenWorker ( _this , pArgs , err , n ) ;
}
static void _LMBCSOpenWorker ( UConverter * _this , UConverterLoadArgs * pArgs , UErrorCode * err , ulmbcs_byte_t OptGroup ) {
UConverterDataLMBCS * extraInfo = ( UConverterDataLMBCS * ) uprv_malloc ( sizeof ( UConverterDataLMBCS ) ) ;
_this -> extraInfo = extraInfo ;
if ( extraInfo != NULL ) {
UConverterNamePieces stackPieces ;
UConverterLoadArgs stackArgs = UCNV_LOAD_ARGS_INITIALIZER ;
ulmbcs_byte_t i ;
uprv_memset ( extraInfo , 0 , sizeof ( UConverterDataLMBCS ) ) ;
stackArgs . onlyTestIsLoadable = pArgs -> onlyTestIsLoadable ;
for ( i = 0 ;
i <= ULMBCS_GRP_LAST && U_SUCCESS ( * err ) ;
i ++ ) {
if ( OptGroupByteToCPName [ i ] != NULL ) {
extraInfo -> OptGrpConverter [ i ] = ucnv_loadSharedData ( OptGroupByteToCPName [ i ] , & stackPieces , & stackArgs , err ) ;
}
}
if ( U_FAILURE ( * err ) || pArgs -> onlyTestIsLoadable ) {
_LMBCSClose ( _this ) ;
return ;
}
extraInfo -> OptGroup = OptGroup ;
extraInfo -> localeConverterIndex = FindLMBCSLocale ( pArgs -> locale ) ;
}
else {
* err = U_MEMORY_ALLOCATION_ERROR ;
}
}
U_CDECL_BEGIN static void U_CALLCONV _LMBCSClose ( UConverter * _this ) {
if ( _this -> extraInfo != NULL ) {
ulmbcs_byte_t Ix ;
UConverterDataLMBCS * extraInfo = ( UConverterDataLMBCS * ) _this -> extraInfo ;
for ( Ix = 0 ;
Ix <= ULMBCS_GRP_LAST ;
Ix ++ ) {
if ( extraInfo -> OptGrpConverter [ Ix ] != NULL ) ucnv_unloadSharedDataIfReady ( extraInfo -> OptGrpConverter [ Ix ] ) ;
}
if ( ! _this -> isExtraLocal ) {
uprv_free ( _this -> extraInfo ) ;
_this -> extraInfo = NULL ;
}
}
}
typedef struct LMBCSClone {
UConverter cnv ;
UConverterDataLMBCS lmbcs ;
}
LMBCSClone ;
static UConverter * U_CALLCONV _LMBCSSafeClone ( const UConverter * cnv , void * stackBuffer , int32_t * pBufferSize , UErrorCode * status ) {
( void ) status ;
LMBCSClone * newLMBCS ;
UConverterDataLMBCS * extraInfo ;
int32_t i ;
if ( * pBufferSize <= 0 ) {
* pBufferSize = ( int32_t ) sizeof ( LMBCSClone ) ;
return NULL ;
}
extraInfo = ( UConverterDataLMBCS * ) cnv -> extraInfo ;
newLMBCS = ( LMBCSClone * ) stackBuffer ;
uprv_memcpy ( & newLMBCS -> lmbcs , extraInfo , sizeof ( UConverterDataLMBCS ) ) ;
for ( i = 0 ;
i <= ULMBCS_GRP_LAST ;
++ i ) {
if ( extraInfo -> OptGrpConverter [ i ] != NULL ) {
ucnv_incrementRefCount ( extraInfo -> OptGrpConverter [ i ] ) ;
}
}
newLMBCS -> cnv . extraInfo = & newLMBCS -> lmbcs ;
newLMBCS -> cnv . isExtraLocal = TRUE ;
return & newLMBCS -> cnv ;
}
static size_t LMBCSConversionWorker ( UConverterDataLMBCS * extraInfo , ulmbcs_byte_t group , ulmbcs_byte_t * pStartLMBCS , UChar * pUniChar , ulmbcs_byte_t * lastConverterIndex , UBool * groups_tried ) {
ulmbcs_byte_t * pLMBCS = pStartLMBCS ;
UConverterSharedData * xcnv = extraInfo -> OptGrpConverter [ group ] ;
int bytesConverted ;
uint32_t value ;
ulmbcs_byte_t firstByte ;
U_ASSERT ( xcnv ) ;
U_ASSERT ( group < ULMBCS_GRP_UNICODE ) ;
bytesConverted = ucnv_MBCSFromUChar32 ( xcnv , * pUniChar , & value , FALSE ) ;
if ( bytesConverted > 0 ) {
firstByte = ( ulmbcs_byte_t ) ( value >> ( ( bytesConverted - 1 ) * 8 ) ) ;
}
else {
groups_tried [ group ] = TRUE ;
return 0 ;
}
* lastConverterIndex = group ;
U_ASSERT ( ( firstByte <= ULMBCS_C0END ) || ( firstByte >= ULMBCS_C1START ) || ( group == ULMBCS_GRP_EXCEPT ) ) ;
if ( group != ULMBCS_GRP_EXCEPT && extraInfo -> OptGroup != group ) {
* pLMBCS ++ = group ;
if ( bytesConverted == 1 && group >= ULMBCS_DOUBLEOPTGROUP_START ) {
* pLMBCS ++ = group ;
}
}
if ( bytesConverted == 1 && firstByte < 0x20 ) return 0 ;
switch ( bytesConverted ) {
case 4 : * pLMBCS ++ = ( ulmbcs_byte_t ) ( value >> 24 ) ;
U_FALLTHROUGH ;
case 3 : * pLMBCS ++ = ( ulmbcs_byte_t ) ( value >> 16 ) ;
U_FALLTHROUGH ;
case 2 : * pLMBCS ++ = ( ulmbcs_byte_t ) ( value >> 8 ) ;
U_FALLTHROUGH ;
case 1 : * pLMBCS ++ = ( ulmbcs_byte_t ) value ;
U_FALLTHROUGH ;
default : break ;
}
return ( pLMBCS - pStartLMBCS ) ;
}
static size_t LMBCSConvertUni ( ulmbcs_byte_t * pLMBCS , UChar uniChar ) {
uint8_t LowCh = ( uint8_t ) ( uniChar & 0x00FF ) ;
uint8_t HighCh = ( uint8_t ) ( uniChar >> 8 ) ;
* pLMBCS ++ = ULMBCS_GRP_UNICODE ;
if ( LowCh == 0 ) {
* pLMBCS ++ = ULMBCS_UNICOMPATZERO ;
* pLMBCS ++ = HighCh ;
}
else {
* pLMBCS ++ = HighCh ;
* pLMBCS ++ = LowCh ;
}
return ULMBCS_UNICODE_SIZE ;
}
static void U_CALLCONV _LMBCSFromUnicode ( UConverterFromUnicodeArgs * args , UErrorCode * err ) {
ulmbcs_byte_t lastConverterIndex = 0 ;
UChar uniChar ;
ulmbcs_byte_t LMBCS [ ULMBCS_CHARSIZE_MAX ] ;
ulmbcs_byte_t * pLMBCS ;
int32_t bytes_written ;
UBool groups_tried [ ULMBCS_GRP_LAST + 1 ] ;
UConverterDataLMBCS * extraInfo = ( UConverterDataLMBCS * ) args -> converter -> extraInfo ;
int sourceIndex = 0 ;
ulmbcs_byte_t OldConverterIndex = 0 ;
while ( args -> source < args -> sourceLimit && ! U_FAILURE ( * err ) ) {
OldConverterIndex = extraInfo -> localeConverterIndex ;
if ( args -> target >= args -> targetLimit ) {
* err = U_BUFFER_OVERFLOW_ERROR ;
break ;
}
uniChar = * ( args -> source ) ;
bytes_written = 0 ;
pLMBCS = LMBCS ;
if ( ( uniChar >= 0x80 ) && ( uniChar <= 0xff ) && ( uniChar != 0xB1 ) && ( uniChar != 0xD7 ) && ( uniChar != 0xF7 ) && ( uniChar != 0xB0 ) && ( uniChar != 0xB4 ) && ( uniChar != 0xB6 ) && ( uniChar != 0xA7 ) && ( uniChar != 0xA8 ) ) {
extraInfo -> localeConverterIndex = ULMBCS_GRP_L1 ;
}
if ( ( ( uniChar > ULMBCS_C0END ) && ( uniChar < ULMBCS_C1START ) ) || uniChar == 0 || uniChar == ULMBCS_HT || uniChar == ULMBCS_CR || uniChar == ULMBCS_LF || uniChar == ULMBCS_123SYSTEMRANGE ) {
* pLMBCS ++ = ( ulmbcs_byte_t ) uniChar ;
bytes_written = 1 ;
}
if ( ! bytes_written ) {
ulmbcs_byte_t group = FindLMBCSUniRange ( uniChar ) ;
if ( group == ULMBCS_GRP_UNICODE ) {
pLMBCS += LMBCSConvertUni ( pLMBCS , uniChar ) ;
bytes_written = ( int32_t ) ( pLMBCS - LMBCS ) ;
}
else if ( group == ULMBCS_GRP_CTRL ) {
if ( uniChar <= ULMBCS_C0END ) {
* pLMBCS ++ = ULMBCS_GRP_CTRL ;
* pLMBCS ++ = ( ulmbcs_byte_t ) ( ULMBCS_CTRLOFFSET + uniChar ) ;
}
else if ( uniChar >= ULMBCS_C1START && uniChar <= ULMBCS_C1START + ULMBCS_CTRLOFFSET ) {
* pLMBCS ++ = ULMBCS_GRP_CTRL ;
* pLMBCS ++ = ( ulmbcs_byte_t ) ( uniChar & 0x00FF ) ;
}
bytes_written = ( int32_t ) ( pLMBCS - LMBCS ) ;
}
else if ( group < ULMBCS_GRP_UNICODE ) {
bytes_written = ( int32_t ) LMBCSConversionWorker ( extraInfo , group , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
if ( ! bytes_written ) {
uprv_memset ( groups_tried , 0 , sizeof ( groups_tried ) ) ;
if ( ( extraInfo -> OptGroup != 1 ) && ( ULMBCS_AMBIGUOUS_MATCH ( group , extraInfo -> OptGroup ) ) ) {
if ( extraInfo -> localeConverterIndex < ULMBCS_DOUBLEOPTGROUP_START ) {
bytes_written = LMBCSConversionWorker ( extraInfo , ULMBCS_GRP_L1 , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
if ( ! bytes_written ) {
bytes_written = LMBCSConversionWorker ( extraInfo , ULMBCS_GRP_EXCEPT , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
if ( ! bytes_written ) {
bytes_written = LMBCSConversionWorker ( extraInfo , extraInfo -> localeConverterIndex , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
}
else {
bytes_written = LMBCSConversionWorker ( extraInfo , extraInfo -> localeConverterIndex , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
}
if ( ! bytes_written && ( extraInfo -> localeConverterIndex ) && ( ULMBCS_AMBIGUOUS_MATCH ( group , extraInfo -> localeConverterIndex ) ) ) {
bytes_written = ( int32_t ) LMBCSConversionWorker ( extraInfo , extraInfo -> localeConverterIndex , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
if ( ! bytes_written && ( lastConverterIndex ) && ( ULMBCS_AMBIGUOUS_MATCH ( group , lastConverterIndex ) ) ) {
bytes_written = ( int32_t ) LMBCSConversionWorker ( extraInfo , lastConverterIndex , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
if ( ! bytes_written ) {
ulmbcs_byte_t grp_start ;
ulmbcs_byte_t grp_end ;
ulmbcs_byte_t grp_ix ;
grp_start = ( ulmbcs_byte_t ) ( ( group == ULMBCS_AMBIGUOUS_MBCS ) ? ULMBCS_DOUBLEOPTGROUP_START : ULMBCS_GRP_L1 ) ;
grp_end = ( ulmbcs_byte_t ) ( ( group == ULMBCS_AMBIGUOUS_MBCS ) ? ULMBCS_GRP_LAST : ULMBCS_GRP_TH ) ;
if ( group == ULMBCS_AMBIGUOUS_ALL ) {
grp_start = ULMBCS_GRP_L1 ;
grp_end = ULMBCS_GRP_LAST ;
}
for ( grp_ix = grp_start ;
grp_ix <= grp_end && ! bytes_written ;
grp_ix ++ ) {
if ( extraInfo -> OptGrpConverter [ grp_ix ] && ! groups_tried [ grp_ix ] ) {
bytes_written = ( int32_t ) LMBCSConversionWorker ( extraInfo , grp_ix , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
}
if ( ! bytes_written && grp_start == ULMBCS_GRP_L1 ) {
bytes_written = ( int32_t ) LMBCSConversionWorker ( extraInfo , ULMBCS_GRP_EXCEPT , pLMBCS , & uniChar , & lastConverterIndex , groups_tried ) ;
}
}
if ( ! bytes_written ) {
pLMBCS += LMBCSConvertUni ( pLMBCS , uniChar ) ;
bytes_written = ( int32_t ) ( pLMBCS - LMBCS ) ;
}
}
}
args -> source ++ ;
pLMBCS = LMBCS ;
while ( args -> target < args -> targetLimit && bytes_written -- ) {
* ( args -> target ) ++ = * pLMBCS ++ ;
if ( args -> offsets ) {
* ( args -> offsets ) ++ = sourceIndex ;
}
}
sourceIndex ++ ;
if ( bytes_written > 0 ) {
uint8_t * pErrorBuffer = args -> converter -> charErrorBuffer ;
* err = U_BUFFER_OVERFLOW_ERROR ;
args -> converter -> charErrorBufferLength = ( int8_t ) bytes_written ;
while ( bytes_written -- ) {
* pErrorBuffer ++ = * pLMBCS ++ ;
}
}
extraInfo -> localeConverterIndex = OldConverterIndex ;
}
}
static UChar GetUniFromLMBCSUni ( char const * * ppLMBCSin ) {
uint8_t HighCh = * ( * ppLMBCSin ) ++ ;
uint8_t LowCh = * ( * ppLMBCSin ) ++ ;
if ( HighCh == ULMBCS_UNICOMPATZERO ) {
HighCh = LowCh ;
LowCh = 0 ;
}
return ( UChar ) ( ( HighCh << 8 ) | LowCh ) ;
}
# define CHECK_SOURCE_LIMIT ( index ) if ( args -> source + index > args -> sourceLimit ) {
* err = U_TRUNCATED_CHAR_FOUND ;
args -> source = args -> sourceLimit ;
return 0xffff ;
}
static UChar32 U_CALLCONV _LMBCSGetNextUCharWorker ( UConverterToUnicodeArgs * args , UErrorCode * err ) {
UChar32 uniChar = 0 ;
ulmbcs_byte_t CurByte ;
if ( args -> source >= args -> sourceLimit ) {
* err = U_ILLEGAL_ARGUMENT_ERROR ;
return 0xffff ;
}
CurByte = * ( ( ulmbcs_byte_t * ) ( args -> source ++ ) ) ;
if ( ( ( CurByte > ULMBCS_C0END ) && ( CurByte < ULMBCS_C1START ) ) || ( CurByte == 0 ) || CurByte == ULMBCS_HT || CurByte == ULMBCS_CR || CurByte == ULMBCS_LF || CurByte == ULMBCS_123SYSTEMRANGE ) {
uniChar = CurByte ;
}
else {
UConverterDataLMBCS * extraInfo ;
ulmbcs_byte_t group ;
UConverterSharedData * cnv ;
if ( CurByte == ULMBCS_GRP_CTRL ) {
ulmbcs_byte_t C0C1byte ;
CHECK_SOURCE_LIMIT ( 1 ) ;
C0C1byte = * ( args -> source ) ++ ;
uniChar = ( C0C1byte < ULMBCS_C1START ) ? C0C1byte - ULMBCS_CTRLOFFSET : C0C1byte ;
}
else if ( CurByte == ULMBCS_GRP_UNICODE ) {
CHECK_SOURCE_LIMIT ( 2 ) ;
return GetUniFromLMBCSUni ( & ( args -> source ) ) ;
}
else if ( CurByte <= ULMBCS_CTRLOFFSET ) {
group = CurByte ;
extraInfo = ( UConverterDataLMBCS * ) args -> converter -> extraInfo ;
if ( group > ULMBCS_GRP_LAST || ( cnv = extraInfo -> OptGrpConverter [ group ] ) == NULL ) {
* err = U_INVALID_CHAR_FOUND ;
}
else if ( group >= ULMBCS_DOUBLEOPTGROUP_START ) {
CHECK_SOURCE_LIMIT ( 2 ) ;
if ( * args -> source == group ) {
++ args -> source ;
uniChar = ucnv_MBCSSimpleGetNextUChar ( cnv , args -> source , 1 , FALSE ) ;
++ args -> source ;
}
else {
uniChar = ucnv_MBCSSimpleGetNextUChar ( cnv , args -> source , 2 , FALSE ) ;
args -> source += 2 ;
}
}
else {
CHECK_SOURCE_LIMIT ( 1 ) ;
CurByte = * ( args -> source ) ++ ;
if ( CurByte >= ULMBCS_C1START ) {
uniChar = _MBCS_SINGLE_SIMPLE_GET_NEXT_BMP ( cnv , CurByte ) ;
}
else {
char bytes [ 2 ] ;
extraInfo = ( UConverterDataLMBCS * ) args -> converter -> extraInfo ;
cnv = extraInfo -> OptGrpConverter [ ULMBCS_GRP_EXCEPT ] ;
bytes [ 0 ] = group ;
bytes [ 1 ] = CurByte ;
uniChar = ucnv_MBCSSimpleGetNextUChar ( cnv , bytes , 2 , FALSE ) ;
}
}
}
else if ( CurByte >= ULMBCS_C1START ) {
extraInfo = ( UConverterDataLMBCS * ) args -> converter -> extraInfo ;
group = extraInfo -> OptGroup ;
cnv = extraInfo -> OptGrpConverter [ group ] ;
if ( group >= ULMBCS_DOUBLEOPTGROUP_START ) {
if ( ! ucnv_MBCSIsLeadByte ( cnv , CurByte ) ) {
CHECK_SOURCE_LIMIT ( 0 ) ;
uniChar = ucnv_MBCSSimpleGetNextUChar ( cnv , args -> source - 1 , 1 , FALSE ) ;
}
else {
CHECK_SOURCE_LIMIT ( 1 ) ;
uniChar = ucnv_MBCSSimpleGetNextUChar ( cnv , args -> source - 1 , 2 , FALSE ) ;
++ args -> source ;
}
}
else {
uniChar = _MBCS_SINGLE_SIMPLE_GET_NEXT_BMP ( cnv , CurByte ) ;
}
}
}
return uniChar ;
}
static void U_CALLCONV _LMBCSToUnicodeWithOffsets ( UConverterToUnicodeArgs * args , UErrorCode * err ) {
char LMBCS [ ULMBCS_CHARSIZE_MAX ] ;
UChar uniChar ;
const char * saveSource ;
const char * pStartLMBCS = args -> source ;
const char * errSource = NULL ;
int8_t savebytes = 0 ;
while ( U_SUCCESS ( * err ) && args -> sourceLimit > args -> source && args -> targetLimit > args -> target ) {
saveSource = args -> source ;
if ( args -> converter -> toULength ) {
const char * saveSourceLimit ;
size_t size_old = args -> converter -> toULength ;
size_t size_new_maybe_1 = sizeof ( LMBCS ) - size_old ;
size_t size_new_maybe_2 = args -> sourceLimit - args -> source ;
size_t size_new = ( size_new_maybe_1 < size_new_maybe_2 ) ? size_new_maybe_1 : size_new_maybe_2 ;
uprv_memcpy ( LMBCS , args -> converter -> toUBytes , size_old ) ;
uprv_memcpy ( LMBCS + size_old , args -> source , size_new ) ;
saveSourceLimit = args -> sourceLimit ;
args -> source = errSource = LMBCS ;
args -> sourceLimit = LMBCS + size_old + size_new ;
savebytes = ( int8_t ) ( size_old + size_new ) ;
uniChar = ( UChar ) _LMBCSGetNextUCharWorker ( args , err ) ;
args -> source = saveSource + ( ( args -> source - LMBCS ) - size_old ) ;
args -> sourceLimit = saveSourceLimit ;
if ( * err == U_TRUNCATED_CHAR_FOUND ) {
args -> converter -> toULength = savebytes ;
uprv_memcpy ( args -> converter -> toUBytes , LMBCS , savebytes ) ;
args -> source = args -> sourceLimit ;
* err = U_ZERO_ERROR ;
return ;
}
else {
args -> converter -> toULength = 0 ;
}
}
else {
errSource = saveSource ;
uniChar = ( UChar ) _LMBCSGetNextUCharWorker ( args , err ) ;
savebytes = ( int8_t ) ( args -> source - saveSource ) ;
}
if ( U_SUCCESS ( * err ) ) {
if ( uniChar < 0xfffe ) {
* ( args -> target ) ++ = uniChar ;
if ( args -> offsets ) {
* ( args -> offsets ) ++ = ( int32_t ) ( saveSource - pStartLMBCS ) ;
}
}
else if ( uniChar == 0xfffe ) {
* err = U_INVALID_CHAR_FOUND ;
}
else {
* err = U_ILLEGAL_CHAR_FOUND ;
}
}
}
if ( U_SUCCESS ( * err ) && args -> sourceLimit > args -> source && args -> targetLimit <= args -> target ) {
* err = U_BUFFER_OVERFLOW_ERROR ;
}
else if ( U_FAILURE ( * err ) ) {
args -> converter -> toULength = savebytes ;
if ( savebytes > 0 ) {
uprv_memcpy ( args -> converter -> toUBytes , errSource , savebytes ) ;
}
if ( * err == U_TRUNCATED_CHAR_FOUND ) {
* err = U_ZERO_ERROR ;
}
}
}
DEFINE_LMBCS_OPEN ( 1 ) DEFINE_LMBCS_OPEN ( 2 ) DEFINE_LMBCS_OPEN ( 3 ) DEFINE_LMBCS_OPEN ( 4 ) DEFINE_LMBCS_OPEN ( 5 ) DEFINE_LMBCS_OPEN ( 6 ) DEFINE_LMBCS_OPEN ( 8 ) DEFINE_LMBCS_OPEN ( 11 ) DEFINE_LMBCS_OPEN ( 16 ) DEFINE_LMBCS_OPEN ( 17 ) DEFINE_LMBCS_OPEN ( 18 ) DEFINE_LMBCS_OPEN ( 19 ) |
-769,658,847,024,738,700 | debian | 7 | 0 | static void uiserver_release ( void * engine ) {
engine_uiserver_t uiserver = engine ;
if ( ! uiserver ) return ;
uiserver_cancel ( engine ) ;
free ( uiserver -> colon . attic . line ) ;
free ( uiserver ) ;
} |
2,546,373,479,020,365,300 | debian | 3 | 0 | inline static int is_ws ( char c ) {
return ( ( c == ParseRules : : CHAR_SP ) || ( c == ParseRules : : CHAR_HT ) ) ;
} |
-187,662,502,455,871,230 | debian | 7 | 0 | static int dissect_usb_video_colorformat ( proto_tree * tree , tvbuff_t * tvb , int offset ) {
proto_tree_add_item ( tree , hf_usb_vid_color_primaries , tvb , offset , 1 , ENC_LITTLE_ENDIAN ) ;
proto_tree_add_item ( tree , hf_usb_vid_transfer_characteristics , tvb , offset + 1 , 1 , ENC_LITTLE_ENDIAN ) ;
proto_tree_add_item ( tree , hf_usb_vid_matrix_coefficients , tvb , offset + 2 , 1 , ENC_LITTLE_ENDIAN ) ;
offset += 3 ;
return offset ;
} |
8,415,334,249,344,417,000 | debian | 146 | 0 | static int dissect_u3v_register ( guint64 addr , proto_tree * branch , tvbuff_t * tvb , gint offset , gint length , u3v_conv_info_t * u3v_conv_info ) {
gint isABRM = FALSE , isSBRM = FALSE , isSIRM = FALSE , isEIRM = FALSE ;
if ( addr < 0x10000 ) {
isABRM = TRUE ;
switch ( addr ) {
case U3V_ABRM_GENCP_VERSION : proto_tree_add_item ( branch , hf_u3v_bootstrap_GenCP_Version , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_MANUFACTURER_NAME : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_Manufacturer_Name , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_MODEL_NAME : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_Model_Name , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_FAMILY_NAME : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_Family_Name , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_DEVICE_VERSION : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_Device_Version , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_MANUFACTURER_INFO : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_Manufacturer_Info , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_SERIAL_NUMBER : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_Serial_Number , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_USER_DEFINED_NAME : if ( length <= 64 ) {
proto_tree_add_item ( branch , hf_u3v_bootstrap_User_Defined_Name , tvb , offset , length , ENC_ASCII | ENC_NA ) ;
}
break ;
case U3V_ABRM_DEVICE_CAPABILITY : proto_tree_add_item ( branch , hf_u3v_bootstrap_Device_Capability , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_MAXIMUM_DEVICE_RESPONSE_TIME : proto_tree_add_item ( branch , hf_u3v_bootstrap_Maximum_Device_Response_Time , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_MANIFEST_TABLE_ADDRESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_Manifest_Table_Address , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_SBRM_ADDRESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_SBRM_Address , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_DEVICE_CONFIGURATION : proto_tree_add_item ( branch , hf_u3v_bootstrap_Device_Configuration , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_HEARTBEAT_TIMEOUT : proto_tree_add_item ( branch , hf_u3v_bootstrap_Heartbeat_Timeout , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_MESSAGE_CHANNEL_CHANNEL_ID : proto_tree_add_item ( branch , hf_u3v_bootstrap_Message_Channel_channel_id , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_TIMESTAMP : proto_tree_add_item ( branch , hf_u3v_bootstrap_Timestamp , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_TIMESTAMP_LATCH : proto_tree_add_item ( branch , hf_u3v_bootstrap_Timestamp_Latch , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_TIMESTAMP_INCREMENT : proto_tree_add_item ( branch , hf_u3v_bootstrap_Timestamp_Increment , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_ACCESS_PRIVILEGE : proto_tree_add_item ( branch , hf_u3v_bootstrap_Access_Privilege , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_PROTOCOL_ENDIANESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_Protocol_Endianess , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_ABRM_IMPLEMENTATION_ENDIANESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_Implementation_Endianess , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
default : isABRM = FALSE ;
break ;
}
}
if ( u3v_conv_info -> sbrm_addr != 0 && ( addr >= u3v_conv_info -> sbrm_addr ) ) {
guint64 map_offset = addr - u3v_conv_info -> sbrm_addr ;
isSBRM = TRUE ;
switch ( map_offset ) {
case U3V_SBRM_U3V_VERSION : proto_tree_add_item ( branch , hf_u3v_bootstrap_U3V_Version , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_U3VCP_CAPABILITY_REGISTER : proto_tree_add_item ( branch , hf_u3v_bootstrap_U3VCP_Capability_Register , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_U3VCP_CONFIGURATION_REGISTER : proto_tree_add_item ( branch , hf_u3v_bootstrap_U3VCP_Configuration_Register , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_MAXIMUM_COMMAND_TRANSFER_LENGTH : proto_tree_add_item ( branch , hf_u3v_bootstrap_Maximum_Command_Transfer_Length , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_MAXIMUM_ACKNOWLEDGE_TRANSFER_LENGTH : proto_tree_add_item ( branch , hf_u3v_bootstrap_Maximum_Acknowledge_Transfer_Length , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_NUMBER_OF_STREAM_CHANNELS : proto_tree_add_item ( branch , hf_u3v_bootstrap_Number_of_Stream_Channels , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_SIRM_ADDRESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_SIRM_Address , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_SIRM_LENGTH : proto_tree_add_item ( branch , hf_u3v_bootstrap_SIRM_Length , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_EIRM_ADDRESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_EIRM_Address , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_EIRM_LENGTH : proto_tree_add_item ( branch , hf_u3v_bootstrap_EIRM_Length , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_IIDC2_ADDRESS : proto_tree_add_item ( branch , hf_u3v_bootstrap_IIDC2_Address , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SBRM_CURRENT_SPEED : proto_tree_add_item ( branch , hf_u3v_bootstrap_Current_Speed , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
default : isSBRM = FALSE ;
break ;
}
}
if ( u3v_conv_info -> sirm_addr != 0 && ( addr >= u3v_conv_info -> sirm_addr ) ) {
guint64 map_offset = addr - u3v_conv_info -> sirm_addr ;
isSIRM = TRUE ;
switch ( map_offset ) {
case U3V_SIRM_SI_INFO : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Info , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_CONTROL : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Control , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_REQUIRED_PAYLOAD_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Required_Payload_Size , tvb , offset , 8 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_REQUIRED_LEADER_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Required_Leader_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_REQUIRED_TRAILER_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Required_Trailer_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_MAXIMUM_LEADER_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Maximum_Leader_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_PAYLOAD_TRANSFER_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Payload_Transfer_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_PAYLOAD_TRANSFER_COUNT : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Payload_Transfer_Count , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER1_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Payload_Final_Transfer1_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_PAYLOAD_FINAL_TRANSFER2_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Payload_Final_Transfer2_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_SIRM_SI_MAXIMUM_TRAILER_SIZE : proto_tree_add_item ( branch , hf_u3v_bootstrap_SI_Maximum_Trailer_Size , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
default : isSIRM = FALSE ;
break ;
}
}
if ( u3v_conv_info -> eirm_addr != 0 && ( addr >= u3v_conv_info -> eirm_addr ) ) {
guint64 map_offset = addr - u3v_conv_info -> eirm_addr ;
isEIRM = TRUE ;
switch ( map_offset ) {
case U3V_EIRM_EI_CONTROL : proto_tree_add_item ( branch , hf_u3v_bootstrap_EI_Control , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_EIRM_MAXIMUM_EVENT_TRANSFER_LENGTH : proto_tree_add_item ( branch , hf_u3v_bootstrap_Maximum_Event_Transfer_Length , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
case U3V_EIRM_EVENT_TEST_CONTROL : proto_tree_add_item ( branch , hf_u3v_bootstrap_Event_Test_Control , tvb , offset , 4 , ENC_LITTLE_ENDIAN ) ;
break ;
default : isEIRM = FALSE ;
break ;
}
}
if ( isABRM || isSBRM || isSIRM || isEIRM ) {
return 1 ;
}
return 0 ;
} |
7,549,435,794,356,072,000 | debian | 6 | 0 | static ASN1_NULL * obj_to_asn1null ( VALUE obj ) {
ASN1_NULL * null ;
if ( ! NIL_P ( obj ) ) ossl_raise ( eASN1Error , "nil expected" ) ;
if ( ! ( null = ASN1_NULL_new ( ) ) ) ossl_raise ( eASN1Error , NULL ) ;
return null ;
} |
-2,928,324,134,072,492,500 | debian | 8 | 0 | static int mtp3_calls_packet ( void * ptr _U_ , packet_info * pinfo , epan_dissect_t * edt _U_ , const void * mtp3_info _U_ ) {
const mtp3_tap_rec_t * pi = ( const mtp3_tap_rec_t * ) mtp3_info ;
mtp3_opc = pi -> addr_opc . pc ;
mtp3_dpc = pi -> addr_dpc . pc ;
mtp3_ni = pi -> addr_opc . ni ;
mtp3_frame_num = pinfo -> fd -> num ;
return 0 ;
} |
1,676,654,288,894,940,700 | debian | 31 | 0 | void kadmin_setstring ( int argc , char * argv [ ] ) {
kadm5_ret_t retval ;
char * pname , * canon = NULL , * key , * value ;
krb5_principal princ = NULL ;
if ( argc != 4 ) {
fprintf ( stderr , _ ( "usage: set_string principal key value\n" ) ) ;
return ;
}
pname = argv [ 1 ] ;
key = argv [ 2 ] ;
value = argv [ 3 ] ;
retval = kadmin_parse_name ( pname , & princ ) ;
if ( retval ) {
com_err ( "set_string" , retval , _ ( "while parsing principal" ) ) ;
return ;
}
retval = krb5_unparse_name ( context , princ , & canon ) ;
if ( retval ) {
com_err ( "set_string" , retval , _ ( "while canonicalizing principal" ) ) ;
goto cleanup ;
}
retval = kadm5_set_string ( handle , princ , key , value ) ;
if ( retval ) {
com_err ( "set_string" , retval , _ ( "while setting attribute on principal \"%s\"" ) , canon ) ;
goto cleanup ;
}
printf ( _ ( "Attribute set for principal \"%s\".\n" ) , canon ) ;
cleanup : krb5_free_principal ( context , princ ) ;
free ( canon ) ;
return ;
} |
-1,315,695,702,746,584,300 | debian | 14 | 0 | void proto_register_fields_manual ( const int parent , header_field_info * * hfi , const int num_records ) {
int i ;
protocol_t * proto ;
proto = find_protocol_by_id ( parent ) ;
for ( i = 0 ;
i < num_records ;
i ++ ) {
if ( hfi [ i ] -> id != - 1 ) {
fprintf ( stderr , "Duplicate field detected in call to proto_register_fields: %s is already registered\n" , hfi [ i ] -> abbrev ) ;
return ;
}
proto_register_field_common ( proto , hfi [ i ] , parent ) ;
}
} |
8,947,170,728,280,516,000 | debian | 15 | 0 | static int getfoghex ( _IO * io ) {
int ch , val ;
while ( isspace ( ch = getc ( io -> fog ) ) ) ;
if ( isdigit ( ch ) ) val = ch - '0' ;
else if ( ch >= 'A' && ch <= 'F' ) val = ch - 'A' + 10 ;
else if ( ch >= 'a' && ch <= 'f' ) val = ch - 'a' + 10 ;
else return ( EOF ) ;
val <<= 4 ;
while ( isspace ( ch = getc ( io -> fog ) ) ) ;
if ( isdigit ( ch ) ) val |= ch - '0' ;
else if ( ch >= 'A' && ch <= 'F' ) val |= ch - 'A' + 10 ;
else if ( ch >= 'a' && ch <= 'f' ) val |= ch - 'a' + 10 ;
else return ( EOF ) ;
return ( val ) ;
} |
-704,025,756,752,474,500 | debian | 22 | 0 | void PNGAPI png_set_IHDR ( png_structp png_ptr , png_infop info_ptr , png_uint_32 width , png_uint_32 height , int bit_depth , int color_type , int interlace_type , int compression_type , int filter_type ) {
png_debug1 ( 1 , "in %s storage function" , "IHDR" ) ;
if ( png_ptr == NULL || info_ptr == NULL ) return ;
info_ptr -> width = width ;
info_ptr -> height = height ;
info_ptr -> bit_depth = ( png_byte ) bit_depth ;
info_ptr -> color_type = ( png_byte ) color_type ;
info_ptr -> compression_type = ( png_byte ) compression_type ;
info_ptr -> filter_type = ( png_byte ) filter_type ;
info_ptr -> interlace_type = ( png_byte ) interlace_type ;
png_check_IHDR ( png_ptr , info_ptr -> width , info_ptr -> height , info_ptr -> bit_depth , info_ptr -> color_type , info_ptr -> interlace_type , info_ptr -> compression_type , info_ptr -> filter_type ) ;
if ( info_ptr -> color_type == PNG_COLOR_TYPE_PALETTE ) info_ptr -> channels = 1 ;
else if ( info_ptr -> color_type & PNG_COLOR_MASK_COLOR ) info_ptr -> channels = 3 ;
else info_ptr -> channels = 1 ;
if ( info_ptr -> color_type & PNG_COLOR_MASK_ALPHA ) info_ptr -> channels ++ ;
info_ptr -> pixel_depth = ( png_byte ) ( info_ptr -> channels * info_ptr -> bit_depth ) ;
if ( width > ( PNG_UINT_32_MAX >> 3 ) - 64 - 1 - 7 * 8 - 8 ) {
info_ptr -> rowbytes = ( png_size_t ) 0 ;
png_error ( png_ptr , "Image width is too large for this architecture" ) ;
}
else info_ptr -> rowbytes = PNG_ROWBYTES ( info_ptr -> pixel_depth , width ) ;
} |
-2,424,348,134,098,907,000 | debian | 5 | 0 | static int get_pid_priority ( pid_t pid ) {
struct sched_param par ;
sched_getparam ( pid , & par ) ;
return par . sched_priority ;
} |
2,600,695,546,378,251,300 | debian | 74 | 0 | static int h261_decode_mb ( H261Context * h ) {
MpegEncContext * const s = & h -> s ;
int i , cbp , xy ;
cbp = 63 ;
do {
h -> mba_diff = get_vlc2 ( & s -> gb , h261_mba_vlc . table , H261_MBA_VLC_BITS , 2 ) ;
if ( h -> mba_diff == MBA_STARTCODE ) {
h -> gob_start_code_skipped = 1 ;
return SLICE_END ;
}
}
while ( h -> mba_diff == MBA_STUFFING ) ;
if ( h -> mba_diff < 0 ) {
if ( get_bits_left ( & s -> gb ) <= 7 ) return SLICE_END ;
av_log ( s -> avctx , AV_LOG_ERROR , "illegal mba at %d %d\n" , s -> mb_x , s -> mb_y ) ;
return SLICE_ERROR ;
}
h -> mba_diff += 1 ;
h -> current_mba += h -> mba_diff ;
if ( h -> current_mba > MBA_STUFFING ) return SLICE_ERROR ;
s -> mb_x = ( ( h -> gob_number - 1 ) % 2 ) * 11 + ( ( h -> current_mba - 1 ) % 11 ) ;
s -> mb_y = ( ( h -> gob_number - 1 ) / 2 ) * 3 + ( ( h -> current_mba - 1 ) / 11 ) ;
xy = s -> mb_x + s -> mb_y * s -> mb_stride ;
ff_init_block_index ( s ) ;
ff_update_block_index ( s ) ;
h -> mtype = get_vlc2 ( & s -> gb , h261_mtype_vlc . table , H261_MTYPE_VLC_BITS , 2 ) ;
h -> mtype = h261_mtype_map [ h -> mtype ] ;
if ( IS_QUANT ( h -> mtype ) ) {
ff_set_qscale ( s , get_bits ( & s -> gb , 5 ) ) ;
}
s -> mb_intra = IS_INTRA4x4 ( h -> mtype ) ;
if ( IS_16X16 ( h -> mtype ) ) {
if ( ( h -> current_mba == 1 ) || ( h -> current_mba == 12 ) || ( h -> current_mba == 23 ) || ( h -> mba_diff != 1 ) ) {
h -> current_mv_x = 0 ;
h -> current_mv_y = 0 ;
}
h -> current_mv_x = decode_mv_component ( & s -> gb , h -> current_mv_x ) ;
h -> current_mv_y = decode_mv_component ( & s -> gb , h -> current_mv_y ) ;
}
else {
h -> current_mv_x = 0 ;
h -> current_mv_y = 0 ;
}
if ( HAS_CBP ( h -> mtype ) ) {
cbp = get_vlc2 ( & s -> gb , h261_cbp_vlc . table , H261_CBP_VLC_BITS , 2 ) + 1 ;
}
if ( s -> mb_intra ) {
s -> current_picture . mb_type [ xy ] = MB_TYPE_INTRA ;
goto intra ;
}
s -> mv_dir = MV_DIR_FORWARD ;
s -> mv_type = MV_TYPE_16X16 ;
s -> current_picture . mb_type [ xy ] = MB_TYPE_16x16 | MB_TYPE_L0 ;
s -> mv [ 0 ] [ 0 ] [ 0 ] = h -> current_mv_x * 2 ;
s -> mv [ 0 ] [ 0 ] [ 1 ] = h -> current_mv_y * 2 ;
intra : if ( s -> mb_intra || HAS_CBP ( h -> mtype ) ) {
s -> dsp . clear_blocks ( s -> block [ 0 ] ) ;
for ( i = 0 ;
i < 6 ;
i ++ ) {
if ( h261_decode_block ( h , s -> block [ i ] , i , cbp & 32 ) < 0 ) {
return SLICE_ERROR ;
}
cbp += cbp ;
}
}
else {
for ( i = 0 ;
i < 6 ;
i ++ ) s -> block_last_index [ i ] = - 1 ;
}
ff_MPV_decode_mb ( s , s -> block ) ;
return SLICE_OK ;
} |
-6,024,601,983,167,899,000 | debian | 5 | 0 | static gboolean file_was_cancelled ( NautilusFile * file ) {
GError * error ;
error = nautilus_file_get_file_info_error ( file ) ;
return error != NULL && error -> domain == G_IO_ERROR && error -> code == G_IO_ERROR_CANCELLED ;
} |
7,092,216,800,726,730,000 | debian | 4 | 0 | static int dissect_h245_T_videoNotDecodedMBs ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
offset = dissect_per_sequence ( tvb , offset , actx , tree , hf_index , ett_h245_T_videoNotDecodedMBs , T_videoNotDecodedMBs_sequence ) ;
return offset ;
} |
8,952,659,721,822,030,000 | debian | 167 | 0 | static int dv_decode_video_segment ( AVCodecContext * avctx , void * arg ) {
DVVideoContext * s = avctx -> priv_data ;
DVwork_chunk * work_chunk = arg ;
int quant , dc , dct_mode , class1 , j ;
int mb_index , mb_x , mb_y , last_index ;
int y_stride , linesize ;
int16_t * block , * block1 ;
int c_offset ;
uint8_t * y_ptr ;
const uint8_t * buf_ptr ;
PutBitContext pb , vs_pb ;
GetBitContext gb ;
BlockInfo mb_data [ 5 * DV_MAX_BPM ] , * mb , * mb1 ;
LOCAL_ALIGNED_16 ( int16_t , sblock , [ 5 * DV_MAX_BPM ] , [ 64 ] ) ;
LOCAL_ALIGNED_16 ( uint8_t , mb_bit_buffer , [ 80 + FF_INPUT_BUFFER_PADDING_SIZE ] ) ;
LOCAL_ALIGNED_16 ( uint8_t , vs_bit_buffer , [ 5 * 80 + FF_INPUT_BUFFER_PADDING_SIZE ] ) ;
const int log2_blocksize = 3 ;
int is_field_mode [ 5 ] ;
assert ( ( ( ( int ) mb_bit_buffer ) & 7 ) == 0 ) ;
assert ( ( ( ( int ) vs_bit_buffer ) & 7 ) == 0 ) ;
memset ( sblock , 0 , 5 * DV_MAX_BPM * sizeof ( * sblock ) ) ;
buf_ptr = & s -> buf [ work_chunk -> buf_offset * 80 ] ;
block1 = & sblock [ 0 ] [ 0 ] ;
mb1 = mb_data ;
init_put_bits ( & vs_pb , vs_bit_buffer , 5 * 80 ) ;
for ( mb_index = 0 ;
mb_index < 5 ;
mb_index ++ , mb1 += s -> sys -> bpm , block1 += s -> sys -> bpm * 64 ) {
quant = buf_ptr [ 3 ] & 0x0f ;
buf_ptr += 4 ;
init_put_bits ( & pb , mb_bit_buffer , 80 ) ;
mb = mb1 ;
block = block1 ;
is_field_mode [ mb_index ] = 0 ;
for ( j = 0 ;
j < s -> sys -> bpm ;
j ++ ) {
last_index = s -> sys -> block_sizes [ j ] ;
init_get_bits ( & gb , buf_ptr , last_index ) ;
dc = get_sbits ( & gb , 9 ) ;
dct_mode = get_bits1 ( & gb ) ;
class1 = get_bits ( & gb , 2 ) ;
if ( DV_PROFILE_IS_HD ( s -> sys ) ) {
mb -> idct_put = s -> idct_put [ 0 ] ;
mb -> scan_table = s -> dv_zigzag [ 0 ] ;
mb -> factor_table = & s -> sys -> idct_factor [ ( j >= 4 ) * 4 * 16 * 64 + class1 * 16 * 64 + quant * 64 ] ;
is_field_mode [ mb_index ] |= ! j && dct_mode ;
}
else {
mb -> idct_put = s -> idct_put [ dct_mode && log2_blocksize == 3 ] ;
mb -> scan_table = s -> dv_zigzag [ dct_mode ] ;
mb -> factor_table = & s -> sys -> idct_factor [ ( class1 == 3 ) * 2 * 22 * 64 + dct_mode * 22 * 64 + ( quant + ff_dv_quant_offset [ class1 ] ) * 64 ] ;
}
dc = dc << 2 ;
dc += 1024 ;
block [ 0 ] = dc ;
buf_ptr += last_index >> 3 ;
mb -> pos = 0 ;
mb -> partial_bit_count = 0 ;
av_dlog ( avctx , "MB block: %d, %d " , mb_index , j ) ;
dv_decode_ac ( & gb , mb , block ) ;
if ( mb -> pos >= 64 ) bit_copy ( & pb , & gb ) ;
block += 64 ;
mb ++ ;
}
av_dlog ( avctx , "***pass 2 size=%d MB#=%d\n" , put_bits_count ( & pb ) , mb_index ) ;
block = block1 ;
mb = mb1 ;
init_get_bits ( & gb , mb_bit_buffer , put_bits_count ( & pb ) ) ;
put_bits32 ( & pb , 0 ) ;
flush_put_bits ( & pb ) ;
for ( j = 0 ;
j < s -> sys -> bpm ;
j ++ , block += 64 , mb ++ ) {
if ( mb -> pos < 64 && get_bits_left ( & gb ) > 0 ) {
dv_decode_ac ( & gb , mb , block ) ;
if ( mb -> pos < 64 ) break ;
}
}
if ( j >= s -> sys -> bpm ) bit_copy ( & vs_pb , & gb ) ;
}
av_dlog ( avctx , "***pass 3 size=%d\n" , put_bits_count ( & vs_pb ) ) ;
block = & sblock [ 0 ] [ 0 ] ;
mb = mb_data ;
init_get_bits ( & gb , vs_bit_buffer , put_bits_count ( & vs_pb ) ) ;
put_bits32 ( & vs_pb , 0 ) ;
flush_put_bits ( & vs_pb ) ;
for ( mb_index = 0 ;
mb_index < 5 ;
mb_index ++ ) {
for ( j = 0 ;
j < s -> sys -> bpm ;
j ++ ) {
if ( mb -> pos < 64 ) {
av_dlog ( avctx , "start %d:%d\n" , mb_index , j ) ;
dv_decode_ac ( & gb , mb , block ) ;
}
if ( mb -> pos >= 64 && mb -> pos < 127 ) av_log ( avctx , AV_LOG_ERROR , "AC EOB marker is absent pos=%d\n" , mb -> pos ) ;
block += 64 ;
mb ++ ;
}
}
block = & sblock [ 0 ] [ 0 ] ;
mb = mb_data ;
for ( mb_index = 0 ;
mb_index < 5 ;
mb_index ++ ) {
dv_calculate_mb_xy ( s , work_chunk , mb_index , & mb_x , & mb_y ) ;
if ( ( s -> sys -> pix_fmt == AV_PIX_FMT_YUV420P ) || ( s -> sys -> pix_fmt == AV_PIX_FMT_YUV411P && mb_x >= ( 704 / 8 ) ) || ( s -> sys -> height >= 720 && mb_y != 134 ) ) {
y_stride = ( s -> picture . linesize [ 0 ] << ( ( ! is_field_mode [ mb_index ] ) * log2_blocksize ) ) ;
}
else {
y_stride = ( 2 << log2_blocksize ) ;
}
y_ptr = s -> picture . data [ 0 ] + ( ( mb_y * s -> picture . linesize [ 0 ] + mb_x ) << log2_blocksize ) ;
linesize = s -> picture . linesize [ 0 ] << is_field_mode [ mb_index ] ;
mb [ 0 ] . idct_put ( y_ptr , linesize , block + 0 * 64 ) ;
if ( s -> sys -> video_stype == 4 ) {
mb [ 2 ] . idct_put ( y_ptr + ( 1 << log2_blocksize ) , linesize , block + 2 * 64 ) ;
}
else {
mb [ 1 ] . idct_put ( y_ptr + ( 1 << log2_blocksize ) , linesize , block + 1 * 64 ) ;
mb [ 2 ] . idct_put ( y_ptr + y_stride , linesize , block + 2 * 64 ) ;
mb [ 3 ] . idct_put ( y_ptr + ( 1 << log2_blocksize ) + y_stride , linesize , block + 3 * 64 ) ;
}
mb += 4 ;
block += 4 * 64 ;
c_offset = ( ( ( mb_y >> ( s -> sys -> pix_fmt == AV_PIX_FMT_YUV420P ) ) * s -> picture . linesize [ 1 ] + ( mb_x >> ( ( s -> sys -> pix_fmt == AV_PIX_FMT_YUV411P ) ? 2 : 1 ) ) ) << log2_blocksize ) ;
for ( j = 2 ;
j ;
j -- ) {
uint8_t * c_ptr = s -> picture . data [ j ] + c_offset ;
if ( s -> sys -> pix_fmt == AV_PIX_FMT_YUV411P && mb_x >= ( 704 / 8 ) ) {
uint64_t aligned_pixels [ 64 / 8 ] ;
uint8_t * pixels = ( uint8_t * ) aligned_pixels ;
uint8_t * c_ptr1 , * ptr1 ;
int x , y ;
mb -> idct_put ( pixels , 8 , block ) ;
for ( y = 0 ;
y < ( 1 << log2_blocksize ) ;
y ++ , c_ptr += s -> picture . linesize [ j ] , pixels += 8 ) {
ptr1 = pixels + ( 1 << ( log2_blocksize - 1 ) ) ;
c_ptr1 = c_ptr + ( s -> picture . linesize [ j ] << log2_blocksize ) ;
for ( x = 0 ;
x < ( 1 << ( log2_blocksize - 1 ) ) ;
x ++ ) {
c_ptr [ x ] = pixels [ x ] ;
c_ptr1 [ x ] = ptr1 [ x ] ;
}
}
block += 64 ;
mb ++ ;
}
else {
y_stride = ( mb_y == 134 ) ? ( 1 << log2_blocksize ) : s -> picture . linesize [ j ] << ( ( ! is_field_mode [ mb_index ] ) * log2_blocksize ) ;
linesize = s -> picture . linesize [ j ] << is_field_mode [ mb_index ] ;
( mb ++ ) -> idct_put ( c_ptr , linesize , block ) ;
block += 64 ;
if ( s -> sys -> bpm == 8 ) {
( mb ++ ) -> idct_put ( c_ptr + y_stride , linesize , block ) ;
block += 64 ;
}
}
}
}
return 0 ;
} |
1,614,547,608,286,395,100 | debian | 20 | 0 | void try_outgoing_connections ( void ) {
static config_t * cfg = NULL ;
char * name ;
outgoing_t * outgoing ;
outgoing_list = list_alloc ( ( list_action_t ) free_outgoing ) ;
for ( cfg = lookup_config ( config_tree , "ConnectTo" ) ;
cfg ;
cfg = lookup_config_next ( config_tree , cfg ) ) {
get_config_string ( cfg , & name ) ;
if ( ! check_id ( name ) ) {
logger ( LOG_ERR , "Invalid name for outgoing connection in %s line %d" , cfg -> file , cfg -> line ) ;
free ( name ) ;
continue ;
}
outgoing = xmalloc_and_zero ( sizeof ( * outgoing ) ) ;
outgoing -> name = name ;
list_insert_tail ( outgoing_list , outgoing ) ;
setup_outgoing_connection ( outgoing ) ;
}
} |
5,360,072,031,850,966,000 | debian | 3 | 0 | static void prep_machine_init ( void ) {
qemu_register_machine ( & prep_machine ) ;
} |
-7,884,836,206,149,374,000 | chrome | 5 | 0 | IN_PROC_BROWSER_TEST_F ( BluetoothChooserBrowserTest , InvokeDialog_ScanningWithDevicesModal ) {
set_status ( FakeBluetoothChooserController : : BluetoothStatus : : SCANNING ) ;
AddDeviceForAllStrengths ( ) ;
RunDialog ( ) ;
} |
7,823,043,019,110,227,000 | chrome | 6 | 1 | TEST_F ( ExternalProtocolHandlerTest , TestGetBlockStateUnknown ) {
ExternalProtocolHandler : : BlockState block_state = ExternalProtocolHandler : : GetBlockState ( "tel" , profile_ . get ( ) ) ;
EXPECT_EQ ( ExternalProtocolHandler : : UNKNOWN , block_state ) ;
EXPECT_TRUE ( local_state_ -> GetDictionary ( prefs : : kExcludedSchemes ) -> empty ( ) ) ;
EXPECT_FALSE ( profile_ -> GetPrefs ( ) -> GetDictionary ( prefs : : kExcludedSchemes ) -> empty ( ) ) ;
} |
-1,983,921,383,858,884,000 | debian | 44 | 0 | static int ipvideo_decode_block_opcode_0xA ( IpvideoContext * s , AVFrame * frame ) {
int x , y ;
unsigned char P [ 8 ] ;
int flags = 0 ;
bytestream2_get_buffer ( & s -> stream_ptr , P , 4 ) ;
if ( P [ 0 ] <= P [ 1 ] ) {
for ( y = 0 ;
y < 16 ;
y ++ ) {
if ( ! ( y & 3 ) ) {
if ( y ) bytestream2_get_buffer ( & s -> stream_ptr , P , 4 ) ;
flags = bytestream2_get_le32 ( & s -> stream_ptr ) ;
}
for ( x = 0 ;
x < 4 ;
x ++ , flags >>= 2 ) * s -> pixel_ptr ++ = P [ flags & 0x03 ] ;
s -> pixel_ptr += s -> stride - 4 ;
if ( y == 7 ) s -> pixel_ptr -= 8 * s -> stride - 4 ;
}
}
else {
int vert ;
uint64_t flags = bytestream2_get_le64 ( & s -> stream_ptr ) ;
bytestream2_get_buffer ( & s -> stream_ptr , P + 4 , 4 ) ;
vert = P [ 4 ] <= P [ 5 ] ;
for ( y = 0 ;
y < 16 ;
y ++ ) {
for ( x = 0 ;
x < 4 ;
x ++ , flags >>= 2 ) * s -> pixel_ptr ++ = P [ flags & 0x03 ] ;
if ( vert ) {
s -> pixel_ptr += s -> stride - 4 ;
if ( y == 7 ) s -> pixel_ptr -= 8 * s -> stride - 4 ;
}
else if ( y & 1 ) s -> pixel_ptr += s -> line_inc ;
if ( y == 7 ) {
memcpy ( P , P + 4 , 4 ) ;
flags = bytestream2_get_le64 ( & s -> stream_ptr ) ;
}
}
}
return 0 ;
} |
-1,919,011,628,477,389,000 | debian | 6 | 0 | static int get_current_cpu ( void ) {
if ( ! current_cpu ) {
return - 1 ;
}
return current_cpu -> cpu_index ;
} |
1,208,165,234,047,591,400 | debian | 5 | 0 | proto_item * parseByte ( proto_tree * tree , tvbuff_t * tvb , packet_info * pinfo _U_ , gint * pOffset , int hfIndex ) {
proto_item * item = proto_tree_add_item ( tree , hfIndex , tvb , * pOffset , 1 , ENC_LITTLE_ENDIAN ) ;
* pOffset += 1 ;
return item ;
} |
2,820,551,931,453,396,000 | debian | 19 | 0 | static int getint ( jas_stream_t * in , int sgnd , int prec , long * val ) {
long v ;
int n ;
int c ;
n = ( prec + 7 ) / 8 ;
v = 0 ;
while ( -- n >= 0 ) {
if ( ( c = jas_stream_getc ( in ) ) == EOF ) return - 1 ;
v = ( v << 8 ) | c ;
}
v &= ( ( 1 << prec ) - 1 ) ;
if ( sgnd ) {
abort ( ) ;
}
else {
* val = v ;
}
return 0 ;
} |
6,752,827,389,510,429,000 | chrome | 26 | 0 | IN_PROC_BROWSER_TEST_F ( ClientHintsBrowserTest , ClientHintsNoLifetimeScriptNotAllowed ) {
base : : HistogramTester histogram_tester ;
ContentSettingsForOneType host_settings ;
HostContentSettingsMapFactory : : GetForProfile ( browser ( ) -> profile ( ) ) -> GetSettingsForOneType ( CONTENT_SETTINGS_TYPE_CLIENT_HINTS , std : : string ( ) , & host_settings ) ;
EXPECT_EQ ( 0u , host_settings . size ( ) ) ;
SetClientHintExpectationsOnSubresources ( false ) ;
HostContentSettingsMapFactory : : GetForProfile ( browser ( ) -> profile ( ) ) -> SetContentSettingDefaultScope ( accept_ch_without_lifetime_img_localhost ( ) , GURL ( ) , CONTENT_SETTINGS_TYPE_JAVASCRIPT , std : : string ( ) , CONTENT_SETTING_BLOCK ) ;
ui_test_utils : : NavigateToURL ( browser ( ) , accept_ch_without_lifetime_img_localhost ( ) ) ;
EXPECT_EQ ( 0u , count_client_hints_headers_seen ( ) ) ;
EXPECT_EQ ( 1u , third_party_request_count_seen ( ) ) ;
EXPECT_EQ ( 0u , third_party_client_hints_count_seen ( ) ) ;
HostContentSettingsMapFactory : : GetForProfile ( browser ( ) -> profile ( ) ) -> SetContentSettingDefaultScope ( accept_ch_without_lifetime_img_localhost ( ) , GURL ( ) , CONTENT_SETTINGS_TYPE_JAVASCRIPT , std : : string ( ) , CONTENT_SETTING_ALLOW ) ;
SetClientHintExpectationsOnSubresources ( true ) ;
ui_test_utils : : NavigateToURL ( browser ( ) , accept_ch_without_lifetime_img_localhost ( ) ) ;
EXPECT_EQ ( 3u , count_client_hints_headers_seen ( ) ) ;
EXPECT_EQ ( 2u , third_party_request_count_seen ( ) ) ;
EXPECT_EQ ( 0u , third_party_client_hints_count_seen ( ) ) ;
VerifyContentSettingsNotNotified ( ) ;
HostContentSettingsMapFactory : : GetForProfile ( browser ( ) -> profile ( ) ) -> ClearSettingsForOneType ( CONTENT_SETTINGS_TYPE_JAVASCRIPT ) ;
SetClientHintExpectationsOnSubresources ( false ) ;
HostContentSettingsMapFactory : : GetForProfile ( browser ( ) -> profile ( ) ) -> SetContentSettingDefaultScope ( accept_ch_without_lifetime_img_localhost ( ) , GURL ( ) , CONTENT_SETTINGS_TYPE_JAVASCRIPT , std : : string ( ) , CONTENT_SETTING_BLOCK ) ;
ui_test_utils : : NavigateToURL ( browser ( ) , accept_ch_without_lifetime_img_localhost ( ) ) ;
EXPECT_EQ ( 3u , count_client_hints_headers_seen ( ) ) ;
EXPECT_EQ ( 3u , third_party_request_count_seen ( ) ) ;
EXPECT_EQ ( 0u , third_party_client_hints_count_seen ( ) ) ;
} |
2,542,574,915,000,172,000 | chrome | 3 | 0 | IN_PROC_BROWSER_TEST_F ( VirtualKeyboardBrowserTest , HideKeyboardKeyTest ) {
RunTest ( base : : FilePath ( FILE_PATH_LITERAL ( "hide_keyboard_key_test.js" ) ) ) ;
} |
-5,357,254,031,401,750,000 | debian | 16 | 0 | static void f_parser ( lua_State * L , void * ud ) {
int i ;
Proto * tf ;
Closure * cl ;
struct SParser * p = cast ( struct SParser * , ud ) ;
int c = luaZ_lookahead ( p -> z ) ;
luaC_checkGC ( L ) ;
tf = ( luaY_parser ) ( L , p -> z , & p -> buff , p -> name ) ;
cl = luaF_newLclosure ( L , tf -> nups , hvalue ( gt ( L ) ) ) ;
cl -> l . p = tf ;
for ( i = 0 ;
i < tf -> nups ;
i ++ ) cl -> l . upvals [ i ] = luaF_newupval ( L ) ;
setclvalue ( L , L -> top , cl ) ;
incr_top ( L ) ;
} |
1,245,821,301,839,614,700 | debian | 6 | 0 | static void skip_readdir_error ( CommonJob * common , GFile * dir ) {
if ( common -> skip_readdir_error == NULL ) {
common -> skip_readdir_error = g_hash_table_new_full ( g_file_hash , ( GEqualFunc ) g_file_equal , g_object_unref , NULL ) ;
}
g_hash_table_insert ( common -> skip_readdir_error , g_object_ref ( dir ) , dir ) ;
} |
-3,062,453,801,436,404,700 | debian | 19 | 1 | static ossl_inline void sk_ ## t1 ## _sort ( STACK_OF ( t1 ) * sk ) {
OPENSSL_sk_sort ( ( OPENSSL_STACK * ) sk ) ;
}
static ossl_inline int sk_ ## t1 ## _is_sorted ( const STACK_OF ( t1 ) * sk ) {
return OPENSSL_sk_is_sorted ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _dup ( const STACK_OF ( t1 ) * sk ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_dup ( ( const OPENSSL_STACK * ) sk ) ;
}
static ossl_inline STACK_OF ( t1 ) * sk_ ## t1 ## _deep_copy ( const STACK_OF ( t1 ) * sk , sk_ ## t1 ## _copyfunc copyfunc , sk_ ## t1 ## _freefunc freefunc ) {
return ( STACK_OF ( t1 ) * ) OPENSSL_sk_deep_copy ( ( const OPENSSL_STACK * ) sk , ( OPENSSL_sk_copyfunc ) copyfunc , ( OPENSSL_sk_freefunc ) freefunc ) ;
}
static ossl_inline sk_ ## t1 ## _compfunc sk_ ## t1 ## _set_cmp_func ( STACK_OF ( t1 ) * sk , sk_ ## t1 ## _compfunc compare ) {
return ( sk_ ## t1 ## _compfunc ) OPENSSL_sk_set_cmp_func ( ( OPENSSL_STACK * ) sk , ( OPENSSL_sk_compfunc ) compare ) ;
}
# define DEFINE_SPECIAL_STACK_OF ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , t2 , t2 ) # define DEFINE_STACK_OF ( t ) SKM_DEFINE_STACK_OF ( t , t , t ) # define DEFINE_SPECIAL_STACK_OF_CONST ( t1 , t2 ) SKM_DEFINE_STACK_OF ( t1 , const t2 , t2 ) # define DEFINE_STACK_OF_CONST ( t ) SKM_DEFINE_STACK_OF ( t , const t , t ) typedef char * OPENSSL_STRING ;
typedef const char * OPENSSL_CSTRING ;
DEFINE_SPECIAL_STACK_OF ( OPENSSL_STRING , char ) DEFINE_SPECIAL_STACK_OF_CONST ( OPENSSL_CSTRING , char ) typedef void * OPENSSL_BLOCK ;
DEFINE_SPECIAL_STACK_OF ( OPENSSL_BLOCK , void ) |
-8,395,062,201,045,617,000 | debian | 21 | 0 | static inline int asv1_decode_block ( ASV1Context * a , int16_t block [ 64 ] ) {
int i ;
block [ 0 ] = 8 * get_bits ( & a -> gb , 8 ) ;
for ( i = 0 ;
i < 11 ;
i ++ ) {
const int ccp = get_vlc2 ( & a -> gb , ccp_vlc . table , VLC_BITS , 1 ) ;
if ( ccp ) {
if ( ccp == 16 ) break ;
if ( ccp < 0 || i >= 10 ) {
av_log ( a -> avctx , AV_LOG_ERROR , "coded coeff pattern damaged\n" ) ;
return AVERROR_INVALIDDATA ;
}
if ( ccp & 8 ) block [ a -> scantable . permutated [ 4 * i + 0 ] ] = ( asv1_get_level ( & a -> gb ) * a -> intra_matrix [ 4 * i + 0 ] ) >> 4 ;
if ( ccp & 4 ) block [ a -> scantable . permutated [ 4 * i + 1 ] ] = ( asv1_get_level ( & a -> gb ) * a -> intra_matrix [ 4 * i + 1 ] ) >> 4 ;
if ( ccp & 2 ) block [ a -> scantable . permutated [ 4 * i + 2 ] ] = ( asv1_get_level ( & a -> gb ) * a -> intra_matrix [ 4 * i + 2 ] ) >> 4 ;
if ( ccp & 1 ) block [ a -> scantable . permutated [ 4 * i + 3 ] ] = ( asv1_get_level ( & a -> gb ) * a -> intra_matrix [ 4 * i + 3 ] ) >> 4 ;
}
}
return 0 ;
} |
-7,795,592,811,940,875,000 | debian | 60 | 1 | static gcry_err_code_t sexp_to_sig ( gcry_sexp_t sexp , gcry_mpi_t * * retarray , gcry_module_t * retalgo ) {
gcry_err_code_t err = 0 ;
gcry_sexp_t list , l2 ;
char * name ;
const char * elems ;
gcry_mpi_t * array ;
gcry_module_t module ;
gcry_pk_spec_t * pubkey ;
list = gcry_sexp_find_token ( sexp , "sig-val" , 0 ) ;
if ( ! list ) return GPG_ERR_INV_OBJ ;
l2 = gcry_sexp_nth ( list , 1 ) ;
if ( ! l2 ) {
gcry_sexp_release ( list ) ;
return GPG_ERR_NO_OBJ ;
}
name = _gcry_sexp_nth_string ( l2 , 0 ) ;
if ( ! name ) {
gcry_sexp_release ( list ) ;
gcry_sexp_release ( l2 ) ;
return GPG_ERR_INV_OBJ ;
}
else if ( ! strcmp ( name , "flags" ) ) {
gcry_free ( name ) ;
gcry_sexp_release ( l2 ) ;
l2 = gcry_sexp_nth ( list , 2 ) ;
if ( ! l2 ) {
gcry_sexp_release ( list ) ;
return GPG_ERR_INV_OBJ ;
}
name = _gcry_sexp_nth_string ( l2 , 0 ) ;
}
ath_mutex_lock ( & pubkeys_registered_lock ) ;
module = gcry_pk_lookup_name ( name ) ;
ath_mutex_unlock ( & pubkeys_registered_lock ) ;
gcry_free ( name ) ;
name = NULL ;
if ( ! module ) {
gcry_sexp_release ( l2 ) ;
gcry_sexp_release ( list ) ;
return GPG_ERR_PUBKEY_ALGO ;
}
else pubkey = ( gcry_pk_spec_t * ) module -> spec ;
elems = pubkey -> elements_sig ;
array = gcry_calloc ( strlen ( elems ) + 1 , sizeof * array ) ;
if ( ! array ) err = gpg_err_code_from_syserror ( ) ;
if ( ! err ) err = sexp_elements_extract ( list , elems , array , NULL ) ;
gcry_sexp_release ( l2 ) ;
gcry_sexp_release ( list ) ;
if ( err ) {
ath_mutex_lock ( & pubkeys_registered_lock ) ;
_gcry_module_release ( module ) ;
ath_mutex_unlock ( & pubkeys_registered_lock ) ;
gcry_free ( array ) ;
}
else {
* retarray = array ;
* retalgo = module ;
}
return err ;
} |
561,876,472,800,374,400 | debian | 3 | 0 | void RECORD_LAYER_reset_write_sequence ( RECORD_LAYER * rl ) {
memset ( rl -> write_sequence , 0 , sizeof ( rl -> write_sequence ) ) ;
} |
-1,983,921,383,858,884,000 | debian | 20 | 1 | static int ipvideo_decode_block_opcode_0x3 ( IpvideoContext * s ) {
unsigned char B ;
int x , y ;
if ( ! s -> is_16bpp ) {
B = bytestream2_get_byte ( & s -> stream_ptr ) ;
}
else {
B = bytestream2_get_byte ( & s -> mv_ptr ) ;
}
if ( B < 56 ) {
x = - ( 8 + ( B % 7 ) ) ;
y = - ( B / 7 ) ;
}
else {
x = - ( - 14 + ( ( B - 56 ) % 29 ) ) ;
y = - ( 8 + ( ( B - 56 ) / 29 ) ) ;
}
av_dlog ( NULL , " motion byte = %d, (x, y) = (%d, %d)\n" , B , x , y ) ;
return copy_from ( s , & s -> current_frame , x , y ) ;
} |
355,220,887,711,506,900 | debian | 11 | 0 | void get_join_variables ( PlannerInfo * root , List * args , SpecialJoinInfo * sjinfo , VariableStatData * vardata1 , VariableStatData * vardata2 , bool * join_is_reversed ) {
Node * left , * right ;
if ( list_length ( args ) != 2 ) elog ( ERROR , "join operator should take two arguments" ) ;
left = ( Node * ) linitial ( args ) ;
right = ( Node * ) lsecond ( args ) ;
examine_variable ( root , left , 0 , vardata1 ) ;
examine_variable ( root , right , 0 , vardata2 ) ;
if ( vardata1 -> rel && bms_is_subset ( vardata1 -> rel -> relids , sjinfo -> syn_righthand ) ) * join_is_reversed = true ;
else if ( vardata2 -> rel && bms_is_subset ( vardata2 -> rel -> relids , sjinfo -> syn_lefthand ) ) * join_is_reversed = true ;
else * join_is_reversed = false ;
} |
-8,228,664,527,580,019,000 | debian | 11 | 0 | static int addbyter ( int output , FILE * data ) {
struct nsprintf * infop = ( struct nsprintf * ) data ;
unsigned char outc = ( unsigned char ) output ;
if ( infop -> length < infop -> max ) {
infop -> buffer [ 0 ] = outc ;
infop -> buffer ++ ;
infop -> length ++ ;
return outc ;
}
return - 1 ;
} |
355,220,887,711,506,900 | debian | 12 | 0 | static RelOptInfo * find_join_input_rel ( PlannerInfo * root , Relids relids ) {
RelOptInfo * rel = NULL ;
switch ( bms_membership ( relids ) ) {
case BMS_EMPTY_SET : break ;
case BMS_SINGLETON : rel = find_base_rel ( root , bms_singleton_member ( relids ) ) ;
break ;
case BMS_MULTIPLE : rel = find_join_rel ( root , relids ) ;
break ;
}
if ( rel == NULL ) elog ( ERROR , "could not find RelOptInfo for given relids" ) ;
return rel ;
} |
4,876,100,961,671,883,000 | debian | 3 | 0 | static int dissect_pvfs2_io_response ( tvbuff_t * tvb , proto_tree * tree , int offset ) {
return dissect_pvfs_uint64 ( tvb , tree , offset , hf_pvfs_size , NULL ) ;
} |
2,447,070,537,606,626,300 | debian | 5 | 1 | extern int name ( int ) __THROW __exctype ( isalnum ) ;
__exctype ( isalpha ) ;
__exctype ( iscntrl ) ;
__exctype ( isdigit ) ;
__exctype ( islower ) |
1,161,306,432,039,958,300 | chrome | 7 | 0 | static void evport_dealloc ( struct event_base * base , void * arg ) {
struct evport_data * evpd = arg ;
evsignal_dealloc ( base ) ;
close ( evpd -> ed_port ) ;
if ( evpd -> ed_fds ) free ( evpd -> ed_fds ) ;
free ( evpd ) ;
} |
-6,126,432,314,261,452,000 | debian | 9 | 0 | int gs_closedevice ( gx_device * dev ) {
int code = 0 ;
if ( dev -> is_open ) {
code = ( * dev_proc ( dev , close_device ) ) ( dev ) ;
dev -> is_open = false ;
if ( code < 0 ) return_error ( code ) ;
}
return code ;
} |
4,489,017,523,191,997,000 | debian | 4 | 0 | int dissect_h225_GatekeeperIdentifier ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
offset = dissect_per_BMPString ( tvb , offset , actx , tree , hf_index , 1 , 128 , FALSE ) ;
return offset ;
} |
-5,992,472,514,718,425,000 | debian | 13 | 0 | static int lxc_cgroupfs_set ( const char * filename , const char * value , const char * name , const char * lxcpath ) {
char * subsystem = NULL , * p , * path ;
int ret = - 1 ;
subsystem = alloca ( strlen ( filename ) + 1 ) ;
strcpy ( subsystem , filename ) ;
if ( ( p = strchr ( subsystem , '.' ) ) != NULL ) * p = '\0' ;
path = lxc_cgroup_get_hierarchy_abs_path ( subsystem , name , lxcpath ) ;
if ( path ) {
ret = do_cgroup_set ( path , filename , value ) ;
free ( path ) ;
}
return ret ;
} |
7,607,805,321,589,710,000 | debian | 3 | 0 | int zreadonly ( i_ctx_t * i_ctx_p ) {
return access_check ( i_ctx_p , a_readonly , true ) ;
} |
-7,777,644,912,037,189,000 | debian | 16 | 0 | static void tvb_raw_text_add ( tvbuff_t * tvb , proto_tree * tree ) {
proto_tree * raw_tree = NULL ;
proto_item * ti = NULL ;
int offset , next_offset , linelen ;
if ( tree ) {
ti = proto_tree_add_item ( tree , proto_raw_sigcomp , tvb , 0 , - 1 , ENC_NA ) ;
raw_tree = proto_item_add_subtree ( ti , ett_raw_text ) ;
}
offset = 0 ;
while ( tvb_offset_exists ( tvb , offset ) ) {
tvb_find_line_end ( tvb , offset , - 1 , & next_offset , FALSE ) ;
linelen = next_offset - offset ;
proto_tree_add_format_text ( raw_tree , tvb , offset , linelen ) ;
offset = next_offset ;
}
} |
1,742,637,512,846,796,500 | debian | 38 | 0 | static tvbuff_t * reassemble ( tvbuff_t * tvb , body_parts * * body_parts_array , guint16 head_tsn , guint length , mac_is_channel * ch , guint frame_num ) {
mac_is_sdu * sdu ;
mac_is_fragment * f ;
guint16 i ;
GHashTable * sdus ;
sdus = ( GHashTable * ) g_hash_table_lookup ( mac_is_sdus , ch ) ;
if ( sdus == NULL ) {
mac_is_channel * channel ;
sdus = g_hash_table_new ( mac_is_fragment_hash , mac_is_fragment_equal ) ;
channel = wmem_new ( wmem_file_scope ( ) , mac_is_channel ) ;
* channel = * ch ;
g_hash_table_insert ( mac_is_sdus , channel , sdus ) ;
}
sdu = wmem_new ( wmem_file_scope ( ) , mac_is_sdu ) ;
sdu -> length = 0 ;
sdu -> data = ( guint8 * ) wmem_alloc ( wmem_file_scope ( ) , length ) ;
f = body_parts_array [ head_tsn ] -> head ;
g_hash_table_insert ( sdus , f , sdu ) ;
body_parts_array [ head_tsn ] -> head = NULL ;
mac_is_copy ( sdu , f , length , FALSE ) ;
sdu -> fragments = f ;
sdu -> frame_num = frame_num ;
for ( i = ( head_tsn + 1 ) % MAX_TSN ;
body_parts_array [ i ] -> middle != NULL ;
i = ( i + 1 ) % MAX_TSN ) {
f = f -> next = body_parts_array [ i ] -> middle ;
g_hash_table_insert ( sdus , f , sdu ) ;
body_parts_array [ i ] -> middle = NULL ;
mac_is_copy ( sdu , f , length , FALSE ) ;
}
DISSECTOR_ASSERT ( body_parts_array [ i ] -> tail != NULL ) ;
f -> next = body_parts_array [ i ] -> tail ;
g_hash_table_insert ( sdus , f -> next , sdu ) ;
body_parts_array [ i ] -> tail = NULL ;
sdu -> tsn = i ;
mac_is_copy ( sdu , f -> next , length , FALSE ) ;
return tvb_new_child_real_data ( tvb , sdu -> data , sdu -> length , sdu -> length ) ;
} |
3,528,176,083,733,952,000 | debian | 18 | 0 | static uint64_t vmport_ioport_read ( void * opaque , hwaddr addr , unsigned size ) {
VMPortState * s = opaque ;
CPUState * cs = current_cpu ;
X86CPU * cpu = X86_CPU ( cs ) ;
CPUX86State * env = & cpu -> env ;
unsigned char command ;
uint32_t eax ;
cpu_synchronize_state ( cs ) ;
eax = env -> regs [ R_EAX ] ;
if ( eax != VMPORT_MAGIC ) return eax ;
command = env -> regs [ R_ECX ] ;
if ( command >= VMPORT_ENTRIES ) return eax ;
if ( ! s -> func [ command ] ) {
# ifdef VMPORT_DEBUG fprintf ( stderr , "vmport: unknown command %x\n" , command ) ;
# endif return eax ;
}
return s -> func [ command ] ( s -> opaque [ command ] , addr ) ;
} |
8,206,514,580,434,226,000 | chrome | 9 | 1 | IN_PROC_BROWSER_TEST_F ( HttpsEngagementPageLoadMetricsBrowserTest , ClosedWhileHidden_Http ) {
StartHttpServer ( ) ;
base : : TimeDelta upper_bound = NavigateInForegroundAndCloseInBackgroundWithTiming ( http_test_server_ -> GetURL ( "/simple.html" ) ) ;
histogram_tester_ . ExpectTotalCount ( internal : : kHttpEngagementHistogram , 1 ) ;
histogram_tester_ . ExpectTotalCount ( internal : : kHttpsEngagementHistogram , 0 ) ;
int32_t bucket_min = histogram_tester_ . GetAllSamples ( internal : : kHttpEngagementHistogram ) [ 0 ] . min ;
EXPECT_GE ( upper_bound . InMilliseconds ( ) , bucket_min ) ;
EXPECT_LT ( 0 , bucket_min ) ;
} |
7,092,216,800,726,730,000 | debian | 4 | 0 | static int dissect_h245_SEQUENCE_OF_MultiplePayloadStreamElementMode ( tvbuff_t * tvb _U_ , int offset _U_ , asn1_ctx_t * actx _U_ , proto_tree * tree _U_ , int hf_index _U_ ) {
offset = dissect_per_sequence_of ( tvb , offset , actx , tree , hf_index , ett_h245_SEQUENCE_OF_MultiplePayloadStreamElementMode , SEQUENCE_OF_MultiplePayloadStreamElementMode_sequence_of ) ;
return offset ;
} |
-1,315,695,702,746,584,300 | debian | 13 | 1 | proto_item * proto_tree_add_text_internal ( proto_tree * tree , tvbuff_t * tvb , gint start , gint length , const char * format , ... ) {
proto_item * pi ;
va_list ap ;
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 ) ;
va_start ( ap , format ) ;
proto_tree_set_representation ( pi , format , ap ) ;
va_end ( ap ) ;
return pi ;
} |
-8,620,097,311,326,519,000 | chrome | 15 | 0 | unsigned int srtp_profile_get_master_salt_length ( srtp_profile_t profile ) {
switch ( profile ) {
case srtp_profile_aes128_cm_sha1_80 : return 14 ;
break ;
case srtp_profile_aes128_cm_sha1_32 : return 14 ;
break ;
case srtp_profile_null_sha1_80 : return 14 ;
break ;
case srtp_profile_aes256_cm_sha1_80 : return 14 ;
break ;
case srtp_profile_aes256_cm_sha1_32 : return 14 ;
break ;
case srtp_profile_null_sha1_32 : default : return 0 ;
}
} |
7,651,945,086,108,393,000 | debian | 20 | 0 | int qemuMonitorJSONSetCPU ( qemuMonitorPtr mon , int cpu , int online ) {
int ret ;
virJSONValuePtr cmd = qemuMonitorJSONMakeCommand ( "cpu_set" , "U:cpu" , ( unsigned long long ) cpu , "s:state" , online ? "online" : "offline" , NULL ) ;
virJSONValuePtr reply = NULL ;
if ( ! cmd ) return - 1 ;
if ( ( ret = qemuMonitorJSONCommand ( mon , cmd , & reply ) ) < 0 ) goto cleanup ;
if ( qemuMonitorJSONHasError ( reply , "CommandNotFound" ) && qemuMonitorCheckHMP ( mon , "cpu_set" ) ) {
VIR_DEBUG ( "cpu_set command not found, trying HMP" ) ;
ret = qemuMonitorTextSetCPU ( mon , cpu , online ) ;
goto cleanup ;
}
if ( ret == 0 ) {
# if 0 if ( qemuMonitorJSONHasError ( reply , "DeviceNotActive" ) || qemuMonitorJSONHasError ( reply , "KVMMissingCap" ) ) goto cleanup ;
# endif ret = qemuMonitorJSONCheckError ( cmd , reply ) ;
if ( ret == 0 ) ret = 1 ;
}
cleanup : virJSONValueFree ( cmd ) ;
virJSONValueFree ( reply ) ;
return ret ;
} |
6,415,329,349,331,063,000 | chrome | 32 | 0 | static void http_dispatcher_test ( void ) {
short port = - 1 ;
struct evhttp_connection * evcon = NULL ;
struct evhttp_request * req = NULL ;
test_ok = 0 ;
fprintf ( stdout , "Testing HTTP Dispatcher: " ) ;
http = http_setup ( & port , NULL ) ;
evcon = evhttp_connection_new ( "127.0.0.1" , port ) ;
if ( evcon == NULL ) {
fprintf ( stdout , "FAILED\n" ) ;
exit ( 1 ) ;
}
evhttp_connection_set_local_address ( evcon , "127.0.0.1" ) ;
req = evhttp_request_new ( http_dispatcher_test_done , NULL ) ;
if ( req == NULL ) {
fprintf ( stdout , "FAILED\n" ) ;
exit ( 1 ) ;
}
evhttp_add_header ( req -> output_headers , "Host" , "somehost" ) ;
if ( evhttp_make_request ( evcon , req , EVHTTP_REQ_GET , "/?arg=val" ) == - 1 ) {
fprintf ( stdout , "FAILED\n" ) ;
exit ( 1 ) ;
}
event_dispatch ( ) ;
evhttp_connection_free ( evcon ) ;
evhttp_free ( http ) ;
if ( test_ok != 1 ) {
fprintf ( stdout , "FAILED: %d\n" , test_ok ) ;
exit ( 1 ) ;
}
fprintf ( stdout , "OK\n" ) ;
} |
-704,025,756,752,474,500 | debian | 27 | 0 | void PNGAPI png_set_keep_unknown_chunks ( png_structp png_ptr , int keep , png_bytep chunk_list , int num_chunks ) {
png_bytep new_list , p ;
int i , old_num_chunks ;
if ( png_ptr == NULL ) return ;
if ( num_chunks == 0 ) {
if ( keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE ) png_ptr -> flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS ;
else png_ptr -> flags &= ~ PNG_FLAG_KEEP_UNKNOWN_CHUNKS ;
if ( keep == PNG_HANDLE_CHUNK_ALWAYS ) png_ptr -> flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS ;
else png_ptr -> flags &= ~ PNG_FLAG_KEEP_UNSAFE_CHUNKS ;
return ;
}
if ( chunk_list == NULL ) return ;
old_num_chunks = png_ptr -> num_chunk_list ;
new_list = ( png_bytep ) png_malloc ( png_ptr , ( png_uint_32 ) ( 5 * ( num_chunks + old_num_chunks ) ) ) ;
if ( png_ptr -> chunk_list != NULL ) {
png_memcpy ( new_list , png_ptr -> chunk_list , ( png_size_t ) ( 5 * old_num_chunks ) ) ;
png_free ( png_ptr , png_ptr -> chunk_list ) ;
png_ptr -> chunk_list = NULL ;
}
png_memcpy ( new_list + 5 * old_num_chunks , chunk_list , ( png_size_t ) ( 5 * num_chunks ) ) ;
for ( p = new_list + 5 * old_num_chunks + 4 , i = 0 ;
i < num_chunks ;
i ++ , p += 5 ) * p = ( png_byte ) keep ;
png_ptr -> num_chunk_list = old_num_chunks + num_chunks ;
png_ptr -> chunk_list = new_list ;
# ifdef PNG_FREE_ME_SUPPORTED png_ptr -> free_me |= PNG_FREE_LIST ;
# endif } |
1,760,449,185,745,615,400 | debian | 11 | 0 | time_t TSMimeHdrFieldValueDateGet ( TSMBuffer bufp , TSMLoc hdr , TSMLoc field ) {
sdk_assert ( sdk_sanity_check_mbuffer ( bufp ) == TS_SUCCESS ) ;
sdk_assert ( ( sdk_sanity_check_mime_hdr_handle ( hdr ) == TS_SUCCESS ) || ( sdk_sanity_check_http_hdr_handle ( hdr ) == TS_SUCCESS ) ) ;
sdk_assert ( sdk_sanity_check_field_handle ( field , hdr ) == TS_SUCCESS ) ;
int value_len ;
const char * value_str = TSMimeFieldValueGet ( bufp , field , - 1 , & value_len ) ;
if ( value_str == nullptr ) {
return ( time_t ) 0 ;
}
return mime_parse_date ( value_str , value_str + value_len ) ;
} |
7,424,930,167,238,098,000 | debian | 12 | 0 | static int proc_alloc_streams ( struct usb_dev_state * ps , void __user * arg ) {
unsigned num_streams , num_eps ;
struct usb_host_endpoint * * eps ;
struct usb_interface * intf ;
int r ;
r = parse_usbdevfs_streams ( ps , arg , & num_streams , & num_eps , & eps , & intf ) ;
if ( r ) return r ;
destroy_async_on_interface ( ps , intf -> altsetting [ 0 ] . desc . bInterfaceNumber ) ;
r = usb_alloc_streams ( intf , eps , num_eps , num_streams , GFP_KERNEL ) ;
kfree ( eps ) ;
return r ;
} |
1,981,604,082,870,872,600 | chrome | 117 | 0 | static ufmt_args * parseArguments ( const UChar * alias , va_list ap , UErrorCode * status ) {
ufmt_args * arglist = NULL ;
ufmt_type_info * typelist = NULL ;
UBool * islonglong = NULL ;
int32_t size = 0 ;
int32_t pos = 0 ;
UChar type ;
uint16_t handlerNum ;
const UChar * aliasStart = alias ;
for ( ;
;
) {
while ( * alias != UP_PERCENT && * alias != 0x0000 ) {
alias ++ ;
}
if ( * alias == 0x0000 ) {
break ;
}
alias ++ ;
if ( ISDIGIT ( * alias ) ) {
if ( ISDIGIT ( * alias ) ) {
pos = ( int ) ( * alias ++ - DIGIT_ZERO ) ;
while ( ISDIGIT ( * alias ) ) {
pos *= 10 ;
pos += ( int ) ( * alias ++ - DIGIT_ZERO ) ;
}
}
if ( * alias != SPEC_DOLLARSIGN ) {
return NULL ;
}
}
else {
return NULL ;
}
if ( pos > size ) {
size = pos ;
}
}
typelist = ( ufmt_type_info * ) uprv_malloc ( sizeof ( ufmt_type_info ) * size ) ;
islonglong = ( UBool * ) uprv_malloc ( sizeof ( UBool ) * size ) ;
arglist = ( ufmt_args * ) uprv_malloc ( sizeof ( ufmt_args ) * size ) ;
if ( ! typelist || ! islonglong || ! arglist ) {
if ( typelist ) {
uprv_free ( typelist ) ;
}
if ( islonglong ) {
uprv_free ( islonglong ) ;
}
if ( arglist ) {
uprv_free ( arglist ) ;
}
* status = U_MEMORY_ALLOCATION_ERROR ;
return NULL ;
}
alias = aliasStart ;
for ( ;
;
) {
while ( * alias != UP_PERCENT && * alias != 0x0000 ) {
alias ++ ;
}
if ( * alias == 0x0000 ) {
break ;
}
alias ++ ;
if ( ISDIGIT ( * alias ) ) {
pos = ( int ) ( * alias ++ - DIGIT_ZERO ) ;
while ( ISDIGIT ( * alias ) ) {
pos *= 10 ;
pos += ( int ) ( * alias ++ - DIGIT_ZERO ) ;
}
}
pos -- ;
while ( ISMOD ( * alias ) || ISFLAG ( * alias ) || ISDIGIT ( * alias ) || * alias == SPEC_ASTERISK || * alias == SPEC_PERIOD || * alias == SPEC_DOLLARSIGN ) {
islonglong [ pos ] = FALSE ;
if ( ISMOD ( * alias ) ) {
alias ++ ;
if ( * alias == MOD_LOWERL ) {
islonglong [ pos ] = TRUE ;
}
}
alias ++ ;
}
type = * alias ;
handlerNum = ( uint16_t ) ( type - UPRINTF_BASE_FMT_HANDLERS ) ;
if ( handlerNum < UPRINTF_NUM_FMT_HANDLERS ) {
typelist [ pos ] = g_u_printf_infos [ handlerNum ] . info ;
}
else {
typelist [ pos ] = ufmt_empty ;
}
}
for ( pos = 0 ;
pos < size ;
pos ++ ) {
switch ( typelist [ pos ] ) {
case ufmt_string : case ufmt_ustring : case ufmt_pointer : arglist [ pos ] . ptrValue = va_arg ( ap , void * ) ;
break ;
case ufmt_char : case ufmt_uchar : case ufmt_int : if ( islonglong [ pos ] ) {
arglist [ pos ] . int64Value = va_arg ( ap , int64_t ) ;
}
else {
arglist [ pos ] . int64Value = va_arg ( ap , int32_t ) ;
}
break ;
case ufmt_float : arglist [ pos ] . floatValue = ( float ) va_arg ( ap , double ) ;
break ;
case ufmt_double : arglist [ pos ] . doubleValue = va_arg ( ap , double ) ;
break ;
default : arglist [ pos ] . ptrValue = NULL ;
break ;
}
}
uprv_free ( typelist ) ;
uprv_free ( islonglong ) ;
return arglist ;
} |
589,395,864,685,553,800 | debian | 5 | 0 | static void systick_reload ( nvic_state * s , int reset ) {
if ( reset ) s -> systick . tick = qemu_get_clock_ns ( vm_clock ) ;
s -> systick . tick += ( s -> systick . reload + 1 ) * systick_scale ( s ) ;
qemu_mod_timer ( s -> systick . timer , s -> systick . tick ) ;
} |
7,424,930,167,238,098,000 | debian | 17 | 0 | static int proc_unlinkurb ( struct usb_dev_state * ps , void __user * arg ) {
struct urb * urb ;
struct async * as ;
unsigned long flags ;
spin_lock_irqsave ( & ps -> lock , flags ) ;
as = async_getpending ( ps , arg ) ;
if ( ! as ) {
spin_unlock_irqrestore ( & ps -> lock , flags ) ;
return - EINVAL ;
}
urb = as -> urb ;
usb_get_urb ( urb ) ;
spin_unlock_irqrestore ( & ps -> lock , flags ) ;
usb_kill_urb ( urb ) ;
usb_put_urb ( urb ) ;
return 0 ;
} |
330,507,736,709,312,800 | chrome | 115 | 1 | hb_bool_t _hb_graphite2_shape ( hb_shape_plan_t * shape_plan , hb_font_t * font , hb_buffer_t * buffer , const hb_feature_t * features , unsigned int num_features ) {
hb_face_t * face = font -> face ;
gr_face * grface = HB_SHAPER_DATA_GET ( face ) -> grface ;
gr_font * grfont = HB_SHAPER_DATA_GET ( font ) ;
const char * lang = hb_language_to_string ( hb_buffer_get_language ( buffer ) ) ;
const char * lang_end = lang ? strchr ( lang , '-' ) : NULL ;
int lang_len = lang_end ? lang_end - lang : - 1 ;
gr_feature_val * feats = gr_face_featureval_for_lang ( grface , lang ? hb_tag_from_string ( lang , lang_len ) : 0 ) ;
while ( num_features -- ) {
const gr_feature_ref * fref = gr_face_find_fref ( grface , features -> tag ) ;
if ( fref ) gr_fref_set_feature_value ( fref , features -> value , feats ) ;
features ++ ;
}
gr_segment * seg = NULL ;
const gr_slot * is ;
unsigned int ci = 0 , ic = 0 ;
float curradvx = 0. , curradvy = 0. ;
unsigned int scratch_size ;
hb_buffer_t : : scratch_buffer_t * scratch = buffer -> get_scratch_buffer ( & scratch_size ) ;
uint32_t * chars = ( uint32_t * ) scratch ;
for ( unsigned int i = 0 ;
i < buffer -> len ;
++ i ) chars [ i ] = buffer -> info [ i ] . codepoint ;
hb_tag_t script_tag [ 2 ] ;
hb_ot_tags_from_script ( hb_buffer_get_script ( buffer ) , & script_tag [ 0 ] , & script_tag [ 1 ] ) ;
seg = gr_make_seg ( grfont , grface , script_tag [ 1 ] == HB_TAG_NONE ? script_tag [ 0 ] : script_tag [ 1 ] , feats , gr_utf32 , chars , buffer -> len , | ( hb_buffer_get_direction ( buffer ) == HB_DIRECTION_RTL ? 1 : 0 ) ) ;
if ( unlikely ( ! seg ) ) {
if ( feats ) gr_featureval_destroy ( feats ) ;
return false ;
}
unsigned int glyph_count = gr_seg_n_slots ( seg ) ;
if ( unlikely ( ! glyph_count ) ) {
if ( feats ) gr_featureval_destroy ( feats ) ;
gr_seg_destroy ( seg ) ;
return false ;
}
scratch = buffer -> get_scratch_buffer ( & scratch_size ) ;
while ( ( DIV_CEIL ( sizeof ( hb_graphite2_cluster_t ) * buffer -> len , sizeof ( * scratch ) ) + DIV_CEIL ( sizeof ( hb_codepoint_t ) * glyph_count , sizeof ( * scratch ) ) ) > scratch_size ) {
if ( unlikely ( ! buffer -> ensure ( buffer -> allocated * 2 ) ) ) {
if ( feats ) gr_featureval_destroy ( feats ) ;
gr_seg_destroy ( seg ) ;
return false ;
}
scratch = buffer -> get_scratch_buffer ( & scratch_size ) ;
}
# define ALLOCATE_ARRAY ( Type , name , len ) Type * name = ( Type * ) scratch ;
{
unsigned int _consumed = DIV_CEIL ( ( len ) * sizeof ( Type ) , sizeof ( * scratch ) ) ;
assert ( _consumed <= scratch_size ) ;
scratch += _consumed ;
scratch_size -= _consumed ;
}
ALLOCATE_ARRAY ( hb_graphite2_cluster_t , clusters , buffer -> len ) ;
ALLOCATE_ARRAY ( hb_codepoint_t , gids , glyph_count ) ;
# undef ALLOCATE_ARRAY memset ( clusters , 0 , sizeof ( clusters [ 0 ] ) * buffer -> len ) ;
hb_codepoint_t * pg = gids ;
clusters [ 0 ] . cluster = buffer -> info [ 0 ] . cluster ;
for ( is = gr_seg_first_slot ( seg ) , ic = 0 ;
is ;
is = gr_slot_next_in_segment ( is ) , ic ++ ) {
unsigned int before = gr_slot_before ( is ) ;
unsigned int after = gr_slot_after ( is ) ;
* pg = gr_slot_gid ( is ) ;
pg ++ ;
while ( clusters [ ci ] . base_char > before && ci ) {
clusters [ ci - 1 ] . num_chars += clusters [ ci ] . num_chars ;
clusters [ ci - 1 ] . num_glyphs += clusters [ ci ] . num_glyphs ;
ci -- ;
}
if ( gr_slot_can_insert_before ( is ) && clusters [ ci ] . num_chars && before >= clusters [ ci ] . base_char + clusters [ ci ] . num_chars ) {
hb_graphite2_cluster_t * c = clusters + ci + 1 ;
c -> base_char = clusters [ ci ] . base_char + clusters [ ci ] . num_chars ;
c -> cluster = buffer -> info [ c -> base_char ] . cluster ;
c -> num_chars = before - c -> base_char ;
c -> base_glyph = ic ;
c -> num_glyphs = 0 ;
ci ++ ;
}
clusters [ ci ] . num_glyphs ++ ;
if ( clusters [ ci ] . base_char + clusters [ ci ] . num_chars < after + 1 ) clusters [ ci ] . num_chars = after + 1 - clusters [ ci ] . base_char ;
}
ci ++ ;
for ( unsigned int i = 0 ;
i < ci ;
++ i ) {
for ( unsigned int j = 0 ;
j < clusters [ i ] . num_glyphs ;
++ j ) {
hb_glyph_info_t * info = & buffer -> info [ clusters [ i ] . base_glyph + j ] ;
info -> codepoint = gids [ clusters [ i ] . base_glyph + j ] ;
info -> cluster = clusters [ i ] . cluster ;
}
}
buffer -> len = glyph_count ;
if ( HB_DIRECTION_IS_BACKWARD ( buffer -> props . direction ) ) curradvx = gr_seg_advance_X ( seg ) ;
hb_glyph_position_t * pPos ;
for ( pPos = hb_buffer_get_glyph_positions ( buffer , NULL ) , is = gr_seg_first_slot ( seg ) ;
is ;
pPos ++ , is = gr_slot_next_in_segment ( is ) ) {
pPos -> x_offset = gr_slot_origin_X ( is ) - curradvx ;
pPos -> y_offset = gr_slot_origin_Y ( is ) - curradvy ;
pPos -> x_advance = gr_slot_advance_X ( is , grface , grfont ) ;
pPos -> y_advance = gr_slot_advance_Y ( is , grface , grfont ) ;
if ( HB_DIRECTION_IS_BACKWARD ( buffer -> props . direction ) ) curradvx -= pPos -> x_advance ;
pPos -> x_offset = gr_slot_origin_X ( is ) - curradvx ;
if ( ! HB_DIRECTION_IS_BACKWARD ( buffer -> props . direction ) ) curradvx += pPos -> x_advance ;
pPos -> y_offset = gr_slot_origin_Y ( is ) - curradvy ;
curradvy += pPos -> y_advance ;
}
if ( ! HB_DIRECTION_IS_BACKWARD ( buffer -> props . direction ) ) pPos [ - 1 ] . x_advance += gr_seg_advance_X ( seg ) - curradvx ;
if ( HB_DIRECTION_IS_BACKWARD ( buffer -> props . direction ) ) hb_buffer_reverse_clusters ( buffer ) ;
if ( feats ) gr_featureval_destroy ( feats ) ;
gr_seg_destroy ( seg ) ;
return true ;
} |
2,772,622,454,795,674,000 | debian | 112 | 0 | static int h263_decode_block ( MpegEncContext * s , int16_t * block , int n , int coded ) {
int code , level , i , j , last , run ;
RLTable * rl = & ff_h263_rl_inter ;
const uint8_t * scan_table ;
GetBitContext gb = s -> gb ;
scan_table = s -> intra_scantable . permutated ;
if ( s -> h263_aic && s -> mb_intra ) {
rl = & ff_rl_intra_aic ;
i = 0 ;
if ( s -> ac_pred ) {
if ( s -> h263_aic_dir ) scan_table = s -> intra_v_scantable . permutated ;
else scan_table = s -> intra_h_scantable . permutated ;
}
}
else if ( s -> mb_intra ) {
if ( s -> codec_id == AV_CODEC_ID_RV10 ) {
# if CONFIG_RV10_DECODER if ( s -> rv10_version == 3 && s -> pict_type == AV_PICTURE_TYPE_I ) {
int component , diff ;
component = ( n <= 3 ? 0 : n - 4 + 1 ) ;
level = s -> last_dc [ component ] ;
if ( s -> rv10_first_dc_coded [ component ] ) {
diff = ff_rv_decode_dc ( s , n ) ;
if ( diff == 0xffff ) return - 1 ;
level += diff ;
level = level & 0xff ;
s -> last_dc [ component ] = level ;
}
else {
s -> rv10_first_dc_coded [ component ] = 1 ;
}
}
else {
level = get_bits ( & s -> gb , 8 ) ;
if ( level == 255 ) level = 128 ;
}
# endif }
else {
level = get_bits ( & s -> gb , 8 ) ;
if ( ( level & 0x7F ) == 0 ) {
av_log ( s -> avctx , AV_LOG_ERROR , "illegal dc %d at %d %d\n" , level , s -> mb_x , s -> mb_y ) ;
if ( s -> err_recognition & AV_EF_BITSTREAM ) return - 1 ;
}
if ( level == 255 ) level = 128 ;
}
block [ 0 ] = level ;
i = 1 ;
}
else {
i = 0 ;
}
if ( ! coded ) {
if ( s -> mb_intra && s -> h263_aic ) goto not_coded ;
s -> block_last_index [ n ] = i - 1 ;
return 0 ;
}
retry : for ( ;
;
) {
code = get_vlc2 ( & s -> gb , rl -> vlc . table , TEX_VLC_BITS , 2 ) ;
if ( code < 0 ) {
av_log ( s -> avctx , AV_LOG_ERROR , "illegal ac vlc code at %dx%d\n" , s -> mb_x , s -> mb_y ) ;
return - 1 ;
}
if ( code == rl -> n ) {
if ( CONFIG_FLV_DECODER && s -> h263_flv > 1 ) {
ff_flv2_decode_ac_esc ( & s -> gb , & level , & run , & last ) ;
}
else {
last = get_bits1 ( & s -> gb ) ;
run = get_bits ( & s -> gb , 6 ) ;
level = ( int8_t ) get_bits ( & s -> gb , 8 ) ;
if ( level == - 128 ) {
if ( s -> codec_id == AV_CODEC_ID_RV10 ) {
level = get_sbits ( & s -> gb , 12 ) ;
}
else {
level = get_bits ( & s -> gb , 5 ) ;
level |= get_sbits ( & s -> gb , 6 ) << 5 ;
}
}
}
}
else {
run = rl -> table_run [ code ] ;
level = rl -> table_level [ code ] ;
last = code >= rl -> last ;
if ( get_bits1 ( & s -> gb ) ) level = - level ;
}
i += run ;
if ( i >= 64 ) {
if ( s -> alt_inter_vlc && rl == & ff_h263_rl_inter && ! s -> mb_intra ) {
rl = & ff_rl_intra_aic ;
i = 0 ;
s -> gb = gb ;
s -> dsp . clear_block ( block ) ;
goto retry ;
}
av_log ( s -> avctx , AV_LOG_ERROR , "run overflow at %dx%d i:%d\n" , s -> mb_x , s -> mb_y , s -> mb_intra ) ;
return - 1 ;
}
j = scan_table [ i ] ;
block [ j ] = level ;
if ( last ) break ;
i ++ ;
}
not_coded : if ( s -> mb_intra && s -> h263_aic ) {
ff_h263_pred_acdc ( s , block , n ) ;
i = 63 ;
}
s -> block_last_index [ n ] = i ;
return 0 ;
} |
-1,487,877,838,474,751,200 | debian | 11 | 0 | static void array_cleanup ( char * arr [ ] , int arr_size ) {
int i = 0 ;
for ( i = 0 ;
i < arr_size ;
i ++ ) {
if ( arr [ i * 2 ] ) {
efree ( arr [ i * 2 ] ) ;
}
}
efree ( arr ) ;
} |
-8,962,831,256,613,788,000 | debian | 15 | 0 | static gboolean is_last_sysex_packet_in_tvb ( tvbuff_t * tvb , gint offset ) {
gboolean last = TRUE ;
gint length = tvb_reported_length ( tvb ) ;
offset += 4 ;
while ( offset < length ) {
guint8 code = tvb_get_guint8 ( tvb , offset ) ;
code &= 0x0F ;
if ( is_sysex_code ( code ) ) {
last = FALSE ;
break ;
}
offset += 4 ;
}
return last ;
} |
-673,406,620,978,847,500 | chrome | 8 | 0 | TEST_F ( WebFrameTest , LocalFrameWithRemoteParentIsTransparent ) {
FrameTestHelpers : : WebViewHelper helper ;
helper . InitializeRemote ( ) ;
WebLocalFrameImpl * local_frame = FrameTestHelpers : : CreateLocalChild ( * helper . RemoteMainFrame ( ) ) ;
FrameTestHelpers : : LoadFrame ( local_frame , "data:text/html,some page" ) ;
Color color = local_frame -> GetFrameView ( ) -> BaseBackgroundColor ( ) ;
EXPECT_EQ ( Color : : kTransparent , color ) ;
} |
6,453,796,474,132,806,000 | chrome | 173 | 0 | static void U_CALLCONV _UTF7ToUnicodeWithOffsets ( UConverterToUnicodeArgs * pArgs , UErrorCode * pErrorCode ) {
UConverter * cnv ;
const uint8_t * source , * sourceLimit ;
UChar * target ;
const UChar * targetLimit ;
int32_t * offsets ;
uint8_t * bytes ;
uint8_t byteIndex ;
int32_t length , targetCapacity ;
uint16_t bits ;
int8_t base64Counter ;
UBool inDirectMode ;
int8_t base64Value ;
int32_t sourceIndex , nextSourceIndex ;
uint8_t b ;
cnv = pArgs -> converter ;
source = ( const uint8_t * ) pArgs -> source ;
sourceLimit = ( const uint8_t * ) pArgs -> sourceLimit ;
target = pArgs -> target ;
targetLimit = pArgs -> targetLimit ;
offsets = pArgs -> offsets ;
{
uint32_t status = cnv -> toUnicodeStatus ;
inDirectMode = ( UBool ) ( ( status >> 24 ) & 1 ) ;
base64Counter = ( int8_t ) ( status >> 16 ) ;
bits = ( uint16_t ) status ;
}
bytes = cnv -> toUBytes ;
byteIndex = cnv -> toULength ;
sourceIndex = byteIndex == 0 ? 0 : - 1 ;
nextSourceIndex = 0 ;
if ( inDirectMode ) {
directMode : byteIndex = 0 ;
length = ( int32_t ) ( sourceLimit - source ) ;
targetCapacity = ( int32_t ) ( targetLimit - target ) ;
if ( length > targetCapacity ) {
length = targetCapacity ;
}
while ( length > 0 ) {
b = * source ++ ;
if ( ! isLegalUTF7 ( b ) ) {
bytes [ 0 ] = b ;
byteIndex = 1 ;
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
break ;
}
else if ( b != PLUS ) {
* target ++ = b ;
if ( offsets != NULL ) {
* offsets ++ = sourceIndex ++ ;
}
}
else {
nextSourceIndex = ++ sourceIndex ;
inDirectMode = FALSE ;
byteIndex = 0 ;
bits = 0 ;
base64Counter = - 1 ;
goto unicodeMode ;
}
-- length ;
}
if ( source < sourceLimit && target >= targetLimit ) {
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
}
}
else {
unicodeMode : while ( source < sourceLimit ) {
if ( target < targetLimit ) {
bytes [ byteIndex ++ ] = b = * source ++ ;
++ nextSourceIndex ;
base64Value = - 3 ;
if ( b >= 126 || ( base64Value = fromBase64 [ b ] ) == - 3 || base64Value == - 1 ) {
inDirectMode = TRUE ;
if ( base64Counter == - 1 ) {
-- source ;
bytes [ 0 ] = PLUS ;
byteIndex = 1 ;
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
break ;
}
else if ( bits != 0 ) {
-- source ;
-- byteIndex ;
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
break ;
}
else {
if ( base64Value == - 3 ) {
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
break ;
}
else {
-- source ;
sourceIndex = nextSourceIndex - 1 ;
goto directMode ;
}
}
}
else if ( base64Value >= 0 ) {
switch ( base64Counter ) {
case - 1 : case 0 : bits = base64Value ;
base64Counter = 1 ;
break ;
case 1 : case 3 : case 4 : case 6 : bits = ( uint16_t ) ( ( bits << 6 ) | base64Value ) ;
++ base64Counter ;
break ;
case 2 : * target ++ = ( UChar ) ( ( bits << 4 ) | ( base64Value >> 2 ) ) ;
if ( offsets != NULL ) {
* offsets ++ = sourceIndex ;
sourceIndex = nextSourceIndex - 1 ;
}
bytes [ 0 ] = b ;
byteIndex = 1 ;
bits = ( uint16_t ) ( base64Value & 3 ) ;
base64Counter = 3 ;
break ;
case 5 : * target ++ = ( UChar ) ( ( bits << 2 ) | ( base64Value >> 4 ) ) ;
if ( offsets != NULL ) {
* offsets ++ = sourceIndex ;
sourceIndex = nextSourceIndex - 1 ;
}
bytes [ 0 ] = b ;
byteIndex = 1 ;
bits = ( uint16_t ) ( base64Value & 15 ) ;
base64Counter = 6 ;
break ;
case 7 : * target ++ = ( UChar ) ( ( bits << 6 ) | base64Value ) ;
if ( offsets != NULL ) {
* offsets ++ = sourceIndex ;
sourceIndex = nextSourceIndex ;
}
byteIndex = 0 ;
bits = 0 ;
base64Counter = 0 ;
break ;
default : break ;
}
}
else {
inDirectMode = TRUE ;
if ( base64Counter == - 1 ) {
* target ++ = PLUS ;
if ( offsets != NULL ) {
* offsets ++ = sourceIndex - 1 ;
}
}
else {
if ( bits != 0 ) {
* pErrorCode = U_ILLEGAL_CHAR_FOUND ;
break ;
}
}
sourceIndex = nextSourceIndex ;
goto directMode ;
}
}
else {
* pErrorCode = U_BUFFER_OVERFLOW_ERROR ;
break ;
}
}
}
if ( U_SUCCESS ( * pErrorCode ) && pArgs -> flush && source == sourceLimit && bits == 0 ) {
byteIndex = 0 ;
}
cnv -> toUnicodeStatus = ( ( uint32_t ) inDirectMode << 24 ) | ( ( uint32_t ) ( ( uint8_t ) base64Counter ) << 16 ) | ( uint32_t ) bits ;
cnv -> toULength = byteIndex ;
pArgs -> source = ( const char * ) source ;
pArgs -> target = target ;
pArgs -> offsets = offsets ;
return ;
} |
6,790,518,433,053,241,000 | debian | 6 | 0 | static void set_connfilter_host ( GtkWidget * widget , gpointer * data ) {
( void ) data ;
DEBUG_MSG ( "set_connfilter_host" ) ;
filter . host = gtk_entry_get_text ( GTK_ENTRY ( widget ) ) ;
gtk_tree_model_filter_refilter ( GTK_TREE_MODEL_FILTER ( filter . model ) ) ;
} |
-3,384,986,069,176,965,600 | chrome | 7 | 0 | static int vp8_alloc_partition_data ( VP8_COMP * cpi ) {
vpx_free ( cpi -> mb . pip ) ;
cpi -> mb . pip = vpx_calloc ( ( cpi -> common . mb_cols + 1 ) * ( cpi -> common . mb_rows + 1 ) , sizeof ( PARTITION_INFO ) ) ;
if ( ! cpi -> mb . pip ) return 1 ;
cpi -> mb . pi = cpi -> mb . pip + cpi -> common . mode_info_stride + 1 ;
return 0 ;
} |
9,111,838,939,241,886,000 | chrome | 16 | 1 | int MBS_ReadHeader ( int fd , MBSPatchHeader * header ) {
int s = read ( fd , header , sizeof ( MBSPatchHeader ) ) ;
if ( s != sizeof ( MBSPatchHeader ) ) return READ_ERROR ;
header -> slen = ntohl ( header -> slen ) ;
header -> scrc32 = ntohl ( header -> scrc32 ) ;
header -> dlen = ntohl ( header -> dlen ) ;
header -> cblen = ntohl ( header -> cblen ) ;
header -> difflen = ntohl ( header -> difflen ) ;
header -> extralen = ntohl ( header -> extralen ) ;
struct stat hs ;
s = fstat ( fd , & hs ) ;
if ( s ) return READ_ERROR ;
if ( memcmp ( header -> tag , "MBDIFF10" , 8 ) != 0 ) return UNEXPECTED_ERROR ;
if ( sizeof ( MBSPatchHeader ) + header -> cblen + header -> difflen + header -> extralen != int ( hs . st_size ) ) return UNEXPECTED_ERROR ;
return OK ;
} |
5,610,242,550,647,094,000 | debian | 25 | 0 | static int dpb_add ( DPB * dpb , Picture * pic ) {
int i ;
if ( dpb -> size >= dpb -> max_size ) return - 1 ;
for ( i = 0 ;
i < dpb -> size ;
i ++ ) {
VAPictureH264 * const va_pic = & dpb -> va_pics [ i ] ;
if ( va_pic -> picture_id == ff_vaapi_get_surface_id ( pic ) ) {
VAPictureH264 temp_va_pic ;
fill_vaapi_pic ( & temp_va_pic , pic , 0 ) ;
if ( ( temp_va_pic . flags ^ va_pic -> flags ) & ( VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD ) ) {
va_pic -> flags |= temp_va_pic . flags & ( VA_PICTURE_H264_TOP_FIELD | VA_PICTURE_H264_BOTTOM_FIELD ) ;
if ( temp_va_pic . flags & VA_PICTURE_H264_TOP_FIELD ) {
va_pic -> TopFieldOrderCnt = temp_va_pic . TopFieldOrderCnt ;
}
else {
va_pic -> BottomFieldOrderCnt = temp_va_pic . BottomFieldOrderCnt ;
}
}
return 0 ;
}
}
fill_vaapi_pic ( & dpb -> va_pics [ dpb -> size ++ ] , pic , 0 ) ;
return 0 ;
} |
2,713,698,759,296,604,700 | debian | 20 | 1 | void ff_mpeg_flush ( AVCodecContext * avctx ) {
int i ;
MpegEncContext * s = avctx -> priv_data ;
if ( s == NULL || s -> picture == NULL ) return ;
for ( i = 0 ;
i < s -> picture_count ;
i ++ ) {
if ( s -> picture [ i ] . f . data [ 0 ] && ( s -> picture [ i ] . f . type == FF_BUFFER_TYPE_INTERNAL || s -> picture [ i ] . f . type == FF_BUFFER_TYPE_USER ) ) free_frame_buffer ( s , & s -> picture [ i ] ) ;
}
s -> current_picture_ptr = s -> last_picture_ptr = s -> next_picture_ptr = NULL ;
s -> mb_x = s -> mb_y = 0 ;
s -> parse_context . state = - 1 ;
s -> parse_context . frame_start_found = 0 ;
s -> parse_context . overread = 0 ;
s -> parse_context . overread_index = 0 ;
s -> parse_context . index = 0 ;
s -> parse_context . last_index = 0 ;
s -> bitstream_buffer_size = 0 ;
s -> pp_time = 0 ;
} |
4,511,225,370,772,574,700 | debian | 223 | 1 | int uwsgi_php_request ( struct wsgi_request * wsgi_req ) {
char real_filename [ PATH_MAX + 1 ] ;
char * path_info = NULL ;
size_t real_filename_len = 0 ;
struct stat php_stat ;
char * filename = NULL ;
int force_empty_script_name = 0 ;
zend_file_handle file_handle ;
# ifdef ZTS TSRMLS_FETCH ( ) ;
# endif SG ( server_context ) = ( void * ) wsgi_req ;
if ( uwsgi_parse_vars ( wsgi_req ) ) {
return - 1 ;
}
char * orig_path_info = wsgi_req -> path_info ;
uint16_t orig_path_info_len = wsgi_req -> path_info_len ;
if ( uphp . docroot ) {
wsgi_req -> document_root = uphp . docroot ;
}
else if ( ! wsgi_req -> document_root_len ) {
wsgi_req -> document_root = uwsgi . cwd ;
}
else {
char * sanitized_docroot = ecalloc ( 1 , PATH_MAX + 1 ) ;
if ( ! uwsgi_expand_path ( wsgi_req -> document_root , wsgi_req -> document_root_len , sanitized_docroot ) ) {
efree ( sanitized_docroot ) ;
return - 1 ;
}
wsgi_req -> document_root = sanitized_docroot ;
}
wsgi_req -> document_root_len = strlen ( wsgi_req -> document_root ) ;
if ( uphp . app ) {
# ifdef UWSGI_PCRE struct uwsgi_regexp_list * bypass = uphp . app_bypass ;
while ( bypass ) {
if ( uwsgi_regexp_match ( bypass -> pattern , bypass -> pattern_extra , wsgi_req -> uri , wsgi_req -> uri_len ) >= 0 ) {
goto oldstyle ;
}
bypass = bypass -> next ;
}
# endif strcpy ( real_filename , uphp . app ) ;
if ( wsgi_req -> path_info_len == 1 && wsgi_req -> path_info [ 0 ] == '/' ) {
goto appready ;
}
if ( uphp . app_qs ) {
size_t app_qs_len = strlen ( uphp . app_qs ) ;
size_t qs_len = wsgi_req -> path_info_len + app_qs_len ;
if ( wsgi_req -> query_string_len > 0 ) {
qs_len += 1 + wsgi_req -> query_string_len ;
}
char * qs = ecalloc ( 1 , qs_len + 1 ) ;
memcpy ( qs , uphp . app_qs , app_qs_len ) ;
memcpy ( qs + app_qs_len , wsgi_req -> path_info , wsgi_req -> path_info_len ) ;
if ( wsgi_req -> query_string_len > 0 ) {
char * ptr = qs + app_qs_len + wsgi_req -> path_info_len ;
* ptr = '&' ;
memcpy ( ptr + 1 , wsgi_req -> query_string , wsgi_req -> query_string_len ) ;
}
wsgi_req -> query_string = qs ;
wsgi_req -> query_string_len = qs_len ;
}
appready : wsgi_req -> path_info = "" ;
wsgi_req -> path_info_len = 0 ;
force_empty_script_name = 1 ;
goto secure2 ;
}
# ifdef UWSGI_PCRE oldstyle : # endif filename = uwsgi_concat4n ( wsgi_req -> document_root , wsgi_req -> document_root_len , "/" , 1 , wsgi_req -> path_info , wsgi_req -> path_info_len , "" , 0 ) ;
if ( uwsgi_php_walk ( wsgi_req , filename , wsgi_req -> document_root , wsgi_req -> document_root_len , & path_info ) ) {
free ( filename ) ;
if ( uphp . fallback || uphp . fallback2 ) {
if ( uphp . fallback ) {
filename = uwsgi_str ( uphp . fallback ) ;
}
else {
filename = uwsgi_concat2n ( wsgi_req -> document_root , strlen ( wsgi_req -> document_root ) , uphp . fallback2 , strlen ( uphp . fallback2 ) ) ;
wsgi_req -> script_name = uphp . fallback2 ;
wsgi_req -> script_name_len = strlen ( uphp . fallback2 ) ;
}
if ( uphp . fallback_qs ) {
size_t fqs_len = strlen ( uphp . fallback_qs ) ;
size_t new_qs_len = orig_path_info_len + fqs_len + 1 + wsgi_req -> query_string_len ;
char * new_qs = ecalloc ( 1 , new_qs_len + 1 ) ;
memcpy ( new_qs , uphp . fallback_qs , fqs_len ) ;
new_qs [ fqs_len ] = '=' ;
memcpy ( new_qs + fqs_len + 1 , orig_path_info , orig_path_info_len ) ;
if ( wsgi_req -> query_string_len ) {
new_qs [ fqs_len + 1 + orig_path_info_len ] = '&' ;
memcpy ( new_qs + fqs_len + 2 + orig_path_info_len , wsgi_req -> query_string , wsgi_req -> query_string_len ) ;
}
wsgi_req -> query_string = new_qs ;
wsgi_req -> query_string_len = new_qs_len ;
}
}
else {
uwsgi_404 ( wsgi_req ) ;
return - 1 ;
}
}
if ( path_info ) {
wsgi_req -> path_info = path_info ;
wsgi_req -> path_info_len = orig_path_info_len - ( path_info - orig_path_info ) ;
}
else {
wsgi_req -> path_info = "" ;
wsgi_req -> path_info_len = 0 ;
}
if ( ! realpath ( filename , real_filename ) ) {
free ( filename ) ;
uwsgi_404 ( wsgi_req ) ;
return - 1 ;
}
free ( filename ) ;
real_filename_len = strlen ( real_filename ) ;
if ( uphp . allowed_docroot ) {
struct uwsgi_string_list * usl = uphp . allowed_docroot ;
while ( usl ) {
if ( ! uwsgi_starts_with ( real_filename , real_filename_len , usl -> value , usl -> len ) ) {
goto secure ;
}
usl = usl -> next ;
}
uwsgi_403 ( wsgi_req ) ;
uwsgi_log ( "PHP security error: %s is not under an allowed docroot\n" , real_filename ) ;
return - 1 ;
}
secure : if ( stat ( real_filename , & php_stat ) ) {
uwsgi_404 ( wsgi_req ) ;
return UWSGI_OK ;
}
if ( S_ISDIR ( php_stat . st_mode ) ) {
if ( orig_path_info_len == 0 || ( orig_path_info_len > 0 && orig_path_info [ orig_path_info_len - 1 ] != '/' ) ) {
wsgi_req -> path_info = orig_path_info ;
wsgi_req -> path_info_len = orig_path_info_len ;
uwsgi_redirect_to_slash ( wsgi_req ) ;
return UWSGI_OK ;
}
struct uwsgi_string_list * upi = uphp . index ;
real_filename [ real_filename_len ] = '/' ;
real_filename_len ++ ;
int found = 0 ;
while ( upi ) {
if ( real_filename_len + upi -> len + 1 < PATH_MAX ) {
memcpy ( real_filename + real_filename_len , upi -> value , upi -> len + 1 ) ;
if ( ! access ( real_filename , R_OK ) ) {
found = 1 ;
break ;
}
}
upi = upi -> next ;
}
if ( ! found ) {
uwsgi_404 ( wsgi_req ) ;
return UWSGI_OK ;
}
real_filename_len = strlen ( real_filename ) ;
}
if ( uphp . allowed_ext ) {
struct uwsgi_string_list * usl = uphp . allowed_ext ;
while ( usl ) {
if ( real_filename_len >= usl -> len ) {
if ( ! uwsgi_strncmp ( real_filename + ( real_filename_len - usl -> len ) , usl -> len , usl -> value , usl -> len ) ) {
goto secure2 ;
}
}
usl = usl -> next ;
}
uwsgi_403 ( wsgi_req ) ;
uwsgi_log ( "PHP security error: %s does not end with an allowed extension\n" , real_filename ) ;
return - 1 ;
}
secure2 : wsgi_req -> file = real_filename ;
wsgi_req -> file_len = strlen ( wsgi_req -> file ) ;
if ( uphp . allowed_scripts ) {
struct uwsgi_string_list * usl = uphp . allowed_scripts ;
while ( usl ) {
if ( ! uwsgi_strncmp ( wsgi_req -> file , wsgi_req -> file_len , usl -> value , usl -> len ) ) {
goto secure3 ;
}
usl = usl -> next ;
}
uwsgi_403 ( wsgi_req ) ;
uwsgi_log ( "PHP security error: %s is not an allowed script\n" , real_filename ) ;
return - 1 ;
}
secure3 : if ( force_empty_script_name ) {
wsgi_req -> script_name = "" ;
wsgi_req -> script_name_len = 0 ;
}
else if ( ! uphp . fallback2 ) {
wsgi_req -> script_name = orig_path_info ;
if ( path_info ) {
wsgi_req -> script_name_len = path_info - orig_path_info ;
}
else {
wsgi_req -> script_name_len = orig_path_info_len ;
}
}
# ifdef UWSGI_DEBUG uwsgi_log ( "php filename = %s script_name = %.*s (%d) document_root = %.*s (%d)\n" , real_filename , wsgi_req -> script_name_len , wsgi_req -> script_name , wsgi_req -> script_name_len , wsgi_req -> document_root_len , wsgi_req -> document_root , wsgi_req -> document_root_len ) ;
# endif SG ( request_info ) . request_uri = estrndup ( wsgi_req -> uri , wsgi_req -> uri_len ) ;
SG ( request_info ) . request_method = estrndup ( wsgi_req -> method , wsgi_req -> method_len ) ;
SG ( request_info ) . proto_num = 1001 ;
SG ( request_info ) . query_string = estrndup ( wsgi_req -> query_string , wsgi_req -> query_string_len ) ;
SG ( request_info ) . content_length = wsgi_req -> post_cl ;
SG ( request_info ) . content_type = estrndup ( wsgi_req -> content_type , wsgi_req -> content_type_len ) ;
SG ( sapi_headers ) . http_response_code = 200 ;
SG ( request_info ) . path_translated = wsgi_req -> file ;
file_handle . type = ZEND_HANDLE_FILENAME ;
file_handle . filename = real_filename ;
file_handle . free_filename = 0 ;
file_handle . opened_path = NULL ;
if ( php_request_startup ( TSRMLS_C ) == FAILURE ) {
uwsgi_500 ( wsgi_req ) ;
return - 1 ;
}
struct uwsgi_string_list * usl = NULL ;
uwsgi_foreach ( usl , uphp . exec_before ) {
if ( zend_eval_string_ex ( usl -> value , NULL , "uWSGI php exec before" , 1 TSRMLS_CC ) == FAILURE ) goto end ;
}
php_execute_script ( & file_handle TSRMLS_CC ) ;
uwsgi_foreach ( usl , uphp . exec_after ) {
if ( zend_eval_string_ex ( usl -> value , NULL , "uWSGI php exec after" , 1 TSRMLS_CC ) == FAILURE ) goto end ;
}
end : php_request_shutdown ( NULL ) ;
return 0 ;
} |
8,801,969,307,247,113,000 | debian | 142 | 0 | const EVP_CIPHER * EVP_aes_ ## keylen ## _ ## mode ( void ) \ {
return & aes_ ## keylen ## _ ## mode ;
}
# define BLOCK_CIPHER_custom ( nid , keylen , blocksize , ivlen , mode , MODE , flags ) static const EVP_CIPHER aes_ ## keylen ## _ ## mode = {
\ nid ## _ ## keylen ## _ ## mode , blocksize , \ ( EVP_CIPH_ ## MODE ## _MODE == EVP_CIPH_XTS_MODE ? 2 : 1 ) * keylen / 8 , ivlen , \ flags | EVP_CIPH_ ## MODE ## _MODE , \ aes_ ## mode ## _init_key , \ aes_ ## mode ## _cipher , \ aes_ ## mode ## _cleanup , \ sizeof ( EVP_AES_ ## MODE ## _CTX ) , \ NULL , NULL , aes_ ## mode ## _ctrl , NULL }
;
const EVP_CIPHER * EVP_aes_ ## keylen ## _ ## mode ( void ) \ {
return & aes_ ## keylen ## _ ## mode ;
}
# endif # if defined ( OPENSSL_CPUID_OBJ ) && ( defined ( __arm__ ) || defined ( __arm ) || defined ( __aarch64__ ) ) # include "arm_arch.h" # if __ARM_MAX_ARCH__ >= 7 # if defined ( BSAES_ASM ) # define BSAES_CAPABLE ( OPENSSL_armcap_P & ARMV7_NEON ) # endif # if defined ( VPAES_ASM ) # define VPAES_CAPABLE ( OPENSSL_armcap_P & ARMV7_NEON ) # endif # define HWAES_CAPABLE ( OPENSSL_armcap_P & ARMV8_AES ) # define HWAES_set_encrypt_key aes_v8_set_encrypt_key # define HWAES_set_decrypt_key aes_v8_set_decrypt_key # define HWAES_encrypt aes_v8_encrypt # define HWAES_decrypt aes_v8_decrypt # define HWAES_cbc_encrypt aes_v8_cbc_encrypt # define HWAES_ctr32_encrypt_blocks aes_v8_ctr32_encrypt_blocks # endif # endif # if defined ( HWAES_CAPABLE ) int HWAES_set_encrypt_key ( const unsigned char * userKey , const int bits , AES_KEY * key ) ;
int HWAES_set_decrypt_key ( const unsigned char * userKey , const int bits , AES_KEY * key ) ;
void HWAES_encrypt ( const unsigned char * in , unsigned char * out , const AES_KEY * key ) ;
void HWAES_decrypt ( const unsigned char * in , unsigned char * out , const AES_KEY * key ) ;
void HWAES_cbc_encrypt ( const unsigned char * in , unsigned char * out , size_t length , const AES_KEY * key , unsigned char * ivec , const int enc ) ;
void HWAES_ctr32_encrypt_blocks ( const unsigned char * in , unsigned char * out , size_t len , const AES_KEY * key , const unsigned char ivec [ 16 ] ) ;
void HWAES_xts_encrypt ( const unsigned char * inp , unsigned char * out , size_t len , const AES_KEY * key1 , const AES_KEY * key2 , const unsigned char iv [ 16 ] ) ;
void HWAES_xts_decrypt ( const unsigned char * inp , unsigned char * out , size_t len , const AES_KEY * key1 , const AES_KEY * key2 , const unsigned char iv [ 16 ] ) ;
# endif # define BLOCK_CIPHER_generic_pack ( nid , keylen , flags ) \ BLOCK_CIPHER_generic ( nid , keylen , 16 , 16 , cbc , cbc , CBC , flags | EVP_CIPH_FLAG_DEFAULT_ASN1 ) \ BLOCK_CIPHER_generic ( nid , keylen , 16 , 0 , ecb , ecb , ECB , flags | EVP_CIPH_FLAG_DEFAULT_ASN1 ) \ BLOCK_CIPHER_generic ( nid , keylen , 1 , 16 , ofb128 , ofb , OFB , flags | EVP_CIPH_FLAG_DEFAULT_ASN1 ) \ BLOCK_CIPHER_generic ( nid , keylen , 1 , 16 , cfb128 , cfb , CFB , flags | EVP_CIPH_FLAG_DEFAULT_ASN1 ) \ BLOCK_CIPHER_generic ( nid , keylen , 1 , 16 , cfb1 , cfb1 , CFB , flags ) \ BLOCK_CIPHER_generic ( nid , keylen , 1 , 16 , cfb8 , cfb8 , CFB , flags ) \ BLOCK_CIPHER_generic ( nid , keylen , 1 , 16 , ctr , ctr , CTR , flags ) static int aes_init_key ( EVP_CIPHER_CTX * ctx , const unsigned char * key , const unsigned char * iv , int enc ) {
int ret , mode ;
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
mode = EVP_CIPHER_CTX_mode ( ctx ) ;
if ( ( mode == EVP_CIPH_ECB_MODE || mode == EVP_CIPH_CBC_MODE ) && ! enc ) {
# ifdef HWAES_CAPABLE if ( HWAES_CAPABLE ) {
ret = HWAES_set_decrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) HWAES_decrypt ;
dat -> stream . cbc = NULL ;
# ifdef HWAES_cbc_encrypt if ( mode == EVP_CIPH_CBC_MODE ) dat -> stream . cbc = ( cbc128_f ) HWAES_cbc_encrypt ;
# endif }
else # endif # ifdef BSAES_CAPABLE if ( BSAES_CAPABLE && mode == EVP_CIPH_CBC_MODE ) {
ret = AES_set_decrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) AES_decrypt ;
dat -> stream . cbc = ( cbc128_f ) bsaes_cbc_encrypt ;
}
else # endif # ifdef VPAES_CAPABLE if ( VPAES_CAPABLE ) {
ret = vpaes_set_decrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) vpaes_decrypt ;
dat -> stream . cbc = mode == EVP_CIPH_CBC_MODE ? ( cbc128_f ) vpaes_cbc_encrypt : NULL ;
}
else # endif {
ret = AES_set_decrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) AES_decrypt ;
dat -> stream . cbc = mode == EVP_CIPH_CBC_MODE ? ( cbc128_f ) AES_cbc_encrypt : NULL ;
}
}
else # ifdef HWAES_CAPABLE if ( HWAES_CAPABLE ) {
ret = HWAES_set_encrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) HWAES_encrypt ;
dat -> stream . cbc = NULL ;
# ifdef HWAES_cbc_encrypt if ( mode == EVP_CIPH_CBC_MODE ) dat -> stream . cbc = ( cbc128_f ) HWAES_cbc_encrypt ;
else # endif # ifdef HWAES_ctr32_encrypt_blocks if ( mode == EVP_CIPH_CTR_MODE ) dat -> stream . ctr = ( ctr128_f ) HWAES_ctr32_encrypt_blocks ;
else # endif ( void ) 0 ;
}
else # endif # ifdef BSAES_CAPABLE if ( BSAES_CAPABLE && mode == EVP_CIPH_CTR_MODE ) {
ret = AES_set_encrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) AES_encrypt ;
dat -> stream . ctr = ( ctr128_f ) bsaes_ctr32_encrypt_blocks ;
}
else # endif # ifdef VPAES_CAPABLE if ( VPAES_CAPABLE ) {
ret = vpaes_set_encrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) vpaes_encrypt ;
dat -> stream . cbc = mode == EVP_CIPH_CBC_MODE ? ( cbc128_f ) vpaes_cbc_encrypt : NULL ;
}
else # endif {
ret = AES_set_encrypt_key ( key , EVP_CIPHER_CTX_key_length ( ctx ) * 8 , & dat -> ks . ks ) ;
dat -> block = ( block128_f ) AES_encrypt ;
dat -> stream . cbc = mode == EVP_CIPH_CBC_MODE ? ( cbc128_f ) AES_cbc_encrypt : NULL ;
# ifdef AES_CTR_ASM if ( mode == EVP_CIPH_CTR_MODE ) dat -> stream . ctr = ( ctr128_f ) AES_ctr32_encrypt ;
# endif }
if ( ret < 0 ) {
EVPerr ( EVP_F_AES_INIT_KEY , EVP_R_AES_KEY_SETUP_FAILED ) ;
return 0 ;
}
return 1 ;
}
static int aes_cbc_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
if ( dat -> stream . cbc ) ( * dat -> stream . cbc ) ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , EVP_CIPHER_CTX_encrypting ( ctx ) ) ;
else if ( EVP_CIPHER_CTX_encrypting ( ctx ) ) CRYPTO_cbc128_encrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , dat -> block ) ;
else CRYPTO_cbc128_decrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , dat -> block ) ;
return 1 ;
}
static int aes_ecb_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
size_t bl = EVP_CIPHER_CTX_block_size ( ctx ) ;
size_t i ;
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
if ( len < bl ) return 1 ;
for ( i = 0 , len -= bl ;
i <= len ;
i += bl ) ( * dat -> block ) ( in + i , out + i , & dat -> ks ) ;
return 1 ;
}
static int aes_ofb_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
int num = EVP_CIPHER_CTX_num ( ctx ) ;
CRYPTO_ofb128_encrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , & num , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
return 1 ;
}
static int aes_cfb_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
int num = EVP_CIPHER_CTX_num ( ctx ) ;
CRYPTO_cfb128_encrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , & num , EVP_CIPHER_CTX_encrypting ( ctx ) , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
return 1 ;
}
static int aes_cfb8_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
int num = EVP_CIPHER_CTX_num ( ctx ) ;
CRYPTO_cfb128_8_encrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , & num , EVP_CIPHER_CTX_encrypting ( ctx ) , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
return 1 ;
}
static int aes_cfb1_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
if ( EVP_CIPHER_CTX_test_flags ( ctx , EVP_CIPH_FLAG_LENGTH_BITS ) ) {
int num = EVP_CIPHER_CTX_num ( ctx ) ;
CRYPTO_cfb128_1_encrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , & num , EVP_CIPHER_CTX_encrypting ( ctx ) , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
return 1 ;
}
while ( len >= MAXBITCHUNK ) {
int num = EVP_CIPHER_CTX_num ( ctx ) ;
CRYPTO_cfb128_1_encrypt ( in , out , MAXBITCHUNK * 8 , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , & num , EVP_CIPHER_CTX_encrypting ( ctx ) , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
len -= MAXBITCHUNK ;
}
if ( len ) {
int num = EVP_CIPHER_CTX_num ( ctx ) ;
CRYPTO_cfb128_1_encrypt ( in , out , len * 8 , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , & num , EVP_CIPHER_CTX_encrypting ( ctx ) , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
}
return 1 ;
}
static int aes_ctr_cipher ( EVP_CIPHER_CTX * ctx , unsigned char * out , const unsigned char * in , size_t len ) {
unsigned int num = EVP_CIPHER_CTX_num ( ctx ) ;
EVP_AES_KEY * dat = EVP_C_DATA ( EVP_AES_KEY , ctx ) ;
if ( dat -> stream . ctr ) CRYPTO_ctr128_encrypt_ctr32 ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , EVP_CIPHER_CTX_buf_noconst ( ctx ) , & num , dat -> stream . ctr ) ;
else CRYPTO_ctr128_encrypt ( in , out , len , & dat -> ks , EVP_CIPHER_CTX_iv_noconst ( ctx ) , EVP_CIPHER_CTX_buf_noconst ( ctx ) , & num , dat -> block ) ;
EVP_CIPHER_CTX_set_num ( ctx , num ) ;
return 1 ;
}
BLOCK_CIPHER_generic_pack ( NID_aes , 128 , 0 ) BLOCK_CIPHER_generic_pack ( NID_aes , 192 , 0 ) BLOCK_CIPHER_generic_pack ( NID_aes , 256 , 0 ) |
2,842,017,758,346,607,000 | debian | 70 | 0 | extern int as_mysql_cluster_tres ( mysql_conn_t * mysql_conn , char * cluster_nodes , char * * tres_str_in , time_t event_time ) {
char * query ;
int rc = SLURM_SUCCESS ;
int first = 0 ;
MYSQL_RES * result = NULL ;
MYSQL_ROW row ;
xassert ( tres_str_in ) ;
if ( check_connection ( mysql_conn ) != SLURM_SUCCESS ) return ESLURM_DB_CONNECTION ;
if ( ! mysql_conn -> cluster_name ) {
error ( "%s:%d no cluster name" , THIS_FILE , __LINE__ ) ;
return SLURM_ERROR ;
}
query = xstrdup_printf ( "select tres, cluster_nodes from \"%s_%s\" where " "time_end=0 and node_name='' and state=0 limit 1" , mysql_conn -> cluster_name , event_table ) ;
if ( ! ( result = mysql_db_query_ret ( mysql_conn , query , 0 ) ) ) {
xfree ( query ) ;
if ( mysql_errno ( mysql_conn -> db_conn ) == ER_NO_SUCH_TABLE ) rc = ESLURM_ACCESS_DENIED ;
else rc = SLURM_ERROR ;
return rc ;
}
xfree ( query ) ;
if ( ! ( row = mysql_fetch_row ( result ) ) ) {
debug ( "We don't have an entry for this machine %s " "most likely a first time running." , mysql_conn -> cluster_name ) ;
if ( ! * tres_str_in ) {
rc = 0 ;
goto end_it ;
}
first = 1 ;
goto add_it ;
}
if ( ! * tres_str_in ) {
* tres_str_in = xstrdup ( row [ 0 ] ) ;
goto end_it ;
}
else if ( xstrcmp ( * tres_str_in , row [ 0 ] ) ) {
debug ( "%s has changed tres from %s to %s" , mysql_conn -> cluster_name , row [ 0 ] , * tres_str_in ) ;
}
else {
if ( debug_flags & DEBUG_FLAG_DB_EVENT ) DB_DEBUG ( mysql_conn -> conn , "We have the same tres as before for %s, " "no need to update the database." , mysql_conn -> cluster_name ) ;
if ( cluster_nodes ) {
if ( ! row [ 1 ] [ 0 ] ) {
debug ( "Adding cluster nodes '%s' to " "last instance of cluster '%s'." , cluster_nodes , mysql_conn -> cluster_name ) ;
query = xstrdup_printf ( "update \"%s_%s\" set " "cluster_nodes='%s' " "where time_end=0 and node_name=''" , mysql_conn -> cluster_name , event_table , cluster_nodes ) ;
( void ) mysql_db_query ( mysql_conn , query ) ;
xfree ( query ) ;
goto update_it ;
}
else if ( ! xstrcmp ( cluster_nodes , row [ 1 ] ) ) {
if ( debug_flags & DEBUG_FLAG_DB_EVENT ) DB_DEBUG ( mysql_conn -> conn , "we have the same nodes " "in the cluster " "as before no need to " "update the database." ) ;
goto update_it ;
}
}
goto end_it ;
}
query = xstrdup_printf ( "update \"%s_%s\" set time_end=%ld where time_end=0" , mysql_conn -> cluster_name , event_table , event_time ) ;
rc = mysql_db_query ( mysql_conn , query ) ;
xfree ( query ) ;
first = 1 ;
if ( rc != SLURM_SUCCESS ) goto end_it ;
add_it : query = xstrdup_printf ( "insert into \"%s_%s\" (cluster_nodes, tres, " "time_start, reason) " "values ('%s', '%s', %ld, 'Cluster Registered TRES');
" , mysql_conn -> cluster_name , event_table , cluster_nodes , * tres_str_in , event_time ) ;
( void ) mysql_db_query ( mysql_conn , query ) ;
xfree ( query ) ;
update_it : query = xstrdup_printf ( "update \"%s_%s\" set time_end=%ld where time_end=0 " "and state=%u and node_name='';
" , mysql_conn -> cluster_name , event_table , event_time , NODE_STATE_DOWN ) ;
rc = mysql_db_query ( mysql_conn , query ) ;
xfree ( query ) ;
end_it : mysql_free_result ( result ) ;
if ( first && rc == SLURM_SUCCESS ) rc = ACCOUNTING_FIRST_REG ;
return rc ;
} |
2,218,137,424,821,696,500 | debian | 12 | 0 | void ff_xvmc_pack_pblocks ( MpegEncContext * s , int cbp ) {
int i , j = 0 ;
const int mb_block_count = 4 + ( 1 << s -> chroma_format ) ;
cbp <<= 12 - mb_block_count ;
for ( i = 0 ;
i < mb_block_count ;
i ++ ) {
if ( cbp & ( 1 << 11 ) ) s -> pblocks [ i ] = & s -> block [ j ++ ] ;
else s -> pblocks [ i ] = NULL ;
cbp += cbp ;
}
} |
-560,820,000,732,125,060 | chrome | 19 | 0 | static void exsltMathLowestFunction ( xmlXPathParserContextPtr ctxt , int nargs ) {
xmlNodeSetPtr ns , ret ;
void * user = NULL ;
if ( nargs != 1 ) {
xmlXPathSetArityError ( ctxt ) ;
return ;
}
if ( ( ctxt -> value != NULL ) && ( ctxt -> value -> boolval != 0 ) ) {
user = ctxt -> value -> user ;
ctxt -> value -> boolval = 0 ;
ctxt -> value -> user = NULL ;
}
ns = xmlXPathPopNodeSet ( ctxt ) ;
if ( xmlXPathCheckError ( ctxt ) ) return ;
ret = exsltMathLowest ( ns ) ;
xmlXPathFreeNodeSet ( ns ) ;
if ( user != NULL ) xmlFreeNodeList ( ( xmlNodePtr ) user ) ;
xmlXPathReturnNodeSet ( ctxt , ret ) ;
} |
-1,315,695,702,746,584,300 | debian | 22 | 0 | void proto_item_append_text ( proto_item * pi , const char * format , ... ) {
field_info * fi = NULL ;
size_t curlen ;
va_list ap ;
TRY_TO_FAKE_THIS_REPR_VOID ( pi ) ;
fi = PITEM_FINFO ( pi ) ;
if ( fi == NULL ) {
return ;
}
if ( ! PROTO_ITEM_IS_HIDDEN ( pi ) ) {
if ( fi -> rep == NULL ) {
ITEM_LABEL_NEW ( PNODE_POOL ( pi ) , fi -> rep ) ;
proto_item_fill_label ( fi , fi -> rep -> representation ) ;
}
curlen = strlen ( fi -> rep -> representation ) ;
if ( ITEM_LABEL_LENGTH > curlen ) {
va_start ( ap , format ) ;
g_vsnprintf ( fi -> rep -> representation + curlen , ITEM_LABEL_LENGTH - ( gulong ) curlen , format , ap ) ;
va_end ( ap ) ;
}
}
} |
1,760,449,185,745,615,400 | debian | 5 | 0 | int TSHttpTxnClientRespHdrBytesGet ( TSHttpTxn txnp ) {
sdk_assert ( sdk_sanity_check_txn ( txnp ) == TS_SUCCESS ) ;
HttpSM * sm = ( HttpSM * ) txnp ;
return sm -> client_response_hdr_bytes ;
} |
-2,864,619,463,801,931,300 | chrome | 4 | 0 | void exsltDynRegister ( void ) {
xsltRegisterExtModuleFunction ( ( const xmlChar * ) "evaluate" , EXSLT_DYNAMIC_NAMESPACE , exsltDynEvaluateFunction ) ;
xsltRegisterExtModuleFunction ( ( const xmlChar * ) "map" , EXSLT_DYNAMIC_NAMESPACE , exsltDynMapFunction ) ;
} |
-2,423,144,171,479,607,000 | debian | 39 | 0 | static pdf_gstate * begin_softmask ( fz_context * ctx , pdf_run_processor * pr , softmask_save * save ) {
pdf_gstate * gstate = pr -> gstate + pr -> gtop ;
pdf_xobject * softmask = gstate -> softmask ;
fz_rect mask_bbox ;
fz_matrix tos_save [ 2 ] , save_ctm ;
fz_matrix mask_matrix ;
fz_colorspace * mask_colorspace ;
save -> softmask = softmask ;
if ( softmask == NULL ) return gstate ;
save -> page_resources = gstate -> softmask_resources ;
save -> ctm = gstate -> softmask_ctm ;
save_ctm = gstate -> ctm ;
pdf_xobject_bbox ( ctx , softmask , & mask_bbox ) ;
pdf_xobject_matrix ( ctx , softmask , & mask_matrix ) ;
pdf_tos_save ( ctx , & pr -> tos , tos_save ) ;
if ( gstate -> luminosity ) mask_bbox = fz_infinite_rect ;
else {
fz_transform_rect ( & mask_bbox , & mask_matrix ) ;
fz_transform_rect ( & mask_bbox , & gstate -> softmask_ctm ) ;
}
gstate -> softmask = NULL ;
gstate -> softmask_resources = NULL ;
gstate -> ctm = gstate -> softmask_ctm ;
mask_colorspace = pdf_xobject_colorspace ( ctx , softmask ) ;
if ( gstate -> luminosity && ! mask_colorspace ) mask_colorspace = fz_keep_colorspace ( ctx , fz_device_gray ( ctx ) ) ;
fz_try ( ctx ) {
fz_begin_mask ( ctx , pr -> dev , & mask_bbox , gstate -> luminosity , mask_colorspace , gstate -> softmask_bc , & gstate -> fill . color_params ) ;
pdf_run_xobject ( ctx , pr , softmask , save -> page_resources , & fz_identity , 1 ) ;
}
fz_always ( ctx ) fz_drop_colorspace ( ctx , mask_colorspace ) ;
fz_catch ( ctx ) {
fz_rethrow_if ( ctx , FZ_ERROR_TRYLATER ) ;
}
fz_end_mask ( ctx , pr -> dev ) ;
pdf_tos_restore ( ctx , & pr -> tos , tos_save ) ;
gstate = pr -> gstate + pr -> gtop ;
gstate -> ctm = save_ctm ;
return gstate ;
} |
-2,661,809,302,248,699,000 | debian | 45 | 1 | static int decode_i2_frame ( FourXContext * f , const uint8_t * buf , int length ) {
int x , y , x2 , y2 ;
const int width = f -> avctx -> width ;
const int height = f -> avctx -> height ;
const int mbs = ( FFALIGN ( width , 16 ) >> 4 ) * ( FFALIGN ( height , 16 ) >> 4 ) ;
uint16_t * dst = ( uint16_t * ) f -> current_picture -> data [ 0 ] ;
const int stride = f -> current_picture -> linesize [ 0 ] >> 1 ;
GetByteContext g3 ;
if ( length < mbs * 8 ) {
av_log ( f -> avctx , AV_LOG_ERROR , "packet size too small\n" ) ;
return AVERROR_INVALIDDATA ;
}
bytestream2_init ( & g3 , buf , length ) ;
for ( y = 0 ;
y < height ;
y += 16 ) {
for ( x = 0 ;
x < width ;
x += 16 ) {
unsigned int color [ 4 ] = {
0 }
, bits ;
color [ 0 ] = bytestream2_get_le16u ( & g3 ) ;
color [ 1 ] = bytestream2_get_le16u ( & g3 ) ;
if ( color [ 0 ] & 0x8000 ) av_log ( NULL , AV_LOG_ERROR , "unk bit 1\n" ) ;
if ( color [ 1 ] & 0x8000 ) av_log ( NULL , AV_LOG_ERROR , "unk bit 2\n" ) ;
color [ 2 ] = mix ( color [ 0 ] , color [ 1 ] ) ;
color [ 3 ] = mix ( color [ 1 ] , color [ 0 ] ) ;
bits = bytestream2_get_le32u ( & g3 ) ;
for ( y2 = 0 ;
y2 < 16 ;
y2 ++ ) {
for ( x2 = 0 ;
x2 < 16 ;
x2 ++ ) {
int index = 2 * ( x2 >> 2 ) + 8 * ( y2 >> 2 ) ;
dst [ y2 * stride + x2 ] = color [ ( bits >> index ) & 3 ] ;
}
}
dst += 16 ;
}
dst += 16 * stride - x ;
}
return 0 ;
} |
5,357,882,892,791,796,000 | debian | 18 | 0 | int e1000e_can_receive ( E1000ECore * core ) {
int i ;
if ( ! e1000x_rx_ready ( core -> owner , core -> mac ) ) {
return false ;
}
for ( i = 0 ;
i < E1000E_NUM_QUEUES ;
i ++ ) {
E1000E_RxRing rxr ;
e1000e_rx_ring_init ( core , & rxr , i ) ;
if ( e1000e_ring_enabled ( core , rxr . i ) && e1000e_has_rxbufs ( core , rxr . i , 1 ) ) {
trace_e1000e_rx_can_recv ( ) ;
return true ;
}
}
trace_e1000e_rx_can_recv_rings_full ( ) ;
return false ;
} |
7,198,560,023,137,364,000 | debian | 26 | 0 | struct file_list * flist_for_ndx ( int ndx , const char * fatal_error_loc ) {
struct file_list * flist = cur_flist ;
if ( ! flist && ! ( flist = first_flist ) ) goto not_found ;
while ( ndx < flist -> ndx_start - 1 ) {
if ( flist == first_flist ) goto not_found ;
flist = flist -> prev ;
}
while ( ndx >= flist -> ndx_start + flist -> used ) {
if ( ! ( flist = flist -> next ) ) goto not_found ;
}
return flist ;
not_found : if ( fatal_error_loc ) {
int first , last ;
if ( first_flist ) {
first = first_flist -> ndx_start - 1 ;
last = first_flist -> prev -> ndx_start + first_flist -> prev -> used - 1 ;
}
else {
first = 0 ;
last = - 1 ;
}
rprintf ( FERROR , "File-list index %d not in %d - %d (%s) [%s]\n" , ndx , first , last , fatal_error_loc , who_am_i ( ) ) ;
exit_cleanup ( RERR_PROTOCOL ) ;
}
return NULL ;
} |
-4,525,874,104,093,394,400 | debian | 10 | 0 | static OFCondition makeLengthError ( const char * pdu , unsigned long bufSize , unsigned long minSize , unsigned long length ) {
OFStringStream stream ;
stream << "DUL Illegal " << pdu << ". Got " << bufSize << " bytes of data" ;
if ( length != 0 ) stream << " with a length field of " << length << " (data before length field is not included in length field)" ;
if ( minSize != 0 ) stream << ". The minimum allowed size is " << minSize ;
stream << "." << OFStringStream_ends ;
OFCondition ret ;
OFSTRINGSTREAM_GETSTR ( stream , tmpString ) ret = makeDcmnetCondition ( DULC_ILLEGALPDULENGTH , OF_error , tmpString ) ;
OFSTRINGSTREAM_FREESTR ( tmpString ) return ret ;
} |
-8,620,097,311,326,519,000 | chrome | 8 | 0 | void crypto_policy_set_aes_cm_256_hmac_sha1_32 ( crypto_policy_t * p ) {
p -> cipher_type = AES_ICM ;
p -> cipher_key_len = 46 ;
p -> auth_type = HMAC_SHA1 ;
p -> auth_key_len = 20 ;
p -> auth_tag_len = 4 ;
p -> sec_serv = sec_serv_conf_and_auth ;
} |
-5,280,794,106,681,745,000 | debian | 8 | 0 | static gboolean gst_asf_demux_get_bytes ( guint8 * * p_buf , guint num_bytes_to_read , guint8 * * p_data , guint64 * p_size ) {
* p_buf = NULL ;
if ( * p_size < num_bytes_to_read ) return FALSE ;
* p_buf = g_memdup ( * p_data , num_bytes_to_read ) ;
* p_data += num_bytes_to_read ;
* p_size -= num_bytes_to_read ;
return TRUE ;
} |
-2,908,211,205,972,632,000 | debian | 31 | 0 | void mainwindows_deinit ( void ) {
while ( mainwindows != NULL ) mainwindow_destroy ( mainwindows -> data ) ;
g_free ( clrtoeol_info ) ;
command_unbind ( "window grow" , ( SIGNAL_FUNC ) cmd_window_grow ) ;
command_unbind ( "window shrink" , ( SIGNAL_FUNC ) cmd_window_shrink ) ;
command_unbind ( "window size" , ( SIGNAL_FUNC ) cmd_window_size ) ;
command_unbind ( "window balance" , ( SIGNAL_FUNC ) cmd_window_balance ) ;
command_unbind ( "window hide" , ( SIGNAL_FUNC ) cmd_window_hide ) ;
command_unbind ( "window show" , ( SIGNAL_FUNC ) cmd_window_show ) ;
command_unbind ( "window up" , ( SIGNAL_FUNC ) cmd_window_up ) ;
command_unbind ( "window down" , ( SIGNAL_FUNC ) cmd_window_down ) ;
command_unbind ( "window left" , ( SIGNAL_FUNC ) cmd_window_left ) ;
command_unbind ( "window right" , ( SIGNAL_FUNC ) cmd_window_right ) ;
command_unbind ( "window dup" , ( SIGNAL_FUNC ) cmd_window_dup ) ;
command_unbind ( "window ddown" , ( SIGNAL_FUNC ) cmd_window_ddown ) ;
command_unbind ( "window dleft" , ( SIGNAL_FUNC ) cmd_window_dleft ) ;
command_unbind ( "window dright" , ( SIGNAL_FUNC ) cmd_window_dright ) ;
command_unbind ( "window stick" , ( SIGNAL_FUNC ) cmd_window_stick ) ;
command_unbind ( "window move left" , ( SIGNAL_FUNC ) cmd_window_move_left ) ;
command_unbind ( "window move right" , ( SIGNAL_FUNC ) cmd_window_move_right ) ;
command_unbind ( "window move up" , ( SIGNAL_FUNC ) cmd_window_move_up ) ;
command_unbind ( "window move down" , ( SIGNAL_FUNC ) cmd_window_move_down ) ;
command_unbind ( "window move dleft" , ( SIGNAL_FUNC ) cmd_window_move_dleft ) ;
command_unbind ( "window move dright" , ( SIGNAL_FUNC ) cmd_window_move_dright ) ;
command_unbind ( "window rgrow" , ( SIGNAL_FUNC ) cmd_window_rgrow ) ;
command_unbind ( "window rshrink" , ( SIGNAL_FUNC ) cmd_window_rshrink ) ;
command_unbind ( "window rsize" , ( SIGNAL_FUNC ) cmd_window_rsize ) ;
command_unbind ( "window rbalance" , ( SIGNAL_FUNC ) cmd_window_rbalance ) ;
command_unbind ( "window rshow" , ( SIGNAL_FUNC ) cmd_window_rshow ) ;
signal_remove ( "window print info" , ( SIGNAL_FUNC ) sig_window_print_info ) ;
} |
-4,055,702,019,813,177,000 | debian | 143 | 0 | static guint32 dissect_fullpacket ( tvbuff_t * tvb , guint32 offset , guint16 scallno , packet_info * pinfo , proto_tree * iax2_tree , proto_tree * main_tree ) {
guint16 dcallno ;
guint32 ts ;
guint8 type ;
guint8 csub ;
guint32 codec ;
proto_tree * packet_type_tree = NULL ;
iax_call_data * iax_call ;
iax_packet_data * iax_packet ;
gboolean reversed ;
gboolean rtp_marker ;
dcallno = tvb_get_ntohs ( tvb , offset ) & 0x7FFF ;
ts = tvb_get_ntohl ( tvb , offset + 2 ) ;
type = tvb_get_guint8 ( tvb , offset + 8 ) ;
csub = tvb_get_guint8 ( tvb , offset + 9 ) ;
iax2_info -> ftype = type ;
iax2_info -> csub = csub ;
iax2_info -> scallno = scallno ;
iax2_info -> dcallno = dcallno ;
iax_packet = ( iax_packet_data * ) p_get_proto_data ( wmem_file_scope ( ) , pinfo , proto_iax2 , 0 ) ;
if ( ! iax_packet ) {
if ( type == AST_FRAME_IAX && csub == IAX_COMMAND_NEW ) {
iax_call = iax_new_call ( pinfo , scallno ) ;
reversed = FALSE ;
}
else {
iax_call = iax_lookup_call ( pinfo , scallno , dcallno , & reversed ) ;
}
iax_packet = iax_new_packet_data ( iax_call , reversed ) ;
p_add_proto_data ( wmem_file_scope ( ) , pinfo , proto_iax2 , 0 , iax_packet ) ;
}
else {
iax_call = iax_packet -> call_data ;
reversed = iax_packet -> reversed ;
}
iax2_populate_pinfo_from_packet_data ( pinfo , iax_packet ) ;
if ( iax2_tree ) {
proto_item * packet_type_base ;
proto_tree_add_item ( iax2_tree , hf_iax2_dcallno , tvb , offset , 2 , ENC_BIG_ENDIAN ) ;
proto_tree_add_item ( iax2_tree , hf_iax2_retransmission , tvb , offset , 2 , ENC_BIG_ENDIAN ) ;
if ( iax_call ) {
proto_item * item = proto_tree_add_uint ( iax2_tree , hf_iax2_callno , tvb , 0 , 4 , iax_call -> forward_circuit_ids [ 0 ] ) ;
PROTO_ITEM_SET_GENERATED ( item ) ;
}
proto_tree_add_uint ( iax2_tree , hf_iax2_ts , tvb , offset + 2 , 4 , ts ) ;
iax2_add_ts_fields ( pinfo , iax2_tree , tvb , iax_packet , ( guint16 ) ts ) ;
proto_tree_add_item ( iax2_tree , hf_iax2_oseqno , tvb , offset + 6 , 1 , ENC_BIG_ENDIAN ) ;
proto_tree_add_item ( iax2_tree , hf_iax2_iseqno , tvb , offset + 7 , 1 , ENC_BIG_ENDIAN ) ;
packet_type_base = proto_tree_add_uint ( iax2_tree , hf_iax2_type , tvb , offset + 8 , 1 , type ) ;
packet_type_tree = proto_item_add_subtree ( packet_type_base , ett_iax2_type ) ;
}
else {
iax2_add_ts_fields ( pinfo , iax2_tree , tvb , iax_packet , ( guint16 ) ts ) ;
}
col_add_fstr ( pinfo -> cinfo , COL_INFO , "%s, source call# %d, timestamp %ums" , val_to_str_ext ( type , & iax_frame_types_ext , "Unknown (0x%02x)" ) , scallno , ts ) ;
iax2_info -> messageName = val_to_str_ext ( type , & iax_frame_types_ext , "Unknown (0x%02x)" ) ;
switch ( type ) {
case AST_FRAME_IAX : offset = dissect_iax2_command ( tvb , offset + 9 , pinfo , packet_type_tree , iax_packet ) ;
iax2_info -> messageName = val_to_str_ext ( csub , & iax_iax_subclasses_ext , "unknown (0x%02x)" ) ;
if ( csub < NUM_TAP_IAX_VOIP_STATES ) iax2_info -> callState = tap_iax_voip_state [ csub ] ;
break ;
case AST_FRAME_DTMF_BEGIN : case AST_FRAME_DTMF_END : proto_tree_add_item ( packet_type_tree , hf_iax2_dtmf_csub , tvb , offset + 9 , 1 , ENC_ASCII | ENC_NA ) ;
offset += 10 ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , " digit %c" , csub ) ;
break ;
case AST_FRAME_CONTROL : proto_tree_add_uint ( packet_type_tree , hf_iax2_cmd_csub , tvb , offset + 9 , 1 , csub ) ;
offset += 10 ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , " %s" , val_to_str_ext ( csub , & iax_cmd_subclasses_ext , "unknown (0x%02x)" ) ) ;
iax2_info -> messageName = val_to_str_ext ( csub , & iax_cmd_subclasses_ext , "unknown (0x%02x)" ) ;
if ( csub < NUM_TAP_CMD_VOIP_STATES ) iax2_info -> callState = tap_cmd_voip_state [ csub ] ;
break ;
case AST_FRAME_VOICE : iax_packet -> codec = codec = uncompress_subclass ( csub ) ;
if ( packet_type_tree ) {
proto_item * item ;
proto_tree_add_item ( packet_type_tree , hf_iax2_voice_csub , tvb , offset + 9 , 1 , ENC_BIG_ENDIAN ) ;
item = proto_tree_add_uint ( packet_type_tree , hf_iax2_voice_codec , tvb , offset + 9 , 1 , codec ) ;
PROTO_ITEM_SET_GENERATED ( item ) ;
}
offset += 10 ;
if ( iax_call ) {
if ( reversed ) {
iax_call -> dst_codec = codec ;
}
else {
iax_call -> src_codec = codec ;
}
}
dissect_payload ( tvb , offset , pinfo , iax2_tree , main_tree , ts , FALSE , iax_packet ) ;
break ;
case AST_FRAME_VIDEO : rtp_marker = csub & 0x40 ? TRUE : FALSE ;
iax_packet -> codec = codec = uncompress_subclass ( ( guint8 ) ( csub & ~ 40 ) ) ;
if ( packet_type_tree ) {
proto_item * item ;
proto_tree_add_item ( packet_type_tree , hf_iax2_video_csub , tvb , offset + 9 , 1 , ENC_BIG_ENDIAN ) ;
proto_tree_add_item ( packet_type_tree , hf_iax2_marker , tvb , offset + 9 , 1 , ENC_BIG_ENDIAN ) ;
item = proto_tree_add_uint ( packet_type_tree , hf_iax2_video_codec , tvb , offset + 9 , 1 , codec ) ;
PROTO_ITEM_SET_GENERATED ( item ) ;
}
offset += 10 ;
if ( iax_call && iax_packet -> first_time ) {
if ( reversed ) {
iax_call -> dst_vformat = codec ;
}
else {
iax_call -> src_vformat = codec ;
}
}
if ( rtp_marker ) col_append_str ( pinfo -> cinfo , COL_INFO , ", Mark" ) ;
dissect_payload ( tvb , offset , pinfo , iax2_tree , main_tree , ts , TRUE , iax_packet ) ;
break ;
case AST_FRAME_MODEM : proto_tree_add_item ( packet_type_tree , hf_iax2_modem_csub , tvb , offset + 9 , 1 , ENC_BIG_ENDIAN ) ;
offset += 10 ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , " %s" , val_to_str ( csub , iax_modem_subclasses , "unknown (0x%02x)" ) ) ;
break ;
case AST_FRAME_TEXT : proto_tree_add_item ( packet_type_tree , hf_iax2_text_csub , tvb , offset + 9 , 1 , ENC_BIG_ENDIAN ) ;
offset += 10 ;
{
int textlen = tvb_captured_length_remaining ( tvb , offset ) ;
if ( textlen > 0 ) {
proto_tree_add_item ( packet_type_tree , hf_iax2_text_text , tvb , offset , textlen , ENC_UTF_8 | ENC_NA ) ;
offset += textlen ;
}
}
break ;
case AST_FRAME_HTML : proto_tree_add_item ( packet_type_tree , hf_iax2_html_csub , tvb , offset + 9 , 1 , ENC_BIG_ENDIAN ) ;
offset += 10 ;
if ( csub == 0x01 ) {
int urllen = tvb_captured_length_remaining ( tvb , offset ) ;
if ( urllen > 0 ) {
proto_item * pi = proto_tree_add_item ( packet_type_tree , hf_iax2_html_url , tvb , offset , urllen , ENC_UTF_8 | ENC_NA ) ;
PROTO_ITEM_SET_URL ( pi ) ;
offset += urllen ;
}
}
break ;
case AST_FRAME_CNG : default : proto_tree_add_uint ( packet_type_tree , hf_iax2_csub , tvb , offset + 9 , 1 , csub ) ;
offset += 10 ;
col_append_fstr ( pinfo -> cinfo , COL_INFO , " subclass %d" , csub ) ;
break ;
}
iax_packet -> first_time = FALSE ;
return offset ;
} |
2,388,171,415,474,876,000 | debian | 4 | 0 | static guint rsvp_hash ( gconstpointer k ) {
const struct rsvp_request_key * key = ( const struct rsvp_request_key * ) k ;
return key -> conversation ;
} |
2,687,336,064,028,423,000 | chrome | 15 | 0 | static void search_postfix_add ( const char * domain ) {
int domain_len ;
struct search_domain * sdomain ;
while ( domain [ 0 ] == '.' ) domain ++ ;
domain_len = strlen ( domain ) ;
if ( ! global_search_state ) global_search_state = search_state_new ( ) ;
if ( ! global_search_state ) return ;
global_search_state -> num_domains ++ ;
sdomain = ( struct search_domain * ) malloc ( sizeof ( struct search_domain ) + domain_len ) ;
if ( ! sdomain ) return ;
memcpy ( ( ( u8 * ) sdomain ) + sizeof ( struct search_domain ) , domain , domain_len ) ;
sdomain -> next = global_search_state -> head ;
sdomain -> len = domain_len ;
global_search_state -> head = sdomain ;
} |
3,071,315,158,823,512,600 | debian | 14 | 0 | static void decode_transform_coeffs_ch ( AC3DecodeContext * s , int blk , int ch , mant_groups * m ) {
if ( ! s -> channel_uses_aht [ ch ] ) {
ac3_decode_transform_coeffs_ch ( s , ch , m ) ;
}
else {
int bin ;
if ( ! blk && CONFIG_EAC3_DECODER ) ff_eac3_decode_transform_coeffs_aht_ch ( s , ch ) ;
for ( bin = s -> start_freq [ ch ] ;
bin < s -> end_freq [ ch ] ;
bin ++ ) {
s -> fixed_coeffs [ ch ] [ bin ] = s -> pre_mantissa [ ch ] [ bin ] [ blk ] >> s -> dexps [ ch ] [ bin ] ;
}
}
} |
7,651,945,086,108,393,000 | debian | 52 | 0 | static int qemuMonitorJSONExtractCPUInfo ( virJSONValuePtr reply , int * * pids ) {
virJSONValuePtr data ;
int ret = - 1 ;
int i ;
int * threads = NULL ;
int ncpus ;
if ( ! ( data = virJSONValueObjectGet ( reply , "return" ) ) ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "cpu reply was missing return data" ) ) ;
goto cleanup ;
}
if ( data -> type != VIR_JSON_TYPE_ARRAY ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "cpu information was not an array" ) ) ;
goto cleanup ;
}
if ( ( ncpus = virJSONValueArraySize ( data ) ) <= 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "cpu information was empty" ) ) ;
goto cleanup ;
}
if ( VIR_REALLOC_N ( threads , ncpus ) < 0 ) {
virReportOOMError ( ) ;
goto cleanup ;
}
for ( i = 0 ;
i < ncpus ;
i ++ ) {
virJSONValuePtr entry = virJSONValueArrayGet ( data , i ) ;
int cpu ;
int thread ;
if ( ! entry ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "character device information was missing array element" ) ) ;
goto cleanup ;
}
if ( virJSONValueObjectGetNumberInt ( entry , "CPU" , & cpu ) < 0 ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , "%s" , _ ( "cpu information was missing cpu number" ) ) ;
goto cleanup ;
}
if ( virJSONValueObjectGetNumberInt ( entry , "thread_id" , & thread ) < 0 ) {
ret = 0 ;
goto cleanup ;
}
if ( cpu != i ) {
qemuReportError ( VIR_ERR_INTERNAL_ERROR , _ ( "unexpected cpu index %d expecting %d" ) , i , cpu ) ;
goto cleanup ;
}
threads [ i ] = thread ;
}
* pids = threads ;
threads = NULL ;
ret = ncpus ;
cleanup : VIR_FREE ( threads ) ;
return ret ;
} |
-7,943,184,491,469,275,000 | chrome | 49 | 0 | int evutil_socketpair ( int family , int type , int protocol , int fd [ 2 ] ) {
# ifndef WIN32 return socketpair ( family , type , protocol , fd ) ;
# else int listener = - 1 ;
int connector = - 1 ;
int acceptor = - 1 ;
struct sockaddr_in listen_addr ;
struct sockaddr_in connect_addr ;
int size ;
int saved_errno = - 1 ;
if ( protocol # ifdef AF_UNIX || family != AF_UNIX # endif ) {
EVUTIL_SET_SOCKET_ERROR ( WSAEAFNOSUPPORT ) ;
return - 1 ;
}
if ( ! fd ) {
EVUTIL_SET_SOCKET_ERROR ( WSAEINVAL ) ;
return - 1 ;
}
listener = socket ( AF_INET , type , 0 ) ;
if ( listener < 0 ) return - 1 ;
memset ( & listen_addr , 0 , sizeof ( listen_addr ) ) ;
listen_addr . sin_family = AF_INET ;
listen_addr . sin_addr . s_addr = htonl ( INADDR_LOOPBACK ) ;
listen_addr . sin_port = 0 ;
if ( bind ( listener , ( struct sockaddr * ) & listen_addr , sizeof ( listen_addr ) ) == - 1 ) goto tidy_up_and_fail ;
if ( listen ( listener , 1 ) == - 1 ) goto tidy_up_and_fail ;
connector = socket ( AF_INET , type , 0 ) ;
if ( connector < 0 ) goto tidy_up_and_fail ;
size = sizeof ( connect_addr ) ;
if ( getsockname ( listener , ( struct sockaddr * ) & connect_addr , & size ) == - 1 ) goto tidy_up_and_fail ;
if ( size != sizeof ( connect_addr ) ) goto abort_tidy_up_and_fail ;
if ( connect ( connector , ( struct sockaddr * ) & connect_addr , sizeof ( connect_addr ) ) == - 1 ) goto tidy_up_and_fail ;
size = sizeof ( listen_addr ) ;
acceptor = accept ( listener , ( struct sockaddr * ) & listen_addr , & size ) ;
if ( acceptor < 0 ) goto tidy_up_and_fail ;
if ( size != sizeof ( listen_addr ) ) goto abort_tidy_up_and_fail ;
EVUTIL_CLOSESOCKET ( listener ) ;
if ( getsockname ( connector , ( struct sockaddr * ) & connect_addr , & size ) == - 1 ) goto tidy_up_and_fail ;
if ( size != sizeof ( connect_addr ) || listen_addr . sin_family != connect_addr . sin_family || listen_addr . sin_addr . s_addr != connect_addr . sin_addr . s_addr || listen_addr . sin_port != connect_addr . sin_port ) goto abort_tidy_up_and_fail ;
fd [ 0 ] = connector ;
fd [ 1 ] = acceptor ;
return 0 ;
abort_tidy_up_and_fail : saved_errno = WSAECONNABORTED ;
tidy_up_and_fail : if ( saved_errno < 0 ) saved_errno = WSAGetLastError ( ) ;
if ( listener != - 1 ) EVUTIL_CLOSESOCKET ( listener ) ;
if ( connector != - 1 ) EVUTIL_CLOSESOCKET ( connector ) ;
if ( acceptor != - 1 ) EVUTIL_CLOSESOCKET ( acceptor ) ;
EVUTIL_SET_SOCKET_ERROR ( saved_errno ) ;
return - 1 ;
# endif } |
7,039,307,292,471,245,000 | debian | 1,078 | 0 | void proto_register_gsm_a_dtap ( void ) {
guint i ;
guint last_offset ;
static hf_register_info hf [ ] = {
{
& hf_gsm_a_seq_no , {
"Sequence number" , "gsm_a.dtap.seq_no" , FT_UINT8 , BASE_DEC , NULL , 0xc0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_gcc_type , {
"DTAP Group Call Control Message Type" , "gsm_a.dtap.msg_gcc_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_gcc_strings ) , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_bcc_type , {
"DTAP Broadcast Call Control Message Type" , "gsm_a.dtap.msg_bcc_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_bcc_strings ) , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_mm_type , {
"DTAP Mobility Management Message Type" , "gsm_a.dtap.msg_mm_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_mm_strings ) , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_cc_type , {
"DTAP Call Control Message Type" , "gsm_a.dtap.msg_cc_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_cc_strings ) , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_sms_type , {
"DTAP Short Message Service Message Type" , "gsm_a.dtap.msg_sms_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_sms_strings ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_ss_type , {
"DTAP Non call Supplementary Service Message Type" , "gsm_a.dtap.msg_ss_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_ss_strings ) , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_msg_tp_type , {
"DTAP Tests Procedures Message Type" , "gsm_a.dtap.msg_tp_type" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_msg_tp_strings ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_elem_id , {
"Element ID" , "gsm_a.dtap.elem_id" , FT_UINT8 , BASE_HEX , NULL , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_cld_party_bcd_num , {
"Called Party BCD Number" , "gsm_a.dtap.cld_party_bcd_num" , FT_STRING , BASE_NONE , 0 , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_clg_party_bcd_num , {
"Calling Party BCD Number" , "gsm_a.dtap.clg_party_bcd_num" , FT_STRING , BASE_NONE , 0 , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_conn_num , {
"Connected Number" , "gsm_a.dtap.conn_num" , FT_STRING , BASE_NONE , 0 , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_red_party_bcd_num , {
"Redirecting Party BCD Number" , "gsm_a.dtap.red_party_bcd_num" , FT_STRING , BASE_NONE , 0 , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_cause , {
"DTAP Cause" , "gsm_a.dtap.cause" , FT_UINT8 , BASE_HEX , 0 , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_type_of_number , {
"Type of number" , "gsm_a.dtap.type_of_number" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_type_of_number_values ) , 0x70 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_numbering_plan_id , {
"Numbering plan identification" , "gsm_a.dtap.numbering_plan_id" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_numbering_plan_id_values ) , 0x0f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_present_ind , {
"Presentation indicator" , "gsm_a.dtap.present_ind" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_present_ind_values ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_screening_ind , {
"Screening indicator" , "gsm_a.dtap.screening_ind" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_screening_ind_values ) , 0x03 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_type_of_sub_addr , {
"Type of subaddress" , "gsm_a.dtap.type_of_sub_addr" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_type_of_sub_addr_values ) , 0x70 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_odd_even_ind , {
"Odd/even indicator" , "gsm_a.dtap.odd_even_ind" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_odd_even_ind_values ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_lsa_id , {
"LSA Identifier" , "gsm_a.dtap.lsa_id" , FT_UINT24 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_speech_vers_ind , {
"Speech version indication" , "gsm_a.dtap.speech_vers_ind" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_speech_vers_ind_values ) , 0x0f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_itc , {
"Information transfer capability" , "gsm_a.dtap.itc" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_itc_values ) , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_sysid , {
"System Identification (SysID)" , "gsm_a.dtap.sysid" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_sysid_values ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bitmap_length , {
"Bitmap Length" , "gsm_a.dtap.bitmap_length" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b7 , {
"Automatically initiated eCall" , "gsm_a.dtap.serv_cat_b7" , FT_BOOLEAN , 8 , NULL , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b6 , {
"Manually initiated eCall" , "gsm_a.dtap.serv_cat_b6" , FT_BOOLEAN , 8 , NULL , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b5 , {
"Mountain Rescue" , "gsm_a.dtap.serv_cat_b5" , FT_BOOLEAN , 8 , NULL , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b4 , {
"Marine Guard" , "gsm_a.dtap.serv_cat_b4" , FT_BOOLEAN , 8 , NULL , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b3 , {
"Fire Brigade" , "gsm_a.dtap.serv_cat_b3" , FT_BOOLEAN , 8 , NULL , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b2 , {
"Ambulance" , "gsm_a.dtap.serv_cat_b2" , FT_BOOLEAN , 8 , NULL , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_serv_cat_b1 , {
"Police" , "gsm_a.dtap.serv_cat_b1" , FT_BOOLEAN , 8 , NULL , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_csmo , {
"CSMO" , "gsm_a.dtap.csmo" , FT_BOOLEAN , BASE_NONE , TFS ( & gsm_a_dtap_csmo_value ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_csmt , {
"CSMT" , "gsm_a.dtap.csmt" , FT_BOOLEAN , BASE_NONE , TFS ( & gsm_a_dtap_csmt_value ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mm_timer_unit , {
"Unit" , "gsm_a.dtap.mm_timer_unit" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_mm_timer_unit_vals ) , 0xe0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mm_timer_value , {
"Timer value" , "gsm_a.dtap.mm_timer_value" , FT_UINT8 , BASE_DEC , NULL , 0x1f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_alerting_pattern , {
"Alerting Pattern" , "gsm_a.dtap.alerting_pattern" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_alerting_pattern_vals ) , 0x0f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ccbs_activation , {
"CCBS Activation" , "gsm_a.dtap.ccbs_activation" , FT_BOOLEAN , 8 , TFS ( & gsm_a_ccbs_activation_value ) , 0x80 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_stream_identifier , {
"Stream Identifier" , "gsm_a.dtap.stream_identifier" , FT_UINT8 , BASE_HEX , 0 , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mcs , {
"MCS" , "gsm_a.dtap.mcs" , FT_BOOLEAN , 8 , TFS ( & gsm_a_mcs_value ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_cause_of_no_cli , {
"Cause of no CLI" , "gsm_a.dtap.cause_of_no_cli" , FT_UINT8 , BASE_HEX , 0 , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_cause_ss_diagnostics , {
"Supplementary Services Diagnostics" , "gsm_a.dtap.cause_ss_diagnostics" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_cause_ss_diagnostics_vals ) , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_tdma_efr , {
"TDMA EFR" , "gsm_a.dtap.codec.tdma_efr" , FT_BOOLEAN , 8 , NULL , 0x80 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_umts_amr_2 , {
"UMTS AMR 2" , "gsm_a.dtap.codec.umts_amr_2" , FT_BOOLEAN , 8 , NULL , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_umts_amr , {
"UMTS AMR" , "gsm_a.dtap.codec.umts_amr" , FT_BOOLEAN , 8 , NULL , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_hr_amr , {
"HR AMR" , "gsm_a.dtap.codec.hr_amr" , FT_BOOLEAN , 8 , NULL , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_fr_amr , {
"FR AMR" , "gsm_a.dtap.codec.fr_amr" , FT_BOOLEAN , 8 , NULL , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_gsm_efr , {
"GSM EFR" , "gsm_a.dtap.codec.gsm_efr" , FT_BOOLEAN , 8 , NULL , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_gsm_hr , {
"GSM HR" , "gsm_a.dtap.codec.gsm_hr" , FT_BOOLEAN , 8 , NULL , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_gsm_fr , {
"GSM FR" , "gsm_a.dtap.codec.gsm_fr" , FT_BOOLEAN , 8 , NULL , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_ohr_amr_wb , {
"OHR AMR-WB" , "gsm_a.dtap.codec.ohr_amr_wb" , FT_BOOLEAN , 8 , NULL , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_ofr_amr_wb , {
"OFR AMR-WB" , "gsm_a.dtap.codec.ofr_amr_wb" , FT_BOOLEAN , 8 , NULL , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_ohr_amr , {
"OHR AMR" , "gsm_a.dtap.codec.ohr_amr" , FT_BOOLEAN , 8 , NULL , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_umts_amr_wb , {
"UMTS AMR-WB" , "gsm_a.dtap.codec.umts_amr_wb" , FT_BOOLEAN , 8 , NULL , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_fr_amr_wb , {
"FR AMR-WB" , "gsm_a.dtap.codec.fr_amr_wb" , FT_BOOLEAN , 8 , NULL , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_codec_pdc_efr , {
"PDC EFR" , "gsm_a.dtap.codec.pdc_efr" , FT_BOOLEAN , 8 , NULL , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_notification_description , {
"Notification description" , "gsm_a.dtap.notif_descr" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_notification_description_vals ) , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_emerg_num_info_length , {
"Emergency Number Info length" , "gsm_a.dtap.emerg_num_info_length" , FT_UINT8 , BASE_DEC , 0 , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_emergency_bcd_num , {
"Emergency BCD Number" , "gsm_a.dtap.emergency_bcd_num" , FT_STRING , BASE_NONE , 0 , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_signal_value , {
"Signal value" , "gsm_a.dtap.signal_value" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_signal_value_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_recall_type , {
"Recall type" , "gsm_a.dtap.recall_type" , FT_UINT8 , BASE_HEX | BASE_RANGE_STRING , RVALS ( gsm_a_dtap_recall_type_vals ) , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_coding_standard , {
"Coding standard" , "gsm_a.dtap.coding_standard" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_coding_standard_vals ) , 0xc0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_call_state , {
"Call state" , "gsm_a.dtap.call_state" , FT_UINT8 , BASE_DEC , NULL , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_prog_coding_standard , {
"Coding standard" , "gsm_a.dtap.coding_standard" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_coding_standard_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_location , {
"Location" , "gsm_a.dtap.location" , FT_UINT8 , BASE_HEX , VALS ( gsm_a_dtap_location_vals ) , 0x0f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_progress_description , {
"Progress description" , "gsm_a.dtap.progress_description" , FT_UINT8 , BASE_DEC , NULL , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_afi , {
"Authority and Format Identifier" , "gsm_a.dtap.afi" , FT_UINT8 , BASE_HEX | BASE_EXT_STRING , & x213_afi_value_ext , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_rej_cause , {
"Reject cause" , "gsm_a.dtap.rej_cause" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_timezone , {
"Timezone" , "gsm_a.dtap.timezone" , FT_UINT8 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_u2u_prot_discr , {
"User-user protocol discriminator" , "gsm_a.dtap.u2u_prot_discr" , FT_UINT8 , BASE_HEX | BASE_RANGE_STRING , RVALS ( gsm_a_dtap_u2u_prot_discr_vals ) , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mcat , {
"MCAT" , "gsm_a.dtap.mcat" , FT_BOOLEAN , 8 , TFS ( & gsm_a_dtap_mcat_value ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_enicm , {
"ENICM" , "gsm_a.dtap.mcat" , FT_BOOLEAN , 8 , TFS ( & gsm_a_dtap_enicm_value ) , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_rand , {
"RAND value" , "gsm_a.dtap.rand" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_autn , {
"AUTN value" , "gsm_a.dtap.autn" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_sres , {
"SRES value" , "gsm_a.dtap.sres" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_xres , {
"XRES value" , "gsm_a.dtap.xres" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_auts , {
"AUTS value" , "gsm_a.dtap.auts" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_autn_sqn_xor_ak , {
"SQN xor AK" , "gsm_a.dtap.autn.sqn_xor_ak" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_autn_amf , {
"AMF" , "gsm_a.dtap.autn.amf" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_autn_mac , {
"MAC" , "gsm_a.dtap.autn.mac" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_auts_sqn_ms_xor_ak , {
"SQN_MS xor AK" , "gsm_a.dtap.auts.sqn_ms_xor_ak" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_auts_mac_s , {
"MAC-S" , "gsm_a.dtap.auts.mac_s" , FT_BYTES , FT_NONE , NULL , 0x00 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_mode , {
"UE test loop mode" , "gsm_a.dtap.epc.ue_tl_mode" , FT_UINT8 , BASE_DEC , VALS ( epc_ue_test_loop_mode_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_a_ul_sdu_size , {
"Uplink PDCP SDU size in bits" , "gsm_a.dtap.epc.ue_tl_a_ul_sdu_size" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_a_drb , {
"Data Radio Bearer identity number" , "gsm_a.dtap.epc.ue_tl_a_drb" , FT_UINT8 , BASE_DEC , NULL , 0x1f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_b_ip_pdu_delay , {
"IP PDU delay in seconds" , "gsm_a.dtap.epc.ue_tl_b_ip_pdu_delay" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_c_mbsfn_area_id , {
"MBSFN area identity" , "gsm_a.dtap.epc.ue_tl_c_mbsfn_area_id" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_c_mch_id , {
"MCH identity" , "gsm_a.dtap.epc.ue_tl_c_mch_id" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_tl_c_lcid , {
"Logical channel identity" , "gsm_a.dtap.epc.ue_tl_c_lcid" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_ue_positioning_technology , {
"UE positioning technology" , "gsm_a.dtap.epc.ue_positioning_technology" , FT_UINT8 , BASE_DEC , VALS ( epc_ue_positioning_technology_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_mbms_packet_counter_value , {
"MBMS packet counter value" , "gsm_a.dtap.epc.mbms_packet_counter_value" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_latitude_sign , {
"Latitude Sign" , "gsm_a.dtap.epc.latitude_sign" , FT_BOOLEAN , BASE_NONE , TFS ( & epc_latitude_sign_value ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_degrees_latitude , {
"Degrees Latitude" , "gsm_a.dtap.epc.degrees_latitude" , FT_UINT24 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_degrees_longitude , {
"Degrees Longitude" , "gsm_a.dtap.epc.degrees_longitude" , FT_INT24 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_altitude_dir , {
"Altitude Direction" , "gsm_a.dtap.epc.altitude_direction" , FT_BOOLEAN , BASE_NONE , TFS ( & epc_altitude_dir_value ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_altitude , {
"Altitude" , "gsm_a.dtap.epc.altitude" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_bearing , {
"Bearing" , "gsm_a.dtap.epc.bearing" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_horizontal_speed , {
"Horizontal Speed" , "gsm_a.dtap.epc.horizontal_speed" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_epc_gnss_tod_msec , {
"GNSS-TOD-msec" , "gsm_a.dtap.epc.gnss_tod_msec" , FT_UINT24 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_call_ref , {
"Call Reference" , "gsm_a.dtap.gcc.call_ref" , FT_UINT32 , BASE_DEC , NULL , 0xffffffe0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_call_ref_has_priority , {
"Call Reference includes priority" , "gsm_a.dtap.gcc.call_ref_has_priority" , FT_BOOLEAN , 32 , NULL , 0x00000010 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_call_priority , {
"Call Priority" , "gsm_a.dtap.gcc.call_priority" , FT_UINT32 , BASE_DEC , VALS ( gcc_call_ref_priority ) , 0x0000000e , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_call_state , {
"Call state" , "gsm_a.dtap.gcc.call_state" , FT_UINT24 , BASE_DEC , VALS ( gcc_call_state_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_cause_structure , {
"Cause structure" , "gsm_a.dtap.gcc.cause_structure" , FT_BOOLEAN , 8 , TFS ( & gcc_cause_structure_val ) , 0x80 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_cause , {
"Cause" , "gsm_a.dtap.gcc.cause" , FT_UINT8 , BASE_DEC | BASE_RANGE_STRING , RVALS ( gcc_cause_vals ) , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_orig_ind , {
"Originator indication" , "gsm_a.dtap.gcc.orig_ind" , FT_BOOLEAN , 8 , TFS ( & gcc_orig_ind_vals ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_state_attr , {
"State attributes" , "gsm_a.dtap.gcc.state_attr" , FT_UINT8 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_state_attr_da , {
"DA" , "gsm_a.dtap.gcc.state_attr_da" , FT_BOOLEAN , 8 , TFS ( & gcc_state_attr_da ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_state_attr_ua , {
"UA" , "gsm_a.dtap.gcc.state_attr_ua" , FT_BOOLEAN , 8 , TFS ( & gcc_state_attr_ua ) , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_state_attr_comm , {
"COMM" , "gsm_a.dtap.gcc.state_attr_comm" , FT_BOOLEAN , 8 , TFS ( & gcc_state_attr_comm ) , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_state_attr_oi , {
"OI" , "gsm_a.dtap.gcc.state_attr_oi" , FT_BOOLEAN , 8 , TFS ( & gcc_state_attr_oi ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_spare_1 , {
"Spare_1 (This field shall be ignored)" , "gsm_a.dtap.gcc.spare_1" , FT_UINT32 , BASE_DEC , NULL , 0x00000001 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_spare_3 , {
"Spare_3 (This field shall be ignored)" , "gsm_a.dtap.gcc.spare_3" , FT_UINT8 , BASE_DEC , NULL , 0x0e , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_gcc_spare_4 , {
"Spare_4 (This field shall be ignored)" , "gsm_a.dtap.gcc.spare_4" , FT_UINT32 , BASE_DEC , NULL , 0x00000010 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_call_ref , {
"Call Reference" , "gsm_a.dtap.bcc.call_ref" , FT_UINT32 , BASE_DEC , NULL , 0xffffffe0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_call_ref_has_priority , {
"Call Reference includes priority" , "gsm_a.dtap.bcc.call_ref_has_priority" , FT_BOOLEAN , 32 , NULL , 0x00000010 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_call_priority , {
"Call Priority" , "gsm_a.dtap.bcc.call_priority" , FT_UINT32 , BASE_DEC , VALS ( bcc_call_ref_priority ) , 0x0000000e , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_call_state , {
"Call state" , "gsm_a.dtap.bcc.call_state" , FT_UINT24 , BASE_DEC | BASE_RANGE_STRING , RVALS ( bcc_call_state_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_cause_structure , {
"Cause structure" , "gsm_a.dtap.bcc.cause_structure" , FT_BOOLEAN , 8 , TFS ( & bcc_cause_structure_val ) , 0x80 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_cause , {
"Cause" , "gsm_a.dtap.bcc.cause" , FT_UINT8 , BASE_DEC | BASE_RANGE_STRING , RVALS ( bcc_cause_vals ) , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_orig_ind , {
"Originator indication" , "gsm_a.dtap.bcc.orig_ind" , FT_BOOLEAN , 8 , TFS ( & bcc_orig_ind_vals ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_state_attr , {
"State attributes" , "gsm_a.dtap.bcc.state_attr" , FT_UINT8 , BASE_HEX , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_state_attr_da , {
"DA" , "gsm_a.dtap.bcc.state_attr_da" , FT_BOOLEAN , 8 , TFS ( & bcc_state_attr_da ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_state_attr_ua , {
"UA" , "gsm_a.dtap.bcc.state_attr_ua" , FT_BOOLEAN , 8 , TFS ( & bcc_state_attr_ua ) , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_state_attr_comm , {
"COMM" , "gsm_a.dtap.bcc.state_attr_comm" , FT_BOOLEAN , 8 , TFS ( & bcc_state_attr_comm ) , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_state_attr_oi , {
"OI" , "gsm_a.dtap.bcc.state_attr_oi" , FT_BOOLEAN , 8 , TFS ( & bcc_state_attr_oi ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_compr_otdi , {
"Compressed otdi" , "gsm_a.dtap.bcc.compr_otdi" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_spare_1 , {
"Spare_1 (This field shall be ignored)" , "gsm_a.dtap.bcc.spare_1" , FT_UINT32 , BASE_DEC , NULL , 0x00000001 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_spare_3 , {
"Spare_3 (This field shall be ignored)" , "gsm_a.dtap.bcc.spare_3" , FT_UINT8 , BASE_DEC , NULL , 0x0e , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bcc_spare_4 , {
"Spare_4 (This field shall be ignored)" , "gsm_a.dtap.bcc.spare_4" , FT_UINT32 , BASE_DEC , NULL , 0x00000010 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_coding_scheme , {
"Coding Scheme" , "gsm_a.dtap.coding_scheme" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_coding_scheme_vals ) , 0x70 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_add_ci , {
"Add CI" , "gsm_a.dtap.add_ci" , FT_BOOLEAN , 8 , TFS ( & tfs_add_ci ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_number_of_spare_bits , {
"Number of spare bits in last octet" , "gsm_a.dtap.number_of_spare_bits" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_number_of_spare_bits_vals ) , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_text_string , {
"Text String" , "gsm_a.dtap.text_string" , FT_STRING , STR_UNICODE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_time_zone_time , {
"Time" , "gsm_a.dtap.time_zone_time" , FT_ABSOLUTE_TIME , ABSOLUTE_TIME_UTC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_dst_adjustment , {
"DST Adjustment" , "gsm_a.dtap.dst_adjustment" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_dst_adjustment_vals ) , 0x03 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_emergency_number_information , {
"Emergency Number Information" , "gsm_a.dtap.emergency_number_information" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mm_timer , {
"MM Timer" , "gsm_a.dtap.mm_timer" , FT_UINT8 , BASE_DEC , NULL , 0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_hold_auxiliary_state , {
"Hold auxiliary state" , "gsm_a.dtap.hold_auxiliary_state" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_hold_auxilary_state_vals ) , 0x0C , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_multi_party_auxiliary_state , {
"Multi party auxiliary state" , "gsm_a.dtap.multi_party_auxiliary_state" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_multi_party_auxilary_state_vals ) , 0x03 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_radio_channel_requirement , {
"Radio channel requirement" , "gsm_a.dtap.radio_channel_requirement" , FT_UINT8 , BASE_DEC , NULL , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_bearer_cap_coding_standard , {
"Coding standard" , "gsm_a.dtap.cap_coding_standard" , FT_BOOLEAN , 8 , TFS ( & tfs_bearer_cap_coding_standard ) , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_transfer_mode , {
"Transfer mode" , "gsm_a.dtap.transfer_mode" , FT_BOOLEAN , 8 , TFS ( & tfs_bearer_cap_transfer_mode ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_coding , {
"Coding" , "gsm_a.dtap.coding" , FT_BOOLEAN , 8 , TFS ( & tfs_bearer_cap_coding ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_compression , {
"Compression" , "gsm_a.dtap.compression" , FT_BOOLEAN , 8 , TFS ( & tfs_possible_not_possible ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_compression_up , {
"Compression" , "gsm_a.dtap.compression" , FT_BOOLEAN , 8 , TFS ( & tfs_allowed_not_allowed ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_structure , {
"Structure" , "gsm_a.dtap.structure" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_structure_vals ) , 0x30 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_duplex_mode , {
"Duplex mode" , "gsm_a.dtap.duplex_mode" , FT_BOOLEAN , 8 , TFS ( & tfs_full_half ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_subaddress , {
"Subaddress" , "gsm_a.dtap.subaddress" , FT_STRING , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_subaddress_information , {
"Subaddress information" , "gsm_a.dtap.subaddress_information" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_message_elements , {
"Message Elements" , "gsm_a.dtap.message_elements" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_rpdu , {
"RPDU" , "gsm_a.dtap.rpdu" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_configuration , {
"Configuration" , "gsm_a.dtap.configuration" , FT_BOOLEAN , 8 , TFS ( & tfs_bearer_cap_configuration ) , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_nirr , {
"NIRR" , "gsm_a.dtap.nirr" , FT_BOOLEAN , 8 , TFS ( & tfs_nirr ) , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_establishment , {
"Establishment" , "gsm_a.dtap.establishment" , FT_BOOLEAN , 8 , TFS ( & tfs_bearer_cap_establishment ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_access_identity , {
"Access Identity" , "gsm_a.dtap.access_identity" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_access_identity_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_rate_adaption , {
"Rate Adaption" , "gsm_a.dtap.rate_adaption" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_rate_adaption_vals ) , 0x18 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_signalling_access_protocol , {
"Signalling Access Protocol" , "gsm_a.dtap.signalling_access_protocol" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_signal_access_protocol_vals ) , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_other_itc , {
"Other ITC" , "gsm_a.dtap.other_itc" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_other_itc_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_other_rate_adaption , {
"Other Rate Adaption" , "gsm_a.dtap.other_rate_adaption" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_other_rate_adaption_vals ) , 0x18 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_rate_adaption_header , {
"Rate Adaption Header" , "gsm_a.dtap.rate_adaption_header" , FT_BOOLEAN , 8 , TFS ( & tfs_included_not_included ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_multiple_frame_establishment_support , {
"Multiple frame establishment support in data link" , "gsm_a.dtap.multiple_frame_establishment_support" , FT_BOOLEAN , 8 , TFS ( & tfs_frame_est_supported_not_supported ) , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mode_of_operation , {
"Mode of operation" , "gsm_a.dtap.mode_of_operation" , FT_BOOLEAN , 8 , TFS ( & tfs_protocol_sensative_bit_transparent ) , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_logical_link_identifier_negotiation , {
"Logical link identifier negotiation" , "gsm_a.dtap.logical_link_identifier_negotiation" , FT_BOOLEAN , 8 , TFS ( & tfs_log_link_neg ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_assignor_assignee , {
"Assignor/Assignee" , "gsm_a.dtap.assignor_assignee" , FT_BOOLEAN , 8 , TFS ( & tfs_assignor_assignee ) , 0x04 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_in_out_band , {
"In band/Out of band negotiation" , "gsm_a.dtap.in_out_band" , FT_BOOLEAN , 8 , TFS ( & tfs_in_out_band ) , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_layer_1_identity , {
"Layer 1 Identity" , "gsm_a.dtap.layer_1_identity" , FT_UINT8 , BASE_DEC , NULL , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_user_information_layer_1_protocol , {
"User information layer 1 protocol" , "gsm_a.dtap.user_information_layer_1_protocol" , FT_UINT8 , BASE_DEC , NULL , 0x1e , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_synchronous , {
"Synchronous/asynchronous" , "gsm_a.dtap.synchronous" , FT_BOOLEAN , 8 , TFS ( & tfs_asynchronous_synchronous ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_number_of_stop_bits , {
"Number of Stop Bits" , "gsm_a.dtap.number_of_stop_bits" , FT_BOOLEAN , 8 , TFS ( & tfs_stop_bits ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_negotiation , {
"Negotiation" , "gsm_a.dtap.negotiation" , FT_BOOLEAN , 8 , TFS ( & tfs_negotiation ) , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_number_of_data_bits , {
"Number of data bits excluding parity bit if present" , "gsm_a.dtap.number_of_data_bits" , FT_BOOLEAN , 8 , TFS ( & tfs_parity_bits ) , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_user_rate , {
"User rate" , "gsm_a.dtap.user_rate" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_user_rate_vals ) , 0x0F , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_v110_x30_rate_adaptation , {
"V.110/X.30 rate adaptation Intermediate rate" , "gsm_a.dtap.v110_x30_rate_adaptation" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_v110_x30_rate_adaptation_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_nic_on_tx , {
"Network independent clock (NIC) on transmission (Tx)" , "gsm_a.dtap.nic_on_tx" , FT_BOOLEAN , 8 , TFS ( & tfs_nic_on_tx ) , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_nic_on_rx , {
"Network independent clock (NIC) on reception (Rx)" , "gsm_a.dtap.nic_on_rx" , FT_BOOLEAN , 8 , TFS ( & tfs_nic_on_rx ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_parity_information , {
"Parity information" , "gsm_a.dtap.parity_information" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_parity_info_vals ) , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_connection_element , {
"Connection element" , "gsm_a.dtap.connection_element" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_connection_element_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_modem_type , {
"Modem type" , "gsm_a.dtap.modem_type" , FT_UINT8 , BASE_DEC , NULL , 0x1f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_other_modem_type , {
"Other modem type" , "gsm_a.dtap.other_modem_type" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_other_modem_type_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_fixed_network_user_rate , {
"Fixed network user rate" , "gsm_a.dtap.fixed_network_user_rate" , FT_UINT8 , BASE_DEC , NULL , 0x1f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_TCH_F14_4 , {
"Acceptable channel codings (TCH/F14.4)" , "gsm_a.dtap.acceptable_channel_codings.TCH_F14_4" , FT_BOOLEAN , 8 , TFS ( & tfs_acceptable_not_acceptable ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_spare20 , {
"Acceptable channel codings (Spare)" , "gsm_a.dtap.acceptable_channel_codings.spare" , FT_BOOLEAN , 8 , NULL , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_TCH_F9_6 , {
"Acceptable channel codings (TCH/F9.6)" , "gsm_a.dtap.acceptable_channel_codings.TCH_F9_6" , FT_BOOLEAN , 8 , TFS ( & tfs_acceptable_not_acceptable ) , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_TCH_F4_8 , {
"Acceptable channel codings (TCH/F4.8)" , "gsm_a.dtap.acceptable_channel_codings.TCH_F4_8" , FT_BOOLEAN , 8 , TFS ( & tfs_acceptable_not_acceptable ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_maximum_number_of_traffic_channels , {
"Maximum number of traffic channels" , "gsm_a.dtap.maximum_number_of_traffic_channels" , FT_UINT8 , BASE_DEC , NULL , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_spare78 , {
"Acceptable channel codings" , "gsm_a.dtap.acceptable_channel_codings" , FT_UINT8 , BASE_DEC , NULL , 0x78 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_uimi , {
"UIMI, User initiated modification indication" , "gsm_a.dtap.uimi" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_uimi_vals ) , 0x70 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_wanted_air_interface_user_rate , {
"Wanted air interface user rate" , "gsm_a.dtap.wanted_air_interface_user_rate" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_wanted_air_rate_vals ) , 0x0F , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F28_8 , {
"Acceptable channel codings extended (TCH/F28.8)" , "gsm_a.dtap.acceptable_channel_codings_ext.TCH_F28_8" , FT_BOOLEAN , 8 , TFS ( & tfs_acceptable_not_acceptable ) , 0x40 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F32_0 , {
"Acceptable channel codings extended (TCH/F32.0)" , "gsm_a.dtap.acceptable_channel_codings_ext.TCH_F32_0" , FT_BOOLEAN , 8 , TFS ( & tfs_acceptable_not_acceptable ) , 0x20 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_acceptable_channel_codings_ext_TCH_F43_2 , {
"Acceptable channel codings extended (TCH/F43.2)" , "gsm_a.dtap.acceptable_channel_codings_ext.TCH_F43_2" , FT_BOOLEAN , 8 , TFS ( & tfs_acceptable_not_acceptable ) , 0x10 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_channel_coding_asymmetry_indication , {
"Channel Coding Asymmetry Indication" , "gsm_a.dtap.channel_coding_asymmetry_indication" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_channel_coding_asymmetry_ind_vals ) , 0x0c , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_edge_channel_codings , {
"EDGE Channel Codings" , "gsm_a.dtap.edge_channel_codings" , FT_UINT8 , BASE_DEC , NULL , 0x7c , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_layer_2_identity , {
"Layer 2 Identity" , "gsm_a.dtap.layer_2_identity" , FT_UINT8 , BASE_DEC , NULL , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_user_information_layer_2_protocol , {
"User information layer 2 protocol" , "gsm_a.dtap.user_information_layer_2_protocol" , FT_UINT8 , BASE_DEC , NULL , 0x1f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_maximum_number_of_supported_bearers , {
"Maximum number of supported bearers" , "gsm_a.dtap.maximum_number_of_supported_bearers" , FT_UINT8 , BASE_DEC , NULL , 0xf0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_pcp , {
"Prolonged Clearing Procedure" , "gsm_a.dtap.pcp" , FT_BOOLEAN , 8 , TFS ( & tfs_supported_not_supported ) , 0x02 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_dtmf , {
"DTMF" , "gsm_a.dtap.dtmf" , FT_BOOLEAN , 8 , TFS ( & gsm_a_dtap_dtmf_value ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_max_num_of_speech_bearers , {
"Maximum number of speech bearers" , "gsm_a.dtap.max_num_of_speech_bearers" , FT_UINT8 , BASE_DEC , NULL , 0x0f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_de_cause_coding_standard , {
"Coding standard" , "gsm_a.dtap.coding_standard" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_de_cause_coding_standard_vals ) , 0x60 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_recommendation , {
"Recommendation" , "gsm_a.dtap.recommendation" , FT_UINT8 , BASE_DEC , NULL , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_data , {
"Data" , "gsm_a.dtap.data" , FT_BYTES , BASE_NONE , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_keypad_information , {
"Keypad information" , "gsm_a.dtap.keypad_information" , FT_UINT8 , BASE_DEC , NULL , 0x7f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_repeat_indicator , {
"Repeat Indicator" , "gsm_a.dtap.repeat_indicator" , FT_UINT8 , BASE_DEC , NULL , 0x0f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ss_version_indicator , {
"SS Version Indicator" , "gsm_a.dtap.ss_version_indicator" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_cp_cause , {
"Cause" , "gsm_a.dtap.cp_cause" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_test_loop , {
"Test Loop" , "gsm_a.dtap.test_loop" , FT_UINT8 , BASE_DEC , NULL , 0x3f , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_subchannel , {
"Subchannel" , "gsm_a.dtap.subchannel" , FT_BOOLEAN , 8 , TFS ( & tfs_gsm_a_dtap_subchannel ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ack_element , {
"Acknowledgment element" , "gsm_a.dtap.ack_element" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_channel_coding03 , {
"Channel coding" , "gsm_a.dtap.channel_coding" , FT_UINT8 , BASE_DEC , VALS ( gsm_channel_coding_vals ) , 0x03 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_channel_coding30 , {
"Channel coding" , "gsm_a.dtap.channel_coding" , FT_UINT8 , BASE_DEC , VALS ( gsm_channel_coding_vals ) , 0x30 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_loop_mechanism0E , {
"Loop mechanism" , "gsm_a.dtap.loop_mechanism" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_loop_mech_vals ) , 0x0e , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_loop_mechanism1C , {
"Loop mechanism" , "gsm_a.dtap.loop_mechanism" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_loop_mech_vals ) , 0x1c , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_multislot_tch , {
"Multi-slot TCH loop" , "gsm_a.dtap.multislot_tch" , FT_BOOLEAN , 8 , TFS ( & tfs_multislot_tch ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_tp_tested_device , {
"Tested device" , "gsm_a.dtap.tp_tested_device" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_tp_pdu_description , {
"PDUs transmitted" , "gsm_a.dtap.tp_pdu_description" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mode_flag , {
"Mode flag" , "gsm_a.dtap.mode_flag" , FT_BOOLEAN , 8 , TFS ( & tfs_gsm_a_dtap_mode_flag ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_egprs_mode_flag , {
"EGPRS Mode flag" , "gsm_a.dtap.egprs_mode_flag" , FT_BOOLEAN , 8 , TFS ( & tfs_gsm_a_dtap_egprs_mode_flag ) , 0x01 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_downlink_timeslot_offset , {
"Downlink Timeslot Offset" , "gsm_a.dtap.downlink_timeslot_offset" , FT_UINT8 , BASE_DEC , NULL , 0x0E , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ms_positioning_technology , {
"MS positioning technology" , "gsm_a.dtap.ms_positioning_technology" , FT_UINT8 , BASE_DEC , VALS ( gsm_positioning_technology_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ue_test_loop_mode , {
"UE test loop mode" , "gsm_a.dtap.ue_test_loop_mode" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_ue_test_loop_mode_vals ) , 0x03 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ue_positioning_technology , {
"UE positioning technology" , "gsm_a.dtap.ue_positioning_technology" , FT_UINT8 , BASE_DEC , VALS ( gsm_positioning_technology_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ciphering_key_sequence_number , {
"Ciphering Key Sequence Number" , "gsm_a.dtap.ciphering_key_sequence_number" , FT_UINT8 , BASE_DEC , NULL , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ciphering_key_sequence_number70 , {
"Ciphering Key Sequence Number" , "gsm_a.dtap.ciphering_key_sequence_number" , FT_UINT8 , BASE_DEC , NULL , 0x70 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_service_type , {
"Service Type" , "gsm_a.dtap.service_type" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_service_type_vals ) , 0x0F , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_type_of_identity , {
"Type of identity" , "gsm_a.dtap.type_of_identity" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_type_of_identity_vals ) , 0x07 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_follow_on_request , {
"Follow-On Request (FOR)" , "gsm_a.dtap.follow_on_request" , FT_BOOLEAN , 8 , TFS ( & tfs_follow_on_request_value ) , 0x08 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_updating_type , {
"Updating Type" , "gsm_a.dtap.updating_type" , FT_UINT8 , BASE_DEC , VALS ( gsm_a_dtap_updating_type_vals ) , 0x03 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_congestion_level , {
"Congestion level" , "gsm_a.dtap.congestion_level" , FT_UINT8 , BASE_DEC , NULL , 0x0F , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_protocol_discriminator , {
"Protocol Discriminator" , "gsm_a.dtap.protocol_discriminator" , FT_UINT8 , BASE_DEC , VALS ( protocol_discriminator_vals ) , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ti_flag , {
"TI flag" , "gsm_a.dtap.ti_flag" , FT_BOOLEAN , 8 , TFS ( & tfs_allocated_by_receiver_sender ) , 0x80 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_tio , {
"TIO" , "gsm_a.dtap.tio" , FT_UINT8 , BASE_DEC , NULL , 0x70 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_tie , {
"TIE" , "gsm_a.dtap.tie" , FT_UINT8 , BASE_DEC , NULL , DTAP_TIE_MASK , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_timeslot_number , {
"Timeslot number" , "gsm_a_dtap.timeslot_number" , FT_UINT8 , BASE_DEC , NULL , 0xe0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_uplink_rlc_sdu_size , {
"Uplink RLC SDU size" , "gsm_a_dtap.uplink_rlc_sdu_size" , FT_UINT16 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_radio_bearer , {
"Radio Bearer" , "gsm_a_dtap.radio_bearer" , FT_UINT8 , BASE_DEC , NULL , 0x1F , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_mbms_short_transmission_identity , {
"MBMS short transmission identity" , "gsm_a_dtap.mbms_short_transmission_identity" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_ue_received_rlc_sdu_counter_value , {
"UE received RLC SDU counter value" , "gsm_a_dtap.ue_received_rlc_sdu_counter_value" , FT_UINT8 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, {
& hf_gsm_a_dtap_num_lb_entities , {
"Number of LB entities" , "gsm_a_dtap.num_lb_entities" , FT_UINT32 , BASE_DEC , NULL , 0x0 , NULL , HFILL }
}
, }
;
# define NUM_INDIVIDUAL_ELEMS 22 gint * ett [ NUM_INDIVIDUAL_ELEMS + NUM_GSM_DTAP_MSG_MM + NUM_GSM_DTAP_MSG_CC + NUM_GSM_DTAP_MSG_SMS + NUM_GSM_DTAP_MSG_SS + NUM_GSM_DTAP_MSG_TP + NUM_GSM_DTAP_ELEM ] ;
static ei_register_info ei [ ] = {
{
& ei_gsm_a_dtap_autn , {
"gsm_a.dtap.autn.invalid" , PI_MALFORMED , PI_WARN , "AUTN length not equal to 16" , EXPFILL }
}
, {
& ei_gsm_a_dtap_auts , {
"gsm_a.dtap.auts.invalid" , PI_MALFORMED , PI_WARN , "AUTS length not equal to 14" , EXPFILL }
}
, {
& ei_gsm_a_dtap_text_string_not_multiple_of_7 , {
"gsm_a.dtap.text_string_not_multiple_of_7" , PI_MALFORMED , PI_WARN , "Value leads to a Text String whose length is not a multiple of 7 bits" , EXPFILL }
}
, {
& ei_gsm_a_dtap_not_digit , {
"gsm_a.dtap.not_digit" , PI_MALFORMED , PI_WARN , "BCD number contains a value that is not a digit" , EXPFILL }
}
, {
& ei_gsm_a_dtap_end_mark_unexpected , {
"gsm_a.dtap.end_mark_unexpected" , PI_MALFORMED , PI_WARN , "\'f\' end mark present in unexpected position" , EXPFILL }
}
, {
& ei_gsm_a_dtap_invalid_ia5_character , {
"gsm_a.dtap.invalid_ia5_character" , PI_MALFORMED , PI_WARN , "Invalid IA5 character(s) in string (value > 127)" , EXPFILL }
}
, {
& ei_gsm_a_dtap_keypad_info_not_dtmf_digit , {
"gsm_a.dtap.keypad_info_not_dtmf_digit" , PI_MALFORMED , PI_WARN , "Keypad information contains character that is not a DTMF digit" , EXPFILL }
}
, {
& ei_gsm_a_dtap_extraneous_data , {
"gsm_a.dtap.extraneous_data" , PI_PROTOCOL , PI_NOTE , "Extraneous Data, dissector bug or later version spec(report to wireshark.org)" , EXPFILL }
}
, {
& ei_gsm_a_dtap_missing_mandatory_element , {
"gsm_a.dtap.missing_mandatory_element" , PI_PROTOCOL , PI_WARN , "Missing Mandatory element, rest of dissection is suspect" , EXPFILL }
}
, {
& ei_gsm_a_dtap_coding_scheme , {
"gsm_a.dtap.coding_scheme.unknown" , PI_PROTOCOL , PI_WARN , "Text string encoded according to an unknown Coding Scheme" , EXPFILL }
}
, }
;
expert_module_t * expert_a_dtap ;
ett [ 0 ] = & ett_dtap_msg ;
ett [ 1 ] = & ett_dtap_oct_1 ;
ett [ 2 ] = & ett_cm_srvc_type ;
ett [ 3 ] = & ett_gsm_enc_info ;
ett [ 4 ] = & ett_bc_oct_3 ;
ett [ 5 ] = & ett_bc_oct_3a ;
ett [ 6 ] = & ett_bc_oct_4 ;
ett [ 7 ] = & ett_bc_oct_5 ;
ett [ 8 ] = & ett_bc_oct_5a ;
ett [ 9 ] = & ett_bc_oct_5b ;
ett [ 10 ] = & ett_bc_oct_6 ;
ett [ 11 ] = & ett_bc_oct_6a ;
ett [ 12 ] = & ett_bc_oct_6b ;
ett [ 13 ] = & ett_bc_oct_6c ;
ett [ 14 ] = & ett_bc_oct_6d ;
ett [ 15 ] = & ett_bc_oct_6e ;
ett [ 16 ] = & ett_bc_oct_6f ;
ett [ 17 ] = & ett_bc_oct_6g ;
ett [ 18 ] = & ett_bc_oct_7 ;
ett [ 19 ] = & ett_epc_ue_tl_a_lb_setup ;
ett [ 20 ] = & ett_mm_timer ;
ett [ 21 ] = & ett_ue_test_loop_mode ;
last_offset = NUM_INDIVIDUAL_ELEMS ;
for ( i = 0 ;
i < NUM_GSM_DTAP_MSG_MM ;
i ++ , last_offset ++ ) {
ett_gsm_dtap_msg_mm [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_dtap_msg_mm [ i ] ;
}
for ( i = 0 ;
i < NUM_GSM_DTAP_MSG_CC ;
i ++ , last_offset ++ ) {
ett_gsm_dtap_msg_cc [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_dtap_msg_cc [ i ] ;
}
for ( i = 0 ;
i < NUM_GSM_DTAP_MSG_SMS ;
i ++ , last_offset ++ ) {
ett_gsm_dtap_msg_sms [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_dtap_msg_sms [ i ] ;
}
for ( i = 0 ;
i < NUM_GSM_DTAP_MSG_SS ;
i ++ , last_offset ++ ) {
ett_gsm_dtap_msg_ss [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_dtap_msg_ss [ i ] ;
}
for ( i = 0 ;
i < NUM_GSM_DTAP_MSG_TP ;
i ++ , last_offset ++ ) {
ett_gsm_dtap_msg_tp [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_dtap_msg_tp [ i ] ;
}
for ( i = 0 ;
i < NUM_GSM_DTAP_ELEM ;
i ++ , last_offset ++ ) {
ett_gsm_dtap_elem [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_dtap_elem [ i ] ;
}
proto_a_dtap = proto_register_protocol ( "GSM A-I/F DTAP" , "GSM DTAP" , "gsm_a.dtap" ) ;
proto_register_field_array ( proto_a_dtap , hf , array_length ( hf ) ) ;
proto_register_subtree_array ( ett , array_length ( ett ) ) ;
expert_a_dtap = expert_register_protocol ( proto_a_dtap ) ;
expert_register_field_array ( expert_a_dtap , ei , array_length ( ei ) ) ;
register_dissector ( "gsm_a_dtap" , dissect_dtap , proto_a_dtap ) ;
u2u_dissector_table = register_dissector_table ( "gsm_a.dtap.u2u_prot_discr" , "GSM User to User Signalling" , proto_a_dtap , FT_UINT8 , BASE_DEC ) ;
} |
-7,136,186,224,744,988,000 | debian | 45 | 0 | static CURLcode output_auth_headers ( struct connectdata * conn , struct auth * authstatus , const char * request , const char * path , bool proxy ) {
const char * auth = NULL ;
CURLcode result = CURLE_OK ;
# if ! defined ( CURL_DISABLE_VERBOSE_STRINGS ) || defined ( USE_SPNEGO ) struct Curl_easy * data = conn -> data ;
# endif # ifdef USE_SPNEGO struct negotiatedata * negdata = proxy ? & data -> state . proxyneg : & data -> state . negotiate ;
# endif # ifdef CURL_DISABLE_CRYPTO_AUTH ( void ) request ;
( void ) path ;
# endif # ifdef USE_SPNEGO negdata -> state = GSS_AUTHNONE ;
if ( ( authstatus -> picked == CURLAUTH_NEGOTIATE ) && negdata -> context && ! GSS_ERROR ( negdata -> status ) ) {
auth = "Negotiate" ;
result = Curl_output_negotiate ( conn , proxy ) ;
if ( result ) return result ;
authstatus -> done = TRUE ;
negdata -> state = GSS_AUTHSENT ;
}
else # endif # ifdef USE_NTLM if ( authstatus -> picked == CURLAUTH_NTLM ) {
auth = "NTLM" ;
result = Curl_output_ntlm ( conn , proxy ) ;
if ( result ) return result ;
}
else # endif # if defined ( USE_NTLM ) && defined ( NTLM_WB_ENABLED ) if ( authstatus -> picked == CURLAUTH_NTLM_WB ) {
auth = "NTLM_WB" ;
result = Curl_output_ntlm_wb ( conn , proxy ) ;
if ( result ) return result ;
}
else # endif # ifndef CURL_DISABLE_CRYPTO_AUTH if ( authstatus -> picked == CURLAUTH_DIGEST ) {
auth = "Digest" ;
result = Curl_output_digest ( conn , proxy , ( const unsigned char * ) request , ( const unsigned char * ) path ) ;
if ( result ) return result ;
}
else # endif if ( authstatus -> picked == CURLAUTH_BASIC ) {
if ( ( proxy && conn -> bits . proxy_user_passwd && ! Curl_checkProxyheaders ( conn , "Proxy-authorization:" ) ) || ( ! proxy && conn -> bits . user_passwd && ! Curl_checkheaders ( conn , "Authorization:" ) ) ) {
auth = "Basic" ;
result = http_output_basic ( conn , proxy ) ;
if ( result ) return result ;
}
authstatus -> done = TRUE ;
}
if ( auth ) {
infof ( data , "%s auth using %s with user '%s'\n" , proxy ? "Proxy" : "Server" , auth , proxy ? ( conn -> proxyuser ? conn -> proxyuser : "" ) : ( conn -> user ? conn -> user : "" ) ) ;
authstatus -> multi = ( ! authstatus -> done ) ? TRUE : FALSE ;
}
else authstatus -> multi = FALSE ;
return CURLE_OK ;
} |
-6,435,087,038,712,483,000 | debian | 6 | 0 | void ff_mpeg1_clean_buffers ( MpegEncContext * s ) {
s -> last_dc [ 0 ] = 1 << ( 7 + s -> intra_dc_precision ) ;
s -> last_dc [ 1 ] = s -> last_dc [ 0 ] ;
s -> last_dc [ 2 ] = s -> last_dc [ 0 ] ;
memset ( s -> last_mv , 0 , sizeof ( s -> last_mv ) ) ;
} |