Unnamed: 0
int64
0
535k
source
stringlengths
50
89.8k
target
stringlengths
23
37.7k
8,300
CWE-000 void checkPiles ( struct gameState * testGame , struct gameState * originalGame ) { <S2SV_StartBug> for ( i = 0 ; i < 27 ; i ++ ) <S2SV_EndBug> { if ( testGame -> supplyCount [ i ] != originalGame -> supplyCount [ i ] ) printf ( "FAIL:<S2SV_blank>Card<S2SV_blank>pile<S2SV_blank>%d<S2SV_blank>changed\\n" , i ) ;...
<S2SV_ModStart> { for ( int
8,301
CWE-000 static int ccache_main_options ( int argc , char * argv [ ] ) { enum longopts { DUMP_MANIFEST } ; static const struct option options [ ] = { { "cleanup" , no_argument , 0 , 'c' } , { "clear" , no_argument , 0 , 'C' } , { "dump-manifest" , required_argument , 0 , DUMP_MANIFEST } , { "help" , no_argument , 0 , 'h...
<S2SV_ModStart> ( ) ; clean_up_all <S2SV_ModEnd> ( conf )
8,302
CWE-000 void swake_up ( struct swait_queue_head * q ) { <S2SV_StartBug> unsigned long flags ; <S2SV_EndBug> raw_spin_lock_irqsave ( & q -> lock , flags ) ; swake_up_locked ( q ) ; raw_spin_unlock_irqrestore ( & q -> lock , flags ) ; }
<S2SV_ModStart> unsigned long flags ; if ( ! swait_active ( q ) ) return
8,303
CWE-000 static gboolean _truncate_file ( QDisk * self , gint64 new_size ) { gboolean success = TRUE ; if ( ftruncate ( self -> fd , ( glong ) new_size ) < 0 ) { success = FALSE ; <S2SV_StartBug> msg_error ( "Error<S2SV_blank>truncating<S2SV_blank>disk-queue<S2SV_blank>file" , <S2SV_EndBug> evt_tag_error ( "error" ) , e...
<S2SV_ModStart> = FALSE ; off_t file_size = - 1 ; struct stat st ; if ( fstat ( self -> fd , & st ) < 0 ) { msg_error ( "truncate<S2SV_blank>file:<S2SV_blank>cannot<S2SV_blank>stat" , evt_tag_error ( "error" ) ) ; } else file_size = st . st_size ; <S2SV_ModStart> , evt_tag_long ( "expected-size" , new_size ) , evt_tag_...
8,304
CWE-000 static struct mrsh_function_definition * function_definition ( struct mrsh_parser * state ) { size_t name_len = peek_name ( state , false ) ; if ( name_len == 0 ) { return NULL ; } size_t i = name_len ; while ( true ) { parser_peek ( state , NULL , i + 1 ) ; char c = state -> buf . data [ i ] ; if ( c == '(' ) ...
<S2SV_ModStart> * name = read_token ( state , name_len <S2SV_ModEnd> ) ; struct
8,305
CWE-000 static void apply_jitter_buffer_params ( LinphoneCore * lc , RtpSession * session , LinphoneStreamType type ) { JBParameters params ; rtp_session_get_jitter_buffer_params ( session , & params ) ; params . min_size = lp_config_get_int ( lc -> config , "rtp" , "jitter_buffer_min_size" , 40 ) ; <S2SV_StartBug> par...
<S2SV_ModStart> , "jitter_buffer_max_size" , 250 <S2SV_ModEnd> ) ; params
8,306
CWE-000 static struct decl * parse_decl ( void ) { uint16_t lineno ; enum tok tok ; bool is_const ; struct type * type ; char * name ; struct expr * init ; lineno = get_lineno ( ) ; tok = next_tok ( ) ; switch ( tok ) { case CONST : is_const = true ; break ; case VAR : is_const = false ; break ; default : fatal_error (...
<S2SV_ModStart> } else { expect_tok ( EQ ) ;
8,307
CWE-000 static void acpi_nfit_init_ars ( struct acpi_nfit_desc * acpi_desc , struct nfit_spa * nfit_spa ) { int type = nfit_spa_type ( nfit_spa -> spa ) ; struct nd_cmd_ars_cap ars_cap ; <S2SV_StartBug> int rc ; <S2SV_EndBug> memset ( & ars_cap , 0 , sizeof ( ars_cap ) ) ; rc = ars_get_cap ( acpi_desc , & ars_cap , nfi...
<S2SV_ModStart> ; int rc ; set_bit ( ARS_FAILED , & nfit_spa -> ars_state ) <S2SV_ModStart> ars_state ) ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null>
8,308
CWE-000 static int fpr_set ( struct task_struct * target , const struct user_regset * regset , unsigned int pos , unsigned int count , const void * kbuf , const void __user * ubuf ) { int ret ; <S2SV_StartBug> struct user_fpsimd_state newstate = <S2SV_EndBug> target -> thread . fpsimd_state . user_fpsimd ; ret = user_r...
<S2SV_ModStart> struct user_fpsimd_state newstate <S2SV_ModEnd> ; ret =
8,309
CWE-000 void test_stored_load_hashes_of_approvers ( void ) { <S2SV_StartBug> trit_array_p hashes [ 5 ] ; <S2SV_EndBug> iota_stor_pack_t pack = { . models = ( void * * ) hashes , . capacity = 5 , . num_loaded = 0 , . insufficient_capacity = false } ; <S2SV_StartBug> for ( int i = 0 ; i < pack . capacity ; ++ i ) { <S2SV...
<S2SV_ModStart> void ) { flex_trit_t <S2SV_ModEnd> hashes [ 5 <S2SV_ModStart> hashes [ 5 ] [ FLEX_TRIT_SIZE_243 <S2SV_ModStart> false } ; <S2SV_ModEnd> flex_trit_t tx_test_trits [ <S2SV_ModStart> num_loaded ) ; <S2SV_ModEnd> transaction_free ( test_tx
8,310
CWE-000 int sel_string_output_supermicro_h8dg6_event_data1_class_oem ( ipmi_sel_ctx_t ctx , struct ipmi_sel_entry * sel_entry , uint8_t sel_record_type , char * tmpbuf , unsigned int tmpbuflen , unsigned int flags , unsigned int * wlen , struct ipmi_sel_system_event_record_data * system_event_record_data ) { int ret ; ...
<S2SV_ModStart> < 0 ) return ( - 1 ) ;
8,311
CWE-000 void print_square ( char * tetri ) { int * order ; char * * * tetrimino ; int i ; order = ( int * ) malloc ( sizeof ( int ) * tetcount ( tetri ) + 1 ) ; tetrimino = ( char * * * ) malloc ( sizeof ( char * * ) * tetcount ( tetri ) + 1 ) ; if ( tetrimino && order ) { order [ tetcount ( tetri ) ] = 0 ; tetrimino =...
<S2SV_ModStart> ) ; } <S2SV_ModEnd> } <S2SV_null> <S2SV_null>
8,312
CWE-000 static void cpu_down_work ( struct work_struct * work ) { int cpu ; int online = num_online_cpus ( ) ; int nr_down = 1 ; int hotplug_lock = atomic_read ( & g_hotplug_lock ) ; if ( hotplug_lock ) nr_down = online - hotplug_lock ; for_each_online_cpu ( cpu ) { if ( cpu == 0 ) continue ; printk ( KERN_ERR "CPU_DOW...
<S2SV_ModStart> break ; } set_cpu_max_freq_current ( ) ;
8,313
CWE-000 int RKMath_ARandomNumber ( RKMath_RandState * randstate , int randmin , int randmax ) { <S2SV_StartBug> int randval = 0 ; <S2SV_EndBug> if ( randmin < 0 ) randmin = 0 ; if ( randmax == - 1 ) randstate -> init = 0 ; randmax ++ ; if ( randmax <= 0 ) randmax = 1 ; if ( ! randstate -> init ) { randstate -> state_a ...
<S2SV_ModStart> randval = 0 ; int oldmax = randmax <S2SV_ModStart> , randmin , oldmax <S2SV_ModEnd> ) : randval
8,314
CWE-000 void pcireg_intr_enable_bit_clr ( struct pcibus_info * pcibus_info , uint64_t bits ) { union br_ptr * ptr = ( union br_ptr * ) pcibus_info -> pbi_buscommon . bs_base ; if ( pcibus_info ) { switch ( pcibus_info -> pbi_bridge_type ) { case PCIBR_BRIDGETYPE_TIOCP : __sn_clrq_relaxed ( & ptr -> tio . cp_int_enable ...
<S2SV_ModStart> . p_int_enable , <S2SV_ModEnd> bits ) ;
8,315
CWE-000 int socket_connect6 ( socket_t socket_fd , const char * ip , int port ) { # if ( defined ( WIN32 ) || defined ( _WIN64 ) ) DWORD last_error = 0 ; # endif int error = 0 ; struct sockaddr_in6 sa ; memset ( & sa , 0 , sizeof ( sa ) ) ; sa . sin6_family = AF_INET6 ; sa . sin6_port = htons ( ( unsigned short ) port ...
<S2SV_ModStart> } # endif # ifndef LOOP_IOCP <S2SV_ModStart> ) ; # else socket_fd ; # endif #
8,316
CWE-000 static int eth_vlan_assign_to_dif ( struct ipcp_instance_data * data , const struct name * dif_name , const string_t * type , <S2SV_StartBug> const struct dif_config * config ) <S2SV_EndBug> { struct eth_vlan_info * info ; struct ipcp_config * tmp ; string_t * complete_interface ; struct interface_data_mapping ...
<S2SV_ModStart> * type , <S2SV_ModEnd> struct dif_config *
8,317
CWE-000 void CMediaPlayer_Destroy ( void * self ) { CMediaPlayer * this = ( CMediaPlayer * ) self ; freeDataLocatorFormat ( & this -> mDataSource ) ; freeDataLocatorFormat ( & this -> mBankSource ) ; freeDataLocatorFormat ( & this -> mAudioSink ) ; freeDataLocatorFormat ( & this -> mImageVideoSink ) ; freeDataLocatorFo...
<S2SV_ModStart> mLEDArraySink ) ; # ifdef ANDROID android_Player_destroy ( this ) ; # endif
8,318
CWE-000 static int httpresponse_deinit ( Object * self ) { Object_DECREF ( HttpResponseObject_PROTOCOL ( self ) ) ; Object_DECREF ( HttpResponseObject_VERSION ( self ) ) ; Object_DECREF ( HttpResponseObject_STATUS_CODE ( self ) ) ; Object_DECREF ( HttpResponseObject_STATUS_TEXT ( self ) ) ; Object_DECREF ( HttpResponse...
<S2SV_ModStart> ) ) ; Object_DECREF ( HttpResponseObject_SOCK ( self ) ) ;
8,319
CWE-000 static int context_alloc ( struct fastrpc_apps * me , uint32_t kernel , struct fastrpc_ioctl_invoke_fd * invokefd , struct file_data * fdata , struct smq_invoke_ctx * * po ) { int err = 0 , bufs , size = 0 ; <S2SV_StartBug> struct smq_invoke_ctx * ctx = 0 ; <S2SV_EndBug> struct smq_context_list * clst = & me ->...
<S2SV_ModStart> * ctx = NULL <S2SV_ModEnd> ; struct smq_context_list <S2SV_ModStart> ( err , NULL <S2SV_ModEnd> != ( ctx <S2SV_ModStart> -> fds == NULL ? NULL <S2SV_ModEnd> : ( int <S2SV_ModStart> -> fds == NULL ? NULL <S2SV_ModEnd> : ( struct
8,320
CWE-000 int audiotrack_stream_init ( cubeb * ctx , cubeb_stream * * stream , char const * stream_name , cubeb_devid input_device , cubeb_stream_params * input_stream_params , cubeb_devid output_device , cubeb_stream_params * output_stream_params , unsigned int latency , cubeb_data_callback data_callback , cubeb_state_c...
<S2SV_ModStart> -> instance , AUDIO_STREAM_TYPE_MUSIC <S2SV_ModEnd> , stm ->
8,321
CWE-000 static int _di_typed_trampoline ( ffi_cif * cif , di_fn_t fn , void * ret , const di_type_t * fnats , int nargs0 , const void * const * args0 , int nargs , const di_type_t * ats , const void * const * args ) { assert ( nargs == 0 || args != NULL ) ; assert ( nargs0 == 0 || args0 != NULL ) ; <S2SV_StartBug> void...
<S2SV_ModStart> NULL ) ; assert ( nargs >= 0 && nargs0 >= 0 ) ; assert ( nargs + nargs0 <= MAX_NARGS ) ; <S2SV_ModStart> * xargs = alloca ( <S2SV_ModEnd> ( nargs0 + <S2SV_ModStart> nargs0 + nargs ) * <S2SV_ModEnd> sizeof ( void <S2SV_ModStart> ) ; } <S2SV_ModEnd> return rc ;
8,322
CWE-000 int weditstr ( WINDOW * win , char * buf , int field ) { char org [ MAXSTRLEN ] , * tp , * bp = buf ; bool defdisp = TRUE , stop = FALSE , insert = FALSE ; int cury , curx , begy , begx , oldattr ; WINDOW * wedit ; int c = 0 ; if ( ( field >= MAXSTRLEN ) || ( buf == NULL ) || ( ( int ) strlen ( buf ) > field - ...
<S2SV_ModStart> else if ( c >= 0 && c < 256 &&
8,323
CWE-000 <S2SV_StartBug> static void default_error_cb ( const pc_request_t * req , int rc , const char * resp ) <S2SV_EndBug> { request_cb_t * rp = ( request_cb_t * ) pc_request_ex_data ( req ) ; pc_client_t * client = pc_request_client ( req ) ; assert ( rp ) ; request_cb_t r = * rp ; free ( rp ) ; <S2SV_StartBug> r . ...
<S2SV_ModStart> * req , pc_error_t error <S2SV_ModEnd> ) { request_cb_t <S2SV_ModStart> ; r . error_cb <S2SV_ModEnd> ( client , <S2SV_ModStart> . cbid , error <S2SV_ModEnd> ) ; }
8,324
CWE-000 bool vertex_data_make ( cvertex_data * vertex_data , const uint32_t size , const bool vertex , const bool normals , const bool uv , const bool color , const evertex_data_usage usage ) { bool success = true ; GLenum gl_usage = 0 ; GLsizeiptr gl_size = 0 ; vertex_data -> size = size ; vertex_data -> count = 0 ; i...
<S2SV_ModStart> 0 ) ; vertex_data -> made = true ;
8,325
CWE-000 void execute_igrt ( ) { int n , m ; n = pop_int ( ) ; m = pop_int ( ) ; push_bool ( m > n ) ; <S2SV_StartBug> print_istack ( ) ; <S2SV_EndBug> }
<S2SV_ModStart> n ) ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null>
8,326
CWE-000 rstatus_t hash_md5 ( const char * key , size_t key_length , struct dyn_token * token ) { unsigned char results [ 16 ] ; <S2SV_StartBug> md5_signature ( ( unsigned char * ) key , ( unsigned long ) key_length , results ) ; <S2SV_EndBug> uint32_t val = ( ( uint32_t ) ( results [ 3 ] & 0xFF ) << 24 ) | ( ( uint32_t...
<S2SV_ModStart> , ( unsigned int <S2SV_ModEnd> ) key_length ,
8,327
CWE-000 void notify_new_block ( struct lightningd * ld , u32 height ) { bool removed ; do { struct htlc_out * hout ; struct htlc_out_map_iter outi ; removed = false ; for ( hout = htlc_out_map_first ( & ld -> htlcs_out , & outi ) ; hout ; hout = htlc_out_map_next ( & ld -> htlcs_out , & outi ) ) { if ( height < htlc_ou...
<S2SV_ModStart> ; if ( hout -> key . peer -> error ) continue ; if ( hout -> key . peer -> error <S2SV_ModEnd> ) continue ;
8,328
CWE-000 void handle_get ( int clientfd , request_header_t request_header ) { char * key_base = calloc ( 1 , request_header . key_size ) ; char * value_base = calloc ( 1 , request_header . value_size ) ; memset ( key_base , 0 , request_header . key_size ) ; <S2SV_StartBug> memset ( value_base , 0 , request_header . valu...
<S2SV_ModStart> request_header . value_size <S2SV_ModEnd> ) ; Rio_readn
8,329
CWE-000 DELCARE_HANDLER ( assert ) { if ( args_cnt == 1 <S2SV_StartBug> && args_p [ 0 ] . type == JERRY_API_DATA_TYPE_BOOLEAN <S2SV_EndBug> <S2SV_StartBug> && args_p [ 0 ] . u . v_bool == true ) <S2SV_EndBug> { printf ( ">><S2SV_blank>Jerry<S2SV_blank>assert<S2SV_blank>true\\r\\n" ) ; <S2SV_StartBug> return true ; <S2S...
<S2SV_ModStart> == 1 && jerry_value_is_boolean ( <S2SV_ModStart> [ 0 ] ) && jerry_get_boolean_value ( <S2SV_ModEnd> args_p [ 0 <S2SV_ModStart> [ 0 ] ) <S2SV_ModEnd> ) { printf <S2SV_ModStart> ) ; return jerry_create_boolean ( true ) <S2SV_ModEnd> ; } printf <S2SV_ModStart> ) ; return jerry_create_boolean ( false ) <S2S...
8,330
CWE-000 static void pci_endpoint_test_remove ( struct pci_dev * pdev ) { <S2SV_StartBug> int id ; <S2SV_EndBug> enum pci_barno bar ; struct pci_endpoint_test * test = pci_get_drvdata ( pdev ) ; struct miscdevice * misc_device = & test -> miscdev ; if ( sscanf ( misc_device -> name , DRV_MODULE_NAME ".%d" , & id ) != 1 ...
<S2SV_ModStart> { int id ; int i <S2SV_ModStart> ) return ; if ( id < 0 ) return ; <S2SV_ModStart> test -> miscdev ) ; kfree ( misc_device -> name <S2SV_ModStart> ) ; } for ( i = 0 ; i < test -> num_irqs ; i ++ ) devm_free_irq ( & pdev -> dev , pdev -> irq + i , test ) ;
8,331
CWE-000 static void relayfence_request_cb ( flux_t * h , flux_msg_handler_t * mh , const flux_msg_t * msg , void * arg ) { kvs_ctx_t * ctx = arg ; struct kvsroot * root ; const char * namespace ; const char * name ; int nprocs , flags ; json_t * ops = NULL ; fence_t * f ; if ( flux_request_unpack ( msg , NULL , "{<S2SV...
<S2SV_ModStart> namespace ) ; errno = ENOTSUP ; goto error <S2SV_ModEnd> ; } if <S2SV_ModStart> __FUNCTION__ ) ; goto error <S2SV_ModEnd> ; } if <S2SV_ModStart> f ) ; goto error <S2SV_ModEnd> ; } } <S2SV_ModStart> __FUNCTION__ ) ; goto error <S2SV_ModEnd> ; } if <S2SV_ModStart> __FUNCTION__ ) ; goto error ; } return ; ...
8,332
CWE-000 void chan_update_comments ( struct chan * chan ) { free ( chan -> viewing -> comments ) ; chan -> viewing -> comments = malloc ( chan -> viewing -> ncomments * sizeof * chan -> viewing -> comments ) ; struct comment * comments = chan -> viewing -> comments ; char * url = malloc ( 50 ) ; sprintf ( url , "https:/...
<S2SV_ModStart> idx ; } if ( idx < chan -> viewing -> ncomments - 1 ) { chan -> viewing -> ncomments = idx + 1 ; chan -> viewing -> comments = realloc ( chan -> viewing -> comments , chan -> viewing -> ncomments * sizeof * comments ) ; }
8,333
CWE-000 static void <S2SV_StartBug> gem_setladrf ( struct gem_softc * sc ) <S2SV_EndBug> { struct ifnet * ifp = sc -> gem_ifp ; struct ifmultiaddr * inm ; int i ; uint32_t hash [ 16 ] ; uint32_t crc , v ; GEM_LOCK_ASSERT ( sc , MA_OWNED ) ; v = sc -> gem_mac_rxcfg & ~ GEM_MAC_RX_HASH_FILTER ; GEM_BANK1_WRITE_4 ( sc , G...
<S2SV_ModStart> gem_softc * sc , int pswitch <S2SV_ModStart> NETGRAPH if ( pswitch != 0 ) { if ( <S2SV_ModStart> |= GEM_MAC_RX_STRIP_CRC ; }
8,334
CWE-000 int tt_t_ls ( tt_t_t * t , FILE * stream ) { char buf1 [ 26 ] = "N/A" ; char buf2 [ 26 ] = "N/A" ; char * tmp = NULL ; if ( NULL == t ) return - 1 ; if ( NULL == stream ) return - 2 ; if ( 0 == t -> nruns ) { <S2SV_StartBug> fprintf ( stderr , "%s:%d<S2SV_blank>-<S2SV_blank>no<S2SV_blank>runs\\n" , __FILE__ , _...
<S2SV_ModStart> nruns ) { <S2SV_ModEnd> return 0 ;
8,335
CWE-000 static int qcedev_sha_update ( struct qcedev_async_req * qcedev_areq , struct qcedev_handle * handle ) { int err = 0 ; int i = 0 ; int j = 0 ; int k = 0 ; int num_entries = 0 ; uint32_t total = 0 ; if ( handle -> sha_ctxt . init_done == false ) { pr_err ( "%s<S2SV_blank>Init<S2SV_blank>was<S2SV_blank>not<S2SV_b...
<S2SV_ModStart> EINVAL ; } <S2SV_ModEnd> if ( qcedev_areq
8,336
CWE-000 LOCAL void _processFileSize ( void ) { uint32_t fileLentgh = 0U ; <S2SV_StartBug> ( void ) printf ( "Sending<S2SV_blank>%s<S2SV_blank>to<S2SV_blank>the<S2SV_blank>_client...<S2SV_blank>\\n\\n" , _tempDir ) ; <S2SV_EndBug> _fs = fopen ( _tempDir , "rb" ) ; if ( NULL_PTR == _fs ) { ( void ) printf ( "ERROR:<S2SV_...
<S2SV_ModStart> ) printf ( "Sending<S2SV_blank>%s<S2SV_blank>to<S2SV_blank>client...<S2SV_blank>\\n\\n" <S2SV_ModEnd> , _tempDir ) <S2SV_ModStart> "Size<S2SV_blank>of<S2SV_blank>file<S2SV_blank>is<S2SV_blank>sent!\\n" ) ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null>
8,337
CWE-000 Datum tsquery_rewrite_query ( PG_FUNCTION_ARGS ) { TSQuery query = PG_GETARG_TSQUERY_COPY ( 0 ) ; text * in = PG_GETARG_TEXT_P ( 1 ) ; TSQuery rewrited = query ; MemoryContext outercontext = CurrentMemoryContext ; MemoryContext oldcontext ; QTNode * tree ; char * buf ; SPIPlanPtr plan ; Portal portal ; bool isn...
<S2SV_ModStart> QTN_NOCHANGE ) ; QTNTernary ( tree ) ;
8,338
CWE-000 static void ipoib_dev_uninit_default ( struct net_device * dev ) { struct ipoib_dev_priv * priv = ipoib_priv ( dev ) ; <S2SV_StartBug> ipoib_transport_dev_cleanup ( dev ) ; <S2SV_EndBug> ipoib_cm_dev_cleanup ( dev ) ; kfree ( priv -> rx_ring ) ; vfree ( priv -> tx_ring ) ; priv -> rx_ring = NULL ; priv -> tx_ri...
<S2SV_ModStart> ipoib_transport_dev_cleanup ( dev ) ; netif_napi_del ( & priv -> napi
8,339
CWE-000 static void translation_createSourceHeader ( FILE * file ) { fprintf ( file , "#include<S2SV_blank><stdio.h>\\n" ) ; fprintf ( file , "#include<S2SV_blank><stdlib.h>\\n" ) ; fprintf ( file , "#include<S2SV_blank><string.h>\\n" ) ; fprintf ( file , "#define<S2SV_blank>EXPR_STRING_LENGTH<S2SV_blank>255\\n\\n" ) ;...
<S2SV_ModStart> ( file , "\t<S2SV_blank>free(objName);\\n" ) ; fprintf ( file , <S2SV_ModStart> ( file , "<S2SV_blank>tmp<S2SV_blank>=<S2SV_blank>mfunctions->get(map,<S2SV_blank>objName);\\n" ) ; fprintf ( file , "\tfree(objName);\\n" ) ; fprintf ( file , "\treturn<S2SV_blank>tmp;\\n" <S2SV_ModEnd> ) ; fprintf
8,340
CWE-000 <S2SV_StartBug> int check_for_builtins ( char * * args , char * line ) <S2SV_EndBug> { builtins_t list [ ] = { <S2SV_StartBug> { "exit" , exit_shell } , <S2SV_EndBug> { NULL , NULL } } ; int i ; for ( i = 0 ; list [ i ] . arg != NULL ; i ++ ) { if ( _strcmp ( list [ i ] . arg , args [ 0 ] ) == 0 ) { <S2SV_Start...
<S2SV_ModStart> char * line , char * * env <S2SV_ModStart> "exit" , exit_shell } , { "env" , env_shell <S2SV_ModStart> args , line , env
8,341
CWE-000 static const char * sync_status_str ( int status ) { <S2SV_StartBug> if ( status == 0 ) <S2SV_EndBug> <S2SV_StartBug> return "signaled" ; <S2SV_EndBug> if ( status > 0 ) <S2SV_StartBug> return "active" ; <S2SV_EndBug> return "error" ; }
<S2SV_ModStart> if ( status < <S2SV_ModEnd> 0 ) return <S2SV_ModStart> 0 ) return "error" <S2SV_ModEnd> ; if ( <S2SV_ModStart> 0 ) return "signaled" ; return "active" <S2SV_ModEnd> ; } <S2SV_null>
8,342
CWE-000 int main ( ) { int step_number ; ue_relay_route * route ; step_number = 2 ; if ( ! ue_init ( ) ) { fprintf ( stderr , "[FATAL]<S2SV_blank>Failed<S2SV_blank>to<S2SV_blank>initialize<S2SV_blank>LibUnknownEcho\\n" ) ; exit ( EXIT_FAILURE ) ; } route = ue_relay_route_create ( ue_relay_steps_create ( step_number , <...
<S2SV_ModStart> ( ue_communication_metadata_create_socket_type ( <S2SV_ModEnd> "192.168.0.2" , 5001 <S2SV_ModStart> , ue_relay_step_create ( <S2SV_ModEnd> ue_communication_metadata_create_socket_type ( "192.168.0.3"
8,343
CWE-000 char * match_pattern_i ( char * argv [ ] , int argc , char * info [ ] ) { int fd ; int r ; int i = 0 ; char temp ; char * pattern = argv [ countOptions ( argv , argc ) + 1 ] ; char line [ MAX_LINE_LENGTH ] ; DIR * dir ; int fileStartIndex = countOptions ( argv , argc ) + 2 ; for ( int a = fileStartIndex ; a < a...
<S2SV_ModStart> = strlen ( pattern <S2SV_ModEnd> ) ; if <S2SV_ModStart> position + patternSize <S2SV_ModEnd> ] ) && <S2SV_ModStart> position + patternSize <S2SV_ModEnd> ] ) && <S2SV_ModStart> position + patternSize <S2SV_ModEnd> ] != '_'
8,344
CWE-000 int network_read_buffer ( int socket , io_buffer_t * buffer ) { if ( socket < 0 ) return socket ; <S2SV_StartBug> return 0 ; <S2SV_EndBug> }
<S2SV_ModStart> return socket ; int nread ; int errno ; nread = recv ( socket , iobuffer_head ( buffer ) , iobuffer_remaining ( buffer ) , 0 ) ; if ( nread < 0 ) { errno = socketlasterr ( ) ; return - errno ; } buffer -> head += nread ; memset ( iobuffer_head ( buffer ) , 0 , iobuffer_remaining ( buffer ) ) ; return nr...
8,345
CWE-000 static void * ClientManager_MonitorInterfaces ( void * arg ) <S2SV_StartBug> { <S2SV_EndBug> ( void ) arg ; <S2SV_StartBug> while ( abort_mon == 0 ) { <S2SV_EndBug> ClientManager_CleanupInit ( ) ; ifaceutil_enumifaces ( ClientManager_EnumInterfacesCallback , NULL ) ; ClientManager_Cleanup ( ) ; <S2SV_StartBug> ...
<S2SV_ModStart> arg ) { struct timespec tv ; <S2SV_ModStart> 0 ) { pthread_mutex_lock ( & mon_lock ) ; <S2SV_ModStart> ( ) ; clock_gettime ( CLOCK_REALTIME , & tv ) ; tv . tv_sec += POLL_INTERVAL ; pthread_cond_timedwait ( & mon_cond , & mon_lock , & tv <S2SV_ModEnd> ) ; ClientManager_CheckClients <S2SV_ModStart> ; Cli...
8,346
CWE-000 static int btree_dump_curr_key ( THREAD_ENTRY * thread_p , INDX_SCAN_ID * iscan_id ) { BTREE_SCAN * bts = NULL ; HEAP_CACHE_ATTRINFO * attr_info ; REGU_VARIABLE_LIST regu_list ; OID oid ; int error ; if ( iscan_id == NULL || iscan_id -> indx_cov . list_id == NULL || iscan_id -> indx_cov . val_descr == NULL || i...
<S2SV_ModStart> bt_scan ) ; assert <S2SV_ModEnd> ( iscan_id -> <S2SV_ModStart> > 0 ) ; assert ( iscan_id -> pred_attrs . num_attrs == 0 ) ; if ( <S2SV_ModEnd> iscan_id -> rest_attrs <S2SV_ModStart> iscan_id -> rest_attrs <S2SV_ModEnd> . num_attrs > <S2SV_ModStart> = iscan_id -> rest_attrs . attr_cache ; regu_list = isc...
8,347
CWE-000 <S2SV_StartBug> static const RfKillType <S2SV_EndBug> rfkill_type_to_enum ( const char * str ) { g_return_val_if_fail ( str != NULL , RFKILL_TYPE_UNKNOWN ) ; if ( ! strcmp ( str , "wlan" ) ) return RFKILL_TYPE_WLAN ; else if ( ! strcmp ( str , "wwan" ) ) return RFKILL_TYPE_WWAN ; return RFKILL_TYPE_UNKNOWN ; }
<S2SV_ModStart> <S2SV_null> <S2SV_null> static <S2SV_ModEnd> RfKillType rfkill_type_to_enum (
8,348
CWE-000 static int encrypt ( buffer_t * plaintext , cipher_ctx_t * ctx , int reset ) { size_t salt_off = 0 ; if ( ! ctx -> init || reset ) { salt_off = SALT_LENGTH ; } size_t clen = salt_off + plaintext -> len + crypto_aead_chacha20poly1305_IETF_ABYTES ; uint8_t ciphertext [ clen ] ; if ( ! ctx -> init || reset ) { ran...
<S2SV_ModStart> clen ) ; <S2SV_ModEnd> plaintext -> len
8,349
CWE-000 static int pch_get_trip_temp ( struct thermal_zone_device * tzd , int trip , int * temp ) { struct pch_thermal_device * ptd = tzd -> devdata ; if ( ptd -> crt_trip_id == trip ) * temp = ptd -> crt_temp ; else if ( ptd -> hot_trip_id == trip ) * temp = ptd -> hot_temp ; <S2SV_StartBug> else <S2SV_EndBug> return ...
<S2SV_ModStart> hot_temp ; else if ( ptd -> psv_trip_id == trip ) * temp = ptd -> psv_temp ; else
8,350
CWE-000 int is_solution ( t_grid * grid , t_liste * list ) { int i ; int size ; <S2SV_StartBug> i = 0 ; <S2SV_EndBug> size = 0 ; while ( i < list -> size ) { if ( list -> elem [ i ] == 99 ) size ++ ; <S2SV_StartBug> else if ( try ( grid , list , i ) ) <S2SV_EndBug> return ( 1 ) ; ++ i ; } if ( size == list -> size ) re...
<S2SV_ModStart> int size ; int x ; int y ; i = 0 ; x = 0 ; y <S2SV_ModEnd> = 0 ; <S2SV_ModStart> list , i , & ( t_coord ) { & x , & y }
8,351
CWE-000 static void test_geoip_load_2nd_file ( void * arg ) { ( void ) arg ; const char FNAME [ ] = SRCDIR "/src/config/geoip" ; tt_int_op ( 0 , OP_EQ , geoip_load_file ( AF_INET , FNAME ) ) ; <S2SV_StartBug> int num_countries_geoip = geoip_get_n_countries ( ) ; <S2SV_EndBug> const char FNAME2 [ ] = SRCDIR "/src/test/g...
<S2SV_ModStart> ) ) ; tt_int_op ( 1 , OP_EQ , geoip_is_loaded ( ) <S2SV_ModEnd> ) ; const <S2SV_ModStart> ) ) ; tt_int_op ( 0 , OP_EQ , geoip_is_loaded ( ) <S2SV_ModEnd> ) ; int
8,352
CWE-000 void ip_send_unicast_reply ( struct sock * sk , struct sk_buff * skb , __be32 daddr , __be32 saddr , const struct ip_reply_arg * arg , unsigned int len ) { struct ip_options_data replyopts ; struct ipcm_cookie ipc ; struct flowi4 fl4 ; struct rtable * rt = skb_rtable ( skb ) ; struct net * net = sock_net ( sk )...
<S2SV_ModStart> ) -> dest , arg -> uid
8,353
CWE-000 static void cccam_send_cli_data ( cccam_t * cccam ) { uint8_t buf [ CCCAM_NETMSGSIZE ] ; memset ( buf , 0 , CCCAM_NETMSGSIZE ) ; memcpy ( buf , cccam -> cccam_username , 20 ) ; memcpy ( buf + 20 , cccam -> cccam_nodeid , 8 ) ; buf [ 28 ] = 0 ; memcpy ( buf + 29 , cccam_version_str [ cccam -> cccam_version ] , 3...
<S2SV_ModStart> , "tvh" , 3 <S2SV_ModEnd> ) ; cccam_send_msg
8,354
CWE-000 static PGresult * libpqrcv_PQexec ( PGconn * streamConn , const char * query ) { PGresult * result = NULL ; PGresult * lastResult = NULL ; if ( ! PQsendQuery ( streamConn , query ) ) return NULL ; for ( ; ; ) { while ( PQisBusy ( streamConn ) ) { int rc ; rc = WaitLatchOrSocket ( MyLatch , WL_POSTMASTER_DEATH |...
<S2SV_ModStart> == 0 ) { PQclear ( lastResult ) ; <S2SV_ModStart> return NULL ; }
8,355
CWE-000 cl_program create_and_build_program ( cl_context context , cl_device_id device , const char * file_name ) { FILE * file = fopen ( file_name , "rb" ) ; if ( file == NULL ) { printf ( "Failed<S2SV_blank>to<S2SV_blank>open<S2SV_blank>%s\\n" , file_name ) ; exit ( EXIT_FAILURE ) ; } fseek ( file , 0 , SEEK_END ) ; ...
<S2SV_ModStart> size_t log_size ; CHECK_ERROR ( <S2SV_ModEnd> clGetProgramBuildInfo ( program <S2SV_ModStart> & log_size ) <S2SV_ModEnd> ) ; char <S2SV_ModStart> 1 ) ; CHECK_ERROR ( <S2SV_ModEnd> clGetProgramBuildInfo ( program <S2SV_ModStart> , NULL ) <S2SV_ModEnd> ) ; log
8,356
CWE-000 static ssize_t oom_adj_write ( struct file * file , const char __user * buf , size_t count , loff_t * ppos ) { struct task_struct * task ; char buffer [ PROC_NUMBUF ] ; int oom_adj ; unsigned long flags ; int err ; memset ( buffer , 0 , sizeof ( buffer ) ) ; if ( count > sizeof ( buffer ) - 1 ) count = sizeof (...
<S2SV_ModStart> ) ) ; <S2SV_ModEnd> task -> signal <S2SV_ModStart> oom_score_adj = oom_adj <S2SV_ModEnd> ; trace_oom_score_adj_update (
8,357
CWE-000 rlm_rcode_t rlm_ldap_cacheable_groupobj ( rlm_ldap_t const * inst , REQUEST * request , ldap_handle_t * * pconn ) { rlm_rcode_t rcode = RLM_MODULE_OK ; ldap_rcode_t status ; int ldap_errno ; LDAPMessage * result = NULL ; LDAPMessage * entry ; char const * base_dn ; char base_dn_buff [ LDAP_MAX_DN_STR_LEN ] ; ch...
<S2SV_ModStart> "No<S2SV_blank>cacheable<S2SV_blank>group<S2SV_blank>memberships<S2SV_blank>found<S2SV_blank>in<S2SV_blank>group<S2SV_blank>objects" ) ; goto finish ; default : rcode = RLM_MODULE_FAIL ; <S2SV_ModEnd> goto finish ;
8,358
CWE-000 static void file_transfer_using_external_body_url ( void ) { <S2SV_StartBug> file_transfer_external_body_url ( FALSE ) ; <S2SV_EndBug> }
<S2SV_ModStart> file_transfer_external_body_url ( FALSE , FALSE
8,359
CWE-000 static ssize_t fuse_fill_write_pages ( struct fuse_req * req , struct address_space * mapping , struct iov_iter * ii , loff_t pos ) { struct fuse_conn * fc = get_fuse_conn ( mapping -> host ) ; unsigned offset = pos & ( PAGE_CACHE_SIZE - 1 ) ; size_t count = 0 ; int err ; req -> in . argpages = 1 ; req -> page_...
<S2SV_ModStart> flush_dcache_page ( page ) ; iov_iter_advance ( ii , tmp <S2SV_ModStart> num_pages ++ ; <S2SV_ModEnd> count += tmp
8,360
CWE-000 int big_endian ( ) { uint16_t w = 0x1234 ; <S2SV_StartBug> uint8_t * c = ( uint8_t * ) w ; <S2SV_EndBug> if ( * c == 0x12 ) return 1 ; return 0 ; }
<S2SV_ModStart> uint8_t * ) &
8,361
CWE-000 int send_message ( int mode , int socketfd , car myself , int app , int url , time_t time ) { message msg ; security secr ; confort conf ; entertain ent ; char buf [ MAX_LINE ] ; sprintf ( msg . SENDTIME , "%ld" , time ) ; if ( mode == SECURITY ) { msg . TYPE = SECURITY ; msg . MODIFIER = CAR_REPORT ; cartochar...
<S2SV_ModStart> ) ) ; memcpy ( buf , & msg , sizeof ( msg ) ) ;
8,362
CWE-000 static int tfw_cfgop_in_conn_retries ( TfwCfgSpec * cs , TfwCfgEntry * ce ) { <S2SV_StartBug> return tfw_cfgop_intval ( cs , ce , & tfw_cfg_cns_retries ) ; <S2SV_EndBug> }
<S2SV_ModStart> ce ) { TFW_CFGOP_INHERIT ( ce , cns_retries ) ;
8,363
CWE-000 <S2SV_StartBug> inline int adreno_ringbuffer_load_pm4_ucode ( struct kgsl_device * device , <S2SV_EndBug> unsigned int start , unsigned int end , unsigned int addr ) { struct adreno_device * adreno_dev = ADRENO_DEVICE ( device ) ; int i ; adreno_writereg ( adreno_dev , ADRENO_REG_CP_ME_RAM_WADDR , addr ) ; for ...
<S2SV_ModStart> <S2SV_null> <S2SV_null> <S2SV_null> static
8,364
CWE-000 const char * do_alt_speller ( char * tempfile_name ) { int alt_spell_status ; size_t current_x_save = openfile -> current_x ; size_t pww_save = openfile -> placewewant ; ssize_t current_y_save = openfile -> current_y ; ssize_t lineno_save = openfile -> current -> lineno ; struct stat spellfileinfo ; time_t time...
<S2SV_ModStart> ( ) ; <S2SV_ModEnd> # ifndef NANO_TINY <S2SV_ModStart> # ifndef NANO_TINY discard_until ( NULL , openfile ) ; # endif } # ifndef NANO_TINY
8,365
CWE-000 void pc_dimm_memory_unplug ( DeviceState * dev , MemoryHotplugState * hpms , MemoryRegion * mr ) { PCDIMMDevice * dimm = PC_DIMM ( dev ) ; PCDIMMDeviceClass * ddc = PC_DIMM_GET_CLASS ( dimm ) ; MemoryRegion * vmstate_mr = ddc -> get_vmstate_memory_region ( dimm ) ; <S2SV_StartBug> numa_unset_mem_node_id ( dimm ...
<S2SV_ModStart> dimm ) ; <S2SV_ModEnd> memory_region_del_subregion ( &
8,366
CWE-000 struct opp * opp_find_freq_ceil ( struct device * dev , unsigned long * freq ) { struct device_opp * dev_opp ; <S2SV_StartBug> struct opp * temp_opp , * opp = ERR_PTR ( - ENODEV ) ; <S2SV_EndBug> if ( ! dev || ! freq ) { dev_err ( dev , "%s:<S2SV_blank>Invalid<S2SV_blank>argument<S2SV_blank>freq=%p\\n" , __func...
<S2SV_ModStart> ERR_PTR ( - ERANGE <S2SV_ModEnd> ) ; if <S2SV_ModStart> ) ) return ERR_CAST ( dev_opp ) <S2SV_ModEnd> ; list_for_each_entry_rcu (
8,367
CWE-000 void name_filters_remove ( view_t * view ) { if ( name_filters_empty ( view ) ) { return ; } ( void ) replace_string ( & view -> prev_manual_filter , matcher_get_expr ( view -> manual_filter ) ) ; ( void ) replace_string ( & view -> prev_auto_filter , view -> auto_filter . raw ) ; view -> prev_invert = view -> ...
<S2SV_ModStart> : 0 ; ui_view_schedule_reload <S2SV_ModEnd> ( view )
8,368
CWE-000 static inline void bdb_get_writelock_int ( bdb_state_type * bdb_state , const char * idstr , const char * funcname , int line , int abort_waiters ) { thread_lock_info_type * lk = pthread_getspecific ( lock_key ) ; static pthread_mutex_t lk_desired_lock = PTHREAD_MUTEX_INITIALIZER ; bdb_state_type * lock_handle ...
<S2SV_ModStart> ) ; } if ( gbl_force_serial_on_writelock ) __rep_block_on_inflight_transactions ( lock_handle -> dbenv ) ;
8,369
CWE-000 static int test_branch_carry_clear_red ( ) { unsigned char rom [ ] = { 0x90 , 0x01 } ; mos6502_t cpu ; mos6502_init ( & cpu ) ; mos6502_add_test_full_mapping ( & cpu , rom ) ; cpu . flags = FLAG_CARRY ; cpu . pc = 0 ; int ticks = mos6502_tick ( & cpu ) ; <S2SV_StartBug> assert_is_not_equal ( ticks , 2 ) ; <S2SV...
<S2SV_ModStart> ( ticks , 3 ) ; assert_is_not_zero ( ( ( cpu . flags ) & 0x01 ) <S2SV_ModEnd> ) ; assert_is_equal
8,370
CWE-000 int pfsync_clone_destroy ( struct ifnet * ifp ) { struct pfsync_softc * sc = ifp -> if_softc ; struct pfsync_deferral * pd ; <S2SV_StartBug> timeout_del ( & sc -> sc_bulkfail_tmo ) ; <S2SV_EndBug> timeout_del ( & sc -> sc_bulk_tmo ) ; timeout_del ( & sc -> sc_tmo ) ; # if NCARP > 0 if ( ! pfsync_sync_ok ) carp_...
<S2SV_ModStart> * pd ; NET_LOCK ( <S2SV_ModEnd> ) ; # <S2SV_ModStart> ) ; } NET_UNLOCK ( ) ; <S2SV_ModStart> if_detach ( ifp ) ; NET_LOCK ( <S2SV_ModStart> ) ; } pfsyncif = NULL ; timeout_del ( & sc -> sc_bulkfail_tmo ) ; timeout_del ( & sc -> sc_bulk_tmo ) ; timeout_del ( & sc -> sc_tmo ) ; NET_UNLOCK ( ) ; <S2SV_ModS...
8,371
CWE-000 int main ( int argc , char * * argv ) { int ret ; signal ( SIGINT , signal_handler ) ; ret = rte_eal_init ( argc , argv ) ; if ( ret < 0 ) { rte_panic ( "Cannot<S2SV_blank>init<S2SV_blank>EAL\\n" ) ; } argc -= ret ; argv += ret ; initialize ( ) ; init_kni ( NUM_KNI_INTF ) ; kni_alloc ( portid ) ; <S2SV_StartBug...
<S2SV_ModStart> portid ) ; n_port = rte_eth_dev_count ( ) ; printf ( "-<S2SV_blank>-<S2SV_blank>-<S2SV_blank>-<S2SV_blank>-<S2SV_blank>-<S2SV_blank>number<S2SV_blank>of<S2SV_blank>ports<S2SV_blank>%d\\n" , n_port ) ; rte_eal_mp_remote_launch ( load_balancer_lcore , NULL , CALL_MASTER ) ; RTE_LCORE_FOREACH_SLAVE ( lcore...
8,372
CWE-000 uint32_t vbnv_read ( uint32_t flag ) { <S2SV_StartBug> uint32_t val ; <S2SV_EndBug> VbNvContext context ; <S2SV_StartBug> VbExNvStorageRead ( context . raw ) ; <S2SV_EndBug> VbNvSetup ( & context ) ; VbNvGet ( & context , flag , & val ) ; VbNvTeardown ( & context ) ; if ( context . raw_changed ) VbExNvStorageWr...
<S2SV_ModStart> flag ) { struct vb2_context ctx ; memset ( & ctx , 0 , sizeof ( ctx ) ) <S2SV_ModEnd> ; VbExNvStorageRead ( <S2SV_ModStart> ; VbExNvStorageRead ( ctx . nvdata ) ; vb2_nv_init ( & ctx <S2SV_ModEnd> ) ; return <S2SV_ModStart> ) ; return vb2_nv_get ( & ctx , flag ) <S2SV_ModEnd> ; } <S2SV_null>
8,373
CWE-000 PHB_EXPR hb_compExprNewRTVar ( const char * szName , PHB_EXPR pMacroVar , HB_COMP_DECL ) { PHB_EXPR pExpr ; <S2SV_StartBug> HB_TRACE ( HB_TR_DEBUG , ( "hb_compExprNewRTVar(%s,<S2SV_blank>%p,<S2SV_blank>%p)" , szName , pMacroVar , HB_COMP_PARAM ) ) ; <S2SV_EndBug> pExpr = HB_COMP_EXPR_NEW ( HB_ET_RTVAR ) ; pExpr...
<S2SV_ModStart> , szName , ( void * ) pMacroVar , ( void * ) <S2SV_ModEnd> HB_COMP_PARAM ) )
8,374
CWE-000 static void intel_pmu_drain_pebs_nhm ( struct pt_regs * iregs ) { struct cpu_hw_events * cpuc = this_cpu_ptr ( & cpu_hw_events ) ; struct debug_store * ds = cpuc -> ds ; struct perf_event * event ; void * base , * at , * top ; short counts [ MAX_PEBS_EVENTS ] = { } ; short error [ MAX_PEBS_EVENTS ] = { } ; int ...
<S2SV_ModStart> bit ] ) { <S2SV_ModStart> ; if ( perf_event_account_interrupt ( event ) ) x86_pmu_stop ( event , 0 ) ; } if (
8,375
CWE-000 static node_t * quote ( lexer_t * l ) { node_t * r ; assert ( l ) ; <S2SV_StartBug> r = node_new ( l , SYM_QUOTE , 0 ) ; <S2SV_EndBug> if ( ! accept ( l , LEX_IDENTIFIER ) ) expect ( l , LEX_STRING ) ; use ( l , r ) ; return r ; }
<S2SV_ModStart> = node_new ( <S2SV_ModEnd> SYM_QUOTE , 0
8,376
CWE-000 static int rt6_fill_node ( struct net * net , struct sk_buff * skb , struct rt6_info * rt , struct in6_addr * dst , struct in6_addr * src , int iif , int type , u32 pid , u32 seq , int prefix , int nowait , unsigned int flags ) { const struct inet_peer * peer ; struct rtmsg * rtm ; struct nlmsghdr * nlh ; long ...
<S2SV_ModStart> & RTF_REJECT ) { switch ( rt -> dst . error ) { case - EINVAL : <S2SV_ModStart> -> rtm_type = RTN_BLACKHOLE ; break ; case - EACCES : rtm -> rtm_type = RTN_PROHIBIT ; break ; default : rtm -> rtm_type = RTN_UNREACHABLE ; break ; } } <S2SV_ModEnd> else if (
8,377
CWE-000 move readInput ( ) { <S2SV_StartBug> move gameMove ; <S2SV_EndBug> gameMove . type = exitGame ; char * token ; char input [ MAX_INPUT_LENGTH ] = { '\\0' } ; const char tokenString [ 5 ] = "<S2SV_blank>\\t\\r\\n" ; <S2SV_StartBug> token = fgets ( input , MAX_INPUT_LENGTH , stdin ) ; <S2SV_EndBug> if ( token == N...
<S2SV_ModStart> { move gameMove <S2SV_ModEnd> ; char * <S2SV_ModStart> = "<S2SV_blank>\\t\\r\\n" ; gameMove . type = exitGame ;
8,378
CWE-000 static int trx_fn_timer_cb ( struct osmo_fd * ofd , unsigned int what ) { struct gsm_bts * bts = ofd -> data ; struct osmo_trx_clock_state * tcs = & g_clk_s ; struct timespec tv_now ; uint64_t expire_count ; <S2SV_StartBug> int elapsed_us ; <S2SV_EndBug> int error_us ; int rc , i ; if ( ! ( what & BSC_FD_READ )...
<S2SV_ModStart> uint64_t expire_count ; int64_t elapsed_us , <S2SV_ModEnd> error_us ; int <S2SV_ModStart> DEBUG_CLOCK printf ( "%s():<S2SV_blank>%09ld,<S2SV_blank>elapsed_us=%05" PRId64 ",<S2SV_blank>error_us=%-d:<S2SV_blank>fn=%d\\n" <S2SV_ModEnd> , __func__ , <S2SV_ModStart> , LOGL_ERROR , "PC<S2SV_blank>clock<S2SV_b...
8,379
CWE-000 static void gst_mfx_decoder_reconfigure_params ( GstMfxDecoder * decoder ) { mfxFrameInfo * frame_info = & decoder -> params . mfx . FrameInfo ; frame_info -> PicStruct = GST_VIDEO_INFO_IS_INTERLACED ( & decoder -> info ) ? ( GST_VIDEO_INFO_FLAG_IS_SET ( & decoder -> info , GST_VIDEO_FRAME_FLAG_TFF ) ? MFX_PICS...
<S2SV_ModStart> -> Width = GST_ROUND_UP_32 <S2SV_ModEnd> ( decoder -> <S2SV_ModStart> width ) ; <S2SV_ModEnd> frame_info -> Height <S2SV_ModStart> height ) ; <S2SV_ModEnd> frame_info -> FrameRateExtN
8,380
CWE-000 static void sm_service_domain_filter_by_assignment ( void * user_data [ ] , SmServiceDomainAssignmentT * assignment ) { SmServiceDomainFilterCountsT * counts ; SmServiceDomainSchedulingListT list ; counts = ( SmServiceDomainFilterCountsT * ) user_data [ 0 ] ; list = assignment -> sched_list ; ++ ( counts -> tot...
<S2SV_ModStart> = '\\0' ; goto UPDATE <S2SV_ModEnd> ; } SmNodeScheduleStateT
8,381
CWE-000 int init_device ( int argc , char * * argv ) # endif { int r = 2 , blksz = 0 ; int try_i = 0 ; float delay ; do_exit = 1 ; pthread_mutex_init ( & mux , NULL ) ; r = libusb_init ( NULL ) ; if ( r < 0 ) { perror_exit ( "failed<S2SV_blank>to<S2SV_blank>initialise<S2SV_blank>libusb" , 1 ) ; } while ( 1 ) { # if ( 0...
<S2SV_ModStart> } # endif if ( system_upgrade ) return 1 ;
8,382
CWE-000 void main ( ) { <S2SV_StartBug> setname ( "init" ) ; <S2SV_EndBug> int logger_pid = fork ( ) ; if ( ! logger_pid ) { exec ( "logger.elf" ) ; while ( 1 ) ; invalid_code_path ( ) ; } int primes_pid = fork ( ) ; if ( ! primes_pid ) { exec ( "primes.elf" ) ; while ( 1 ) ; invalid_code_path ( ) ; } int fib_pid = for...
<S2SV_ModStart> ( ) { <S2SV_ModEnd> int logger_pid =
8,383
CWE-000 ssize_t simple_char_driver_write ( struct file * pfile , const char __user * buffer , size_t length , loff_t * offset ) { int actualBytesWritten = 0 ; int tempBytesWritten = 0 ; int copyFromReturn = 0 ; copyFromReturn = copy_from_user ( device_buffer + * offset , buffer , length ) ; if ( copyFromReturn == 0 ) {...
<S2SV_ModStart> length ) ; * offset += length ;
8,384
CWE-000 bool handle_builtins ( Executable * e ) { if ( starts_with ( "quit" , e -> exec_path ) ) { log_trace ( "Quit<S2SV_blank>detected" ) ; do_quit ( e ) ; return true ; } else if ( strcmp ( e -> exec_path , "cd" ) == 0 ) { do_cd ( e ) ; return true ; } else if ( strcmp ( e -> exec_path , "pwd" ) == 0 ) { do_pwd ( e ...
<S2SV_ModStart> ; } else { <S2SV_ModStart> false ; } }
8,385
CWE-000 <S2SV_StartBug> static int delete_proc ( proc_t * * q , proc_t * h ) { <S2SV_EndBug> proc_t * curr = q [ HEAD ] ; proc_t * prev = NULL ; if ( curr == NULL ) { assert ( q [ TAIL ] == NULL , "delete:<S2SV_blank>tail<S2SV_blank>not<S2SV_blank>null" ) ; return - 1 ; } while ( curr != h && curr != NULL ) { prev = cu...
<S2SV_ModStart> <S2SV_null> <S2SV_null> <S2SV_null> <S2SV_ModEnd> int delete_proc ( <S2SV_ModStart> HEAD ] = curr -> next ; if ( curr -> next == NULL ) { <S2SV_ModStart> TAIL ] = curr -> next ; } <S2SV_ModEnd> } else {
8,386
CWE-000 void ec_dispatch_min ( ec_fop_data_t * fop ) { ec_t * ec = fop -> xl -> private ; uintptr_t mask ; <S2SV_StartBug> int32_t idx ; <S2SV_EndBug> int count ; ec_dispatch_start ( fop ) ; if ( ec_child_select ( fop ) ) { fop -> expected = count = ec -> fragments ; fop -> first = ec_select_first_by_read_policy ( fop ...
<S2SV_ModStart> uintptr_t mask ; uint32_t idx ; int32_t <S2SV_ModEnd> count ; ec_dispatch_start <S2SV_ModStart> if ( idx < EC_METHOD_MAX_NODES <S2SV_ModEnd> ) mask |=
8,387
CWE-000 lval * native_eval ( lenv * e , lval * a ) { LASSERT_ARGS ( a , "eval" , 1 ) ; LASSERT_TYPE ( a , "eval" , 0 , LVAL_QEXPR ) ; lcontext * ctx = lenv_get_eval ( e ) ; lval * x = lval_take ( a , 0 ) ; x -> type = LVAL_SEXPR ; <S2SV_StartBug> return lcontext_eval ( ctx , x ) ; <S2SV_EndBug> }
<S2SV_ModStart> ( ctx , e ,
8,388
CWE-000 void TIM6_DAC_IRQHandler ( void ) <S2SV_StartBug> { <S2SV_EndBug> HAL_TIM_IRQHandler ( timer_handles [ 5 ] ) ; <S2SV_StartBug> } <S2SV_EndBug>
<S2SV_ModStart> ( void ) { if ( timer_handles [ 5 ] != NULL ) <S2SV_ModStart> ) ; } }
8,389
CWE-000 static void machine_ps2_common_init ( machine_t * model ) { machine_common_init ( model ) ; dma16_init ( ) ; ps2_dma_init ( ) ; keyboard_at_init ( ) ; keyboard_at_init_ps2 ( ) ; <S2SV_StartBug> mouse_ps2_init ( ) ; <S2SV_EndBug> nvr_at_init ( 8 ) ; pic2_init ( ) ; pit_ps2_init ( ) ; }
<S2SV_ModStart> ; mouse_ps2_init ( NULL
8,390
CWE-000 int phttpd_read ( int fd , struct nm_targ * targ ) { char buf [ MAXQUERYLEN ] ; char * rxbuf ; # ifdef WITH_SQLITE static u_int seq = 0 ; # endif ssize_t len = 0 , written ; struct nm_garg * g = targ -> g ; struct phttpd_global * tg = ( struct phttpd_global * ) g -> garg_private ; struct dbctx * db = ( struct d...
<S2SV_ModStart> ) ; } # ifdef WITH_CLFLUSHOPT _mm_mfence ( ) ; if ( g -> emu_delay ) { wait_ns ( g -> emu_delay ) ; } # endif
8,391
CWE-000 static int pg_SASL_init ( PGconn * conn , int payloadlen ) { char * initialresponse = NULL ; int initialresponselen ; bool done ; bool success ; const char * selected_mechanism ; PQExpBufferData mechanism_buf ; char * password ; initPQExpBuffer ( & mechanism_buf ) ; if ( conn -> sasl_state ) { printfPQExpBuffer...
<S2SV_ModStart> . data , SCRAM_SHA_256_PLUS_NAME <S2SV_ModEnd> ) == 0 <S2SV_ModStart> ) selected_mechanism = SCRAM_SHA_256_PLUS_NAME <S2SV_ModEnd> ; else if <S2SV_ModStart> . data , SCRAM_SHA_256_NAME <S2SV_ModEnd> ) == 0 <S2SV_ModStart> ) selected_mechanism = SCRAM_SHA_256_NAME <S2SV_ModEnd> ; } if
8,392
CWE-000 void free_db_and_rel_infos ( DbInfoArr * db_arr ) { int dbnum ; for ( dbnum = 0 ; dbnum < db_arr -> ndbs ; dbnum ++ ) free_rel_infos ( & db_arr -> dbs [ dbnum ] . rel_arr ) ; pg_free ( db_arr -> dbs ) ; <S2SV_StartBug> db_arr -> ndbs = 0 ; <S2SV_EndBug> }
<S2SV_ModStart> ; db_arr -> dbs = NULL ; db_arr ->
8,393
CWE-000 static void wcd_mbhc_swch_irq_handler ( struct wcd_mbhc * mbhc ) { bool detection_type = false ; bool micbias1 = false ; struct snd_soc_codec * codec = mbhc -> codec ; dev_dbg ( codec -> dev , "%s:<S2SV_blank>enter\\n" , __func__ ) ; WCD_MBHC_RSC_LOCK ( mbhc ) ; mbhc -> in_swch_irq_handler = true ; if ( wcd_can...
<S2SV_ModStart> ; if ( <S2SV_ModEnd> mbhc -> mbhc_cb <S2SV_ModStart> ) ; } <S2SV_ModEnd> mbhc -> in_swch_irq_handler
8,394
CWE-000 PROCESS_THREAD ( serial_input_process , ev , data ) { PROCESS_BEGIN ( ) ; char delimiter [ ] = "<S2SV_blank>" ; char * command = NULL ; uint8_t flag ; char * value ; for ( ; ; ) { PROCESS_YIELD_UNTIL ( ev == serial_line_event_message ) ; command = ( char * ) strtok ( ( char * ) data , ( const char * ) delimiter...
<S2SV_ModStart> value ) ; <S2SV_ModEnd> } else {
8,395
CWE-000 void tree_destroy ( Tree * ptree ) { if ( tree_has_children ( ptree ) ) { int ichildren = tree_children_count ( ptree ) ; for ( int i = 0 ; i < ichildren ; i ++ ) tree_destroy ( tree_get_child ( ptree , i ) ) ; slist_free ( ptree -> pchildren ) ; <S2SV_StartBug> } <S2SV_EndBug> node_free ( ptree -> pnode ) ; <S...
<S2SV_ModStart> pchildren ) ; ptree -> pchildren = NULL ; <S2SV_ModStart> pnode ) ; ptree -> pnode = NULL <S2SV_ModEnd> ; } <S2SV_null>
8,396
CWE-000 netdev_tx_t usbnet_start_xmit ( struct sk_buff * skb , struct net_device * net ) { struct usbnet * dev = netdev_priv ( net ) ; int length ; struct urb * urb = NULL ; struct skb_data * entry ; struct driver_info * info = dev -> driver_info ; unsigned long flags ; int retval ; if ( skb ) skb_tx_timestamp ( skb ) ...
<S2SV_ModStart> transfer_buffer_length = length ; if ( ! ( info -> flags & FLAG_MULTI_PACKET ) ) usbnet_set_skb_tx_stats ( skb , 1 )
8,397
CWE-000 int fetch_governors ( char governors [ MAX_GOVERNORS ] [ MAX_GOVERNOR_LENGTH ] ) { glob_t glo = { 0 } ; static const char * path = "/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor" ; if ( glob ( path , GLOB_NOSORT , NULL , & glo ) != 0 ) { FATAL_ERRORNO ( "Broken<S2SV_blank>glob<S2SV_blank>implementation"...
<S2SV_ModStart> for ( int j = 0 ; j <S2SV_ModEnd> < num_governors ; <S2SV_ModStart> < num_governors ; j <S2SV_ModEnd> ++ ) {
8,398
CWE-000 static kal_int32 mx_srv_set_para_loc_prop ( kal_uint8 * in , kal_uint32 in_len ) { <S2SV_StartBug> kal_uint32 loc_prop = - 1 ; <S2SV_EndBug> if ( ! in || in_len != 4 ) return - 1 ; loc_prop |= in [ 0 ] ; loc_prop <<= 8 ; loc_prop |= in [ 1 ] ; loc_prop <<= 8 ; loc_prop |= in [ 2 ] ; loc_prop <<= 8 ; loc_prop |=...
<S2SV_ModStart> kal_uint32 loc_prop = 0 <S2SV_ModEnd> ; if (
8,399
CWE-000 void printScreen ( ) { int screen_id = ( ctrl0 & 0x01 ) ; int active_chr = ( ctrl0 & 0x10 ) ? 0x1000 : 0x0 ; int xp , yp ; int i , j , a , b , ch , fol , foh , at , color , bn ; int ADDRNT , ADDRPG , ADDRAT ; for ( i = 0 ; i < 30 ; i ++ ) { for ( j = 0 ; j < 32 ; j ++ ) { int scroll_y = ( i - coarse_y ) ; int s...
<S2SV_ModStart> ; color = ( cpu_running == 0 || ( <S2SV_ModStart> ctrl1 & 0x08 ) )