Unnamed: 0 int64 0 535k | source stringlengths 50 89.8k | target stringlengths 23 37.7k |
|---|---|---|
1,300 | CWE-000 <S2SV_StartBug> CITreeError CITree_Delete_Def ( struct CITree * self_ , void * element , size_t index ) <S2SV_EndBug> { CAssertObject ( self_ ) ; struct CCBinaryTree * self = CCast ( self_ ) ; CIListError err = CIList_Remove ( & self -> tree_backend . cIList , self -> swap_space_1 , index ) ; if ( err == CILIST... | <S2SV_ModStart> <S2SV_null> <S2SV_null> <S2SV_null> static <S2SV_ModStart> -> index ; err = <S2SV_ModStart> index ) ; err = |
1,301 | CWE-000 static void liferea_htmlview_proxy_changed ( NetworkMonitor * nm , gpointer userdata ) { LifereaHtmlView * htmlview = LIFEREA_HTMLVIEW ( userdata ) ; <S2SV_StartBug> ( RENDERER ( htmlview ) -> setProxy ) ( network_get_proxy_host ( ) , <S2SV_EndBug> network_get_proxy_port ( ) , network_get_proxy_username ( ) , n... | <S2SV_ModStart> setProxy ) ( network_get_proxy_detect_mode ( ) , |
1,302 | CWE-000 static bool neigh_master_filtered ( struct net_device * dev , int master_idx ) { struct net_device * master ; if ( ! master_idx ) return false ; <S2SV_StartBug> master = netdev_master_upper_dev_get ( dev ) ; <S2SV_EndBug> if ( ! master || master -> ifindex != master_idx ) return true ; return false ; } | <S2SV_ModStart> ; master = dev ? <S2SV_ModStart> ( dev ) : NULL |
1,303 | CWE-000 <S2SV_StartBug> void * const Pr_GetArrayData ( Pr_Array * ap_array ) <S2SV_EndBug> { return ap_array ? ap_array -> data : NULL ; } | <S2SV_ModStart> <S2SV_null> void * <S2SV_ModEnd> Pr_GetArrayData ( Pr_Array |
1,304 | CWE-000 void sdr_cache_init ( uint8_t slot_id ) { int ret ; int fd ; uint8_t rlen ; uint8_t rbuf [ MAX_IPMB_RES_LEN ] = { 0 } ; char * path = NULL ; char sdr_temp_path [ 64 ] = { 0 } ; char sdr_path [ 64 ] = { 0 } ; sprintf ( sdr_temp_path , "/tmp/tsdr_slot%d.bin" , slot_id ) ; sprintf ( sdr_path , "/tmp/sdr_slot%d.bin... | <S2SV_ModStart> * sdr = ( sdr_full_t * ) |
1,305 | CWE-000 void SOS_publish_from_buffer ( SOS_buffer * buffer , SOS_pub * pub , SOS_pipe * snap_queue ) { SOS_SET_CONTEXT ( pub -> sos_context , "SOS_publish_from_buffer" ) ; SOS_msg_header header ; SOS_data * data ; long this_frame ; int offset ; int elem ; if ( buffer == NULL ) { dlog ( 0 , "ERROR:<S2SV_blank>SOS_buffer... | <S2SV_ModStart> ) ; } <S2SV_ModEnd> dlog ( 7 <S2SV_ModStart> SOS_VAL_STATE_CLEAN ; } <S2SV_ModEnd> dlog ( 7 |
1,306 | CWE-000 int tick_itemstack ( struct world * world , struct entity * entity ) { if ( entity -> data . itemstack . delayBeforeCanPickup > 0 ) { entity -> data . itemstack . delayBeforeCanPickup -- ; return 0 ; } if ( entity -> age >= 6000 ) { pthread_rwlock_unlock ( & world -> entities -> data_mutex ) ; despawnEntity ( w... | <S2SV_ModStart> -> itemCount ; <S2SV_ModEnd> pthread_mutex_lock ( & <S2SV_ModStart> inventory -> mut <S2SV_ModEnd> ) ; if <S2SV_ModStart> -> players ) BREAK_HASHMAP_ITERATION ( entity -> world -> entities ) |
1,307 | CWE-000 static s32 wl_init_priv ( struct bcm_cfg80211 * cfg ) { struct wiphy * wiphy = bcmcfg_to_wiphy ( cfg ) ; struct net_device * ndev = bcmcfg_to_prmry_ndev ( cfg ) ; s32 err = 0 ; cfg -> scan_request = NULL ; cfg -> pwr_save = ! ! ( wiphy -> flags & WIPHY_FLAG_PS_ON_BY_DEFAULT ) ; cfg -> roam_on = false ; cfg -> a... | <S2SV_ModStart> cfgdrv_lock ) ; spin_lock_init ( & cfg -> cfgp2p_lock ) ; |
1,308 | CWE-000 int mariadb_dr_discon_all ( SV * drh , imp_drh_t * imp_drh ) { dTHX ; dSP ; int ret ; SV * * svp ; AV * av ; I32 i ; PERL_UNUSED_ARG ( drh ) ; if ( imp_drh -> taken_pmysqls ) { for ( i = AvFILL ( imp_drh -> taken_pmysqls ) ; i >= 0 ; -- i ) { svp = av_fetch ( imp_drh -> taken_pmysqls , i , FALSE ) ; if ( ! svp ... | <S2SV_ModStart> non_embedded_started ) { # ifndef HAVE_BROKEN_INIT warn ( "DBD::MariaDB<S2SV_blank>disconnect_all:<S2SV_blank>Client<S2SV_blank>library<S2SV_blank>was<S2SV_blank>not<S2SV_blank>properly<S2SV_blank>deinitialized<S2SV_blank>(possible<S2SV_blank>bug<S2SV_blank>in<S2SV_blank>driver)" ) ; ret = 0 ; # else <S... |
1,309 | CWE-000 <S2SV_StartBug> void * NV_NodeID_getDataAsType ( const NV_ID * id , NV_NodeType type ) <S2SV_EndBug> { NV_Node * n ; n = NV_NodeID_getNode ( id ) ; return NV_Node_getDataAsType ( n , type ) ; } | <S2SV_ModStart> <S2SV_null> <S2SV_null> <S2SV_null> const |
1,310 | CWE-000 void heater_gpio_task ( void * pvParameter ) { gpio_pad_select_gpio ( BLUE_LED ) ; gpio_pad_select_gpio ( HEATER_GPIO ) ; gpio_set_direction ( HEATER_GPIO , GPIO_MODE_OUTPUT ) ; gpio_set_direction ( BLUE_LED , GPIO_MODE_OUTPUT ) ; static int loop_i = 0 ; while ( 1 ) { <S2SV_StartBug> ESP_LOGD ( TAG , "heater><S... | <S2SV_ModStart> 1 ) { ESP_LOGI <S2SV_ModEnd> ( TAG , <S2SV_ModStart> ( HEATER_GPIO , 1 ) ; gpio_set_level ( BLUE_LED , 1 ) ; ESP_LOGI ( TAG , "heater><S2SV_blank>Up<S2SV_blank>on" <S2SV_ModEnd> ) ; vTaskDelay <S2SV_ModStart> ( HEATER_GPIO , 0 ) ; gpio_set_level ( BLUE_LED , 0 ) ; ESP_LOGI ( TAG , "heater><S2SV_blank>Do... |
1,311 | CWE-000 void perfectErrorCorrection ( ) { char verbose = 0 ; int i ; int round = 0 ; int change = 0 ; int oldchange ; int pro = 0 ; char * dotFile = ( char * ) malloc ( sizeof ( char ) * 100 ) ; do { printf ( "ErrorCorrection<S2SV_blank>Round<S2SV_blank>%i\\n" , round ) ; countKmers ( ) ; change = 0 ; for ( i = 1 ; i <... | <S2SV_ModStart> ; printf ( "%i<S2SV_blank>%%<S2SV_blank>(%i)<S2SV_blank>of<S2SV_blank>reads<S2SV_blank>Corrected\\n" <S2SV_ModEnd> , pro , |
1,312 | CWE-000 void nrf51_tag_db_initialize ( void ) { DBG_DB_INITIALIZE ( ) ; <S2SV_StartBug> nrf51_tag_db_entry_count_scan ( ) ; <S2SV_EndBug> } | <S2SV_ModStart> ( ) ; nrf51_tag_db_erase ( ) ; |
1,313 | CWE-000 static gboolean _gl_tex_create ( GstGLMemory * gl_mem , GError * * error ) { GstGLContext * context = gl_mem -> mem . context ; GLenum internal_format ; GLenum tex_format ; GLenum tex_type ; tex_format = gl_mem -> tex_format ; tex_type = GL_UNSIGNED_BYTE ; <S2SV_StartBug> if ( gl_mem -> tex_format == GST_GL_RGB... | <S2SV_ModStart> == GST_GL_RGB565 ) { tex_format = GST_GL_RGB ; <S2SV_ModStart> = GL_UNSIGNED_SHORT_5_6_5 ; } |
1,314 | CWE-000 static void mlx5i_init ( struct mlx5_core_dev * mdev , struct net_device * netdev , const struct mlx5e_profile * profile , void * ppriv ) { struct mlx5e_priv * priv = mlx5i_epriv ( netdev ) ; priv -> mdev = mdev ; priv -> netdev = netdev ; priv -> profile = profile ; priv -> ppriv = ppriv ; mlx5e_build_nic_para... | <S2SV_ModStart> ) ) ; mlx5e_set_rq_type_params ( mdev , & priv -> channels . params , MLX5_WQ_TYPE_LINKED_LIST ) ; priv -> channels . params . lro_en = false ; |
1,315 | CWE-000 int log_enqueue ( int prio , const char * fmt , va_list ap ) { int len , fwd ; char buff [ MAX_MSG_SIZE ] ; struct logmsg * msg ; struct logmsg * lastmsg ; lastmsg = ( struct logmsg * ) la -> tail ; if ( ! la -> empty ) { fwd = sizeof ( struct logmsg ) + strlen ( ( char * ) & lastmsg -> str ) * sizeof ( char ) ... | <S2SV_ModStart> la -> tail = lastmsg <S2SV_ModEnd> ; return 1 |
1,316 | CWE-000 void kmain ( ) { term_init ( ) ; show_hello_message ( ) ; gdt_install ( ) ; idt_install ( ) ; irq_install ( ) ; init_pageframe_allocator ( ) ; init_paging ( ) ; initialize_kmalloc ( ) ; set_timer_freq ( TIMER_HZ ) ; irq_set_mask ( 7 ) ; irq_install_handler ( X86_PC_TIMER_IRQ , timer_handler ) ; irq_install_hand... | <S2SV_ModStart> ; kthread_create ( simple_test_kthread ) ; kthread_create ( tasklet_runner_kthread <S2SV_ModEnd> ) ; run_usermode_init |
1,317 | CWE-000 void md_check_recovery ( struct mddev * mddev ) { if ( mddev -> suspended ) return ; if ( mddev -> bitmap ) bitmap_daemon_work ( mddev ) ; if ( signal_pending ( current ) ) { if ( mddev -> pers -> sync_request && ! mddev -> external ) { pr_debug ( "md:<S2SV_blank>%s<S2SV_blank>in<S2SV_blank>immediate<S2SV_blank... | <S2SV_ModStart> mddev -> recovery <S2SV_ModEnd> ) || ( <S2SV_ModStart> ) ; } <S2SV_ModEnd> } if ( |
1,318 | CWE-000 static pj_bool_t endpoint_lookup ( pjsip_rx_data * rdata ) { struct ast_sip_endpoint * endpoint ; struct unidentified_request * unid ; int is_ack = rdata -> msg_info . msg -> line . req . method . id == PJSIP_ACK_METHOD ; endpoint = rdata -> endpt_info . mod_data [ endpoint_mod . id ] ; if ( endpoint ) { unid =... | <S2SV_ModStart> ) ; } apply_acls ( rdata ) ; <S2SV_ModStart> ; } } apply_acls ( rdata ) ; |
1,319 | CWE-000 int lpfc_hba_init_link ( struct lpfc_hba * phba ) { struct lpfc_vport * vport = phba -> pport ; LPFC_MBOXQ_t * pmb ; MAILBOX_t * mb ; int rc ; pmb = mempool_alloc ( phba -> mbox_mem_pool , GFP_KERNEL ) ; if ( ! pmb ) { phba -> link_state = LPFC_HBA_ERROR ; return - ENOMEM ; } mb = & pmb -> u . mb ; pmb -> vport... | <S2SV_ModStart> -> cfg_suppress_link_up = LPFC_INITIALIZE_LINK <S2SV_ModEnd> ; return 0 |
1,320 | CWE-000 void sim_stop_timer_services ( void ) { int tmr ; sim_debug ( DBG_TRC , & sim_timer_dev , "sim_stop_timer_services()\\n" ) ; for ( tmr = 0 ; tmr <= SIM_NTIMERS ; tmr ++ ) { int32 accum ; if ( sim_clock_unit [ tmr ] ) { sim_cancel ( & sim_timer_units [ tmr ] ) ; if ( rtc_hz [ tmr ] ) sim_activate ( sim_clock_uni... | <S2SV_ModStart> sim_wallclock_queue ; double inst_delay_d = uptr -> a_due_gtime - sim_gtime <S2SV_ModEnd> ( ) ; <S2SV_ModStart> int32 inst_delay ; <S2SV_ModEnd> uptr -> cancel <S2SV_ModStart> ; if ( inst_delay_d <S2SV_ModEnd> < 0.0 ) <S2SV_ModStart> < 0.0 ) inst_delay_d <S2SV_ModEnd> = 0.0 ; <S2SV_ModStart> = 0.0 ; <S2... |
1,321 | CWE-000 static bool G_CheckSpot ( int playernum , mapthing_t * mthing ) { fixed_t x ; fixed_t y ; fixed_t xa ; fixed_t ya ; subsector_t * ss ; int i ; int an ; mobj_t * mo ; if ( ! players [ playernum ] . mo ) { for ( i = 0 ; i < playernum ; i ++ ) { if ( ! players [ i ] . mo ) { continue ; } if ( players [ i ] . mo ->... | <S2SV_ModStart> FRACBITS ) { <S2SV_ModEnd> return false ; |
1,322 | CWE-000 object newSymbol ( str ) char * str ; { int hash ; object newSym , link ; char * p ; hash = 0 ; for ( p = str ; * p ; p ++ ) hash += * p ; if ( hash < 0 ) hash = - hash ; hash = 2 * ( hash % ( objectSize ( symbols ) / 2 ) ) ; newSym = basicAt ( symbols , hash + 1 ) ; <S2SV_StartBug> if ( streq ( str , charPtr (... | <S2SV_ModStart> ; if ( charPtr ( newSym ) != NULL && |
1,323 | CWE-000 int posix_handle_pair ( xlator_t * this , const char * real_path , char * key , data_t * value , int flags , struct iatt * stbuf ) { int sys_ret = - 1 ; int ret = 0 ; # ifdef GF_DARWIN_HOST_OS const int error_code = EINVAL ; # else const int error_code = EEXIST ; # endif if ( XATTR_IS_PATHINFO ( key ) ) { ret =... | <S2SV_ModStart> ; goto out <S2SV_ModEnd> ; } else |
1,324 | CWE-000 static void np2srv_module_install_clb ( const char * module_name , const char * revision , sr_module_state_t state , void * UNUSED ( private_ctx ) ) { int rc ; char * data = NULL ; const struct lys_module * mod ; sr_schema_t * schemas = NULL ; size_t count , i , j ; if ( state == SR_MS_IMPLEMENTED ) { rc = sr_g... | <S2SV_ModStart> SR_ERR_OK ) { pthread_rwlock_unlock ( & np2srv . ly_ctx_lock ) ; |
1,325 | CWE-000 static void cmd_parse_list ( struct ImapData * idata , char * s ) { struct ImapList * list = NULL ; struct ImapList lb ; char delimbuf [ 5 ] ; <S2SV_StartBug> long litlen ; <S2SV_EndBug> if ( idata -> cmddata && idata -> cmdtype == IMAP_CT_LIST ) list = ( struct ImapList * ) idata -> cmddata ; else list = & lb ... | <S2SV_ModStart> 5 ] ; unsigned int <S2SV_ModEnd> litlen ; if |
1,326 | CWE-000 static int decode_subframe ( TAKDecContext * s , int32_t * decoded , int subframe_size , int prev_subframe_size ) { GetBitContext * gb = & s -> gb ; int x , y , i , j , ret = 0 ; int dshift , size , filter_quant , filter_order ; int tfilter [ MAX_PREDICTORS ] ; if ( ! get_bits1 ( gb ) ) return decode_residues (... | <S2SV_ModStart> ) v += ( unsigned ) |
1,327 | CWE-000 <S2SV_StartBug> int pthread_setspecific ( pthread_key_t k , const void * value ) { <S2SV_EndBug> struct pthread_key_specific * specific ; struct pthread_key * key ; int res ; res = list_get ( & key_list , k , ( void * * ) & key ) ; if ( res ) { return res ; } specific = ( struct pthread_key_specific * ) malloc ... | <S2SV_ModStart> int pthread_setspecific ( _pthread_key_t <S2SV_ModEnd> k , const |
1,328 | CWE-000 void print_list ( Cell * list ) { char string [ MAX_PRINT_EXPR_LENGTH + 1 ] ; <S2SV_StartBug> if ( list == NULL ) { <S2SV_EndBug> string [ 0 ] = 'T' ; string [ 1 ] = '\\n' ; string [ 2 ] = '\\0' ; } else if ( list -> type == SYS_SYM_NUM ) { sprintf ( string , "%.*d\\n" , - MAX_PRINT_EXPR_LENGTH , ( int ) ( uint... | <S2SV_ModStart> 1 ] ; <S2SV_ModEnd> int index = <S2SV_ModStart> index = 0 ; print_list_helper ( list , string , & index , false ) <S2SV_ModStart> index ] = <S2SV_ModEnd> '\\0' ; printf <S2SV_ModStart> ; printf ( "%s\\n" <S2SV_ModEnd> , string ) |
1,329 | CWE-000 Int Parser_GetFatalErrorCount ( Parser parser ) { Int count = 0 ; <S2SV_StartBug> for ( SmileList list = parser -> firstMessage ; SMILE_KIND ( list ) != SMILE_KIND_NULL ; list = LIST_REST ( list ) ) { <S2SV_EndBug> if ( ( ( ParseMessage ) list -> a ) -> messageKind == PARSEMESSAGE_FATAL ) count ++ ; } return co... | <S2SV_ModStart> = 0 ; SmileList list ; for ( <S2SV_ModEnd> list = parser |
1,330 | CWE-000 static int binder_mmap ( struct file * filp , struct vm_area_struct * vma ) { int ret ; struct vm_struct * area ; struct binder_proc * proc = filp -> private_data ; const char * failure_string ; struct binder_buffer * buffer ; <S2SV_StartBug> if ( proc -> tsk != current ) <S2SV_EndBug> return - EINVAL ; if ( ( ... | <S2SV_ModStart> tsk != current -> group_leader |
1,331 | CWE-000 <S2SV_StartBug> int build_job ( int readfd , client_t * client , joblist_t * joblist ) <S2SV_EndBug> { pid_t jpid ; if ( read ( readfd , & jpid , sizeof ( int ) ) != sizeof ( int ) <S2SV_StartBug> || add_job ( jpid , getpid ( ) , readfd , client , joblist ) < 0 ) <S2SV_EndBug> <S2SV_StartBug> { <S2SV_EndBug> re... | <S2SV_ModStart> ( int readfd , pid_t mpid <S2SV_ModStart> ( jpid , mpid <S2SV_ModEnd> , readfd , <S2SV_ModStart> 0 ) { kill ( mpid , SIGINT ) ; waitpid ( mpid , NULL , 0 ) ; |
1,332 | CWE-000 void chick_reslash ( edict_t * self ) { if ( self -> enemy -> health > 0 ) { <S2SV_StartBug> if ( range ( self , self -> enemy ) == RANGE_MELEE ) <S2SV_EndBug> if ( random ( ) <= 0.9 ) { self -> monsterinfo . currentmove = & chick_move_slash ; return ; } else { self -> monsterinfo . currentmove = & chick_move_e... | <S2SV_ModStart> == RANGE_MELEE ) { <S2SV_ModStart> ; } } } |
1,333 | CWE-000 void print_stack ( struct Stack stack ) { <S2SV_StartBug> if ( isempty ( stack ) ) return ; <S2SV_EndBug> for ( int i = stack . size - 1 ; i >= 0 ; -- i ) { printf ( "%s\\n" , stack . array [ i ] ) ; } } | <S2SV_ModStart> ) ) return ; printf ( "\\n" ) |
1,334 | CWE-000 static struct nf_conn * get_next_corpse ( struct net * net , int ( * iter ) ( struct nf_conn * i , void * data ) , void * data , unsigned int * bucket ) { struct nf_conntrack_tuple_hash * h ; struct nf_conn * ct ; <S2SV_StartBug> struct hlist_nulls_node * n ; <S2SV_EndBug> int cpu ; spinlock_t * lockp ; for ( ;... | <S2SV_ModStart> hlist_nulls_node * n <S2SV_ModEnd> ; spinlock_t * <S2SV_ModStart> ) ; } <S2SV_ModEnd> return NULL ; |
1,335 | CWE-000 void register_chunk ( Chunk * header ) { <S2SV_StartBug> Bin * bin = get_smallest_bin ( header ) ; <S2SV_EndBug> add_chunk ( bin , header ) ; } | <S2SV_ModStart> header ) { size_t size = get_chunk_size ( header ) ; <S2SV_ModStart> = get_smallest_bin ( size <S2SV_ModEnd> ) ; add_chunk |
1,336 | CWE-000 <S2SV_StartBug> int check_target_type ( int c_type ) <S2SV_EndBug> { <S2SV_StartBug> if ( c_type >= 0x4000 && c_type <= 0x7FFF ) { <S2SV_EndBug> return 1 ; } switch ( c_type ) { case SQL_C_CHAR : case SQL_C_LONG : case SQL_C_SHORT : case SQL_C_FLOAT : case SQL_C_NUMERIC : case SQL_C_DEFAULT : case SQL_C_DATE : ... | <S2SV_ModStart> ( int c_type , int connection_mode <S2SV_ModStart> { if ( connection_mode >= SQL_OV_ODBC3_80 && |
1,337 | CWE-000 void R_init_validate ( DllInfo * info ) { R_registerRoutines ( info , NULL , callMethods , NULL , NULL ) ; VALC_SYM_quote = install ( "quote" ) ; VALC_SYM_deparse = install ( "deparse" ) ; VALC_SYM_one_dot = install ( "." ) ; VALC_SYM_paren = install ( "(" ) ; VALC_SYM_current = install ( "current" ) ; VALC_SYM... | <S2SV_ModStart> CSR_collapse = ( <S2SV_ModEnd> char * ( |
1,338 | CWE-000 static int faultin_page ( struct task_struct * tsk , struct vm_area_struct * vma , unsigned long address , unsigned int * flags , int * nonblocking ) { struct mm_struct * mm = vma -> vm_mm ; unsigned int fault_flags = 0 ; int ret ; if ( * flags & FOLL_WRITE ) fault_flags |= FAULT_FLAG_WRITE ; if ( nonblocking )... | <S2SV_ModStart> ) * flags |= FOLL_COW <S2SV_ModEnd> ; return 0 |
1,339 | CWE-000 extern void moveSnek ( snek * snek ) { <S2SV_StartBug> pthread_mutex_lock ( & snek -> moveLock ) ; <S2SV_EndBug> segm * segHead = snek -> seg ; while ( segHead -> next != NULL ) { if ( segHead -> d == 1 && ( segHead -> y + 1 ) == 50 ) segHead -> y = - 1 ; if ( segHead -> d == 3 && ( segHead -> y ) == 0 ) segHea... | <S2SV_ModStart> snek ) { <S2SV_ModEnd> segm * segHead <S2SV_ModStart> snek ) ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null> |
1,340 | CWE-000 int ifconfig_media_get_mediareq ( ifconfig_handle_t * h , const char * name , struct ifmediareq * * ifmr ) { struct _ifconfig_media_status * ms , * ms2 ; unsigned long cmd = SIOCGIFXMEDIA ; <S2SV_StartBug> int s ; <S2SV_EndBug> * ifmr = NULL ; <S2SV_StartBug> if ( ifconfig_socket ( h , AF_LOCAL , & s ) != 0 ) {... | <S2SV_ModStart> = SIOCGIFXMEDIA ; <S2SV_ModEnd> * ifmr = <S2SV_ModStart> = NULL ; <S2SV_ModEnd> ms = calloc <S2SV_ModStart> ; if ( ifconfig_ioctlwrap ( h , AF_LOCAL <S2SV_ModEnd> , cmd , <S2SV_ModStart> ; if ( ifconfig_ioctlwrap ( h , AF_LOCAL <S2SV_ModEnd> , cmd , <S2SV_ModStart> ; if ( ifconfig_ioctlwrap ( h , AF_LOC... |
1,341 | CWE-000 static int hw_card_start ( struct hw * hw ) { int err ; struct pci_dev * pci = hw -> pci ; <S2SV_StartBug> err = pci_enable_device ( pci ) ; <S2SV_EndBug> if ( err < 0 ) return err ; <S2SV_StartBug> if ( pci_set_dma_mask ( pci , CT_XFI_DMA_MASK ) < 0 || <S2SV_EndBug> pci_set_consistent_dma_mask ( pci , CT_XFI_D... | <S2SV_ModStart> -> pci ; const unsigned int dma_bits = BITS_PER_LONG ; <S2SV_ModStart> ; if ( dma_set_mask ( & pci -> dev , DMA_BIT_MASK ( dma_bits ) ) ) { dma_set_coherent_mask ( & pci -> dev , DMA_BIT_MASK ( dma_bits ) ) ; } else { dma_set_mask ( & pci -> dev , DMA_BIT_MASK ( 32 ) ) ; dma_set_coherent_mask ( & pci ->... |
1,342 | CWE-000 static void view_details_init ( GTypeInstance * object , gpointer gclass ) { GtkTreeView * treeview = ( GtkTreeView * ) object ; GtkTreeViewColumn * column ; GtkCellRenderer * cell ; ViewDetails * view_details = ( ViewDetails * ) object ; view_details -> items = g_ptr_array_new ( ) ; view_details -> cursor_base... | <S2SV_ModStart> view_details , NULL <S2SV_ModEnd> ) ; view_details |
1,343 | CWE-000 Res TraceStart ( Trace trace , double mortality , double finishingTime ) { Arena arena ; Res res ; AVERT ( Trace , trace ) ; AVER ( trace -> state == TraceINIT ) ; AVER ( 0.0 <= mortality ) ; AVER ( mortality <= 1.0 ) ; AVER ( finishingTime >= 0.0 ) ; AVER ( trace -> condemned > 0 ) ; arena = trace -> arena ; <... | <S2SV_ModStart> -> arena ; # ifdef TRACE_DEBUG if ( trace -> whiteTable ) TableMap ( trace -> whiteTable , checkWhite , trace ) ; # endif |
1,344 | CWE-000 static bool heap_get_region ( struct mpvk_ctx * vk , struct vk_heap * heap , size_t size , size_t align , struct vk_slab * * out_slab , int * out_index ) { <S2SV_StartBug> if ( ! heap ) <S2SV_EndBug> return false ; struct vk_slab * slab = NULL ; if ( size > MPVK_HEAP_MAXIMUM_SLAB_SIZE ) { slab = slab_alloc ( vk... | <S2SV_ModStart> out_index ) { <S2SV_ModEnd> struct vk_slab * |
1,345 | CWE-000 void flexsea_send_serial_master ( PacketWrapper * p ) { Port port = p -> port ; uint8_t * str = p -> packed ; <S2SV_StartBug> uint8_t length = COMM_STR_BUF_LEN ; <S2SV_EndBug> int i = 0 ; if ( port == PORT_SPI ) { for ( i = 0 ; i < length ; i ++ ) { comm_str_spi [ i ] = str [ i ] ; } } else if ( port == PORT_US... | <S2SV_ModStart> -> packed ; uint16_t <S2SV_ModEnd> length = COMM_STR_BUF_LEN |
1,346 | CWE-000 int hit_io_err_recheck_time ( struct path * pp ) { struct timespec curr_time ; int r ; <S2SV_StartBug> if ( pp -> io_err_disable_reinstate == 0 ) <S2SV_EndBug> return 1 ; if ( clock_gettime ( CLOCK_MONOTONIC , & curr_time ) != 0 ) return 1 ; if ( pp -> io_err_pathfail_cnt != PATH_IO_ERR_IN_POLLING_RECHECK ) ret... | <S2SV_ModStart> ( pp -> mpp -> nr_active <= 0 ) { io_err_stat_log ( 2 , "%s:<S2SV_blank>recover<S2SV_blank>path<S2SV_blank>early" , pp -> dev ) ; goto recover ; } <S2SV_ModEnd> if ( pp <S2SV_ModStart> ; if ( clock_gettime ( CLOCK_MONOTONIC , & curr_time ) != 0 || <S2SV_ModEnd> ( curr_time . |
1,347 | CWE-000 int cm_AlignSizeNeededHB ( CM_t * cm , char * errbuf , int L , float size_limit , int do_sample , int do_post , float * ret_mxmb , float * ret_emxmb , float * ret_shmxmb , float * ret_totmb ) { int status ; float totmb = 0. ; float mxmb = 0. ; float emxmb = 0. ; float shmxmb = 0. ; if ( ( status = cm_hb_mx_Size... | <S2SV_ModStart> 1 printf ( "#DEBUG:<S2SV_blank>cm_AlignSizeNeededHB()\\n" ) ; printf ( "#DEBUG:<S2SV_blank>\\t<S2SV_blank>mxmb:<S2SV_blank><S2SV_blank>%.2f\\n" , mxmb ) ; printf ( "#DEBUG:<S2SV_blank>\\t<S2SV_blank>emxmb:<S2SV_blank>%.2f\\n" , emxmb ) ; printf ( "#DEBUG:<S2SV_blank>\\t<S2SV_blank>shmxmb:%.2f\\n" , shmx... |
1,348 | CWE-000 int main ( void ) { node_t * root = NULL ; <S2SV_StartBug> insert ( & root , 2 ) ; <S2SV_EndBug> insert ( & root , 13 ) ; insert ( & root , 100 ) ; insert ( & root , 3 ) ; insert ( & root , 5 ) ; insert ( & root , 8 ) ; insert ( & root , 0 ) ; insert ( & root , 4 ) ; insert ( & root , 20 ) ; show ( root ) ; del... | <S2SV_ModStart> = NULL ; show ( root ) ; delete ( & root , 1 ) ; show ( root ) ; delete_all ( & root ) ; show ( root ) ; |
1,349 | CWE-000 noreturn void usage ( int status ) { FILE * out = status ? stderr : stdout ; fprintf ( out , "%s<S2SV_blank>v%s\\nUsage:<S2SV_blank>%s<S2SV_blank>[OPTION]...<S2SV_blank>{FILE}\\n" , PROGRAM_NAME , VERSION , PROGRAM_NAME ) ; <S2SV_StartBug> fputs ( "\\\n<S2SV_blank>Convert<S2SV_blank>all<S2SV_blank>images<S2SV_b... | <S2SV_ModStart> ; fputs ( "\\\nConvert<S2SV_blank>all<S2SV_blank>images<S2SV_blank>with<S2SV_blank>base64<S2SV_blank>encoding.\\n\\\nChanges<S2SV_blank><img><S2SV_blank>tags<S2SV_blank>of<S2SV_blank>HTML<S2SV_blank>file<S2SV_blank>\'FILE\'<S2SV_blank>with<S2SV_blank>their<S2SV_blank>base64<S2SV_blank>strings<S2SV_blank... |
1,350 | CWE-000 START_TEST ( test_parse_cpuset_3 ) { char str [ STR_LEN ] ; cpu_set_t cpuset ; CPU_ZERO ( & cpuset ) ; CPU_SET ( 0 , & cpuset ) ; CPU_SET ( 1 , & cpuset ) ; CPU_SET ( 2 , & cpuset ) ; CPU_SET ( 4 , & cpuset ) ; CPU_SET ( 5 , & cpuset ) ; CPU_SET ( 9 , & cpuset ) ; CPU_SET ( 11 , & cpuset ) ; <S2SV_StartBug> par... | <S2SV_ModStart> cpuset ) ; cpuset_tostr <S2SV_ModEnd> ( & cpuset |
1,351 | CWE-000 static inline enum comp_state check_ack ( struct rxe_qp * qp , struct rxe_pkt_info * pkt , struct rxe_send_wqe * wqe ) { unsigned int mask = pkt -> mask ; u8 syn ; switch ( qp -> comp . opcode ) { case - 1 : if ( ! ( mask & RXE_START_MASK ) ) return COMPST_ERROR ; break ; case IB_OPCODE_RC_RDMA_READ_RESPONSE_FI... | <S2SV_ModStart> IB_WR_RDMA_READ_WITH_INV ) { wqe -> status = IB_WC_FATAL_ERR ; |
1,352 | CWE-000 void * threadConnectionHandler ( void * data ) { struct connection * clientConnection ; rc = pthread_mutex_lock ( & connectionMutex ) ; <S2SV_StartBug> int threadId = * ( int * ) data ; <S2SV_EndBug> while ( 1 ) { if ( numConnections > 0 ) { clientConnection = getConnection ( & connectionMutex ) ; if ( clientCo... | <S2SV_ModStart> = * ( ( <S2SV_ModStart> * ) data ) <S2SV_ModStart> clientConnection ) { pthread_mutex_lock ( & activeConnectionMutex ) ; numActiveConnections ++ ; pthread_mutex_unlock ( & activeConnectionMutex ) <S2SV_ModEnd> ; threads [ <S2SV_ModStart> = NO_ACTIVE_CONNECTION ; pthread_mutex_lock ( & activeConnectionMu... |
1,353 | CWE-000 gboolean ostree_repo_write_metadata ( OstreeRepo * self , OstreeObjectType objtype , const char * expected_checksum , GVariant * object , guchar * * out_csum , GCancellable * cancellable , GError * * error ) { g_autoptr ( GVariant ) normalized = NULL ; if ( expected_checksum ) { gboolean have_obj ; if ( ! _ostr... | <S2SV_ModStart> if ( have_obj && ! ( ostree_repo_get_mode ( self ) == OSTREE_REPO_MODE_ARCHIVE_Z2 && self -> generate_sizes ) |
1,354 | CWE-000 <S2SV_StartBug> static void xgene_gpio_sb_domain_activate ( struct irq_domain * d , <S2SV_EndBug> <S2SV_StartBug> struct irq_data * irq_data ) <S2SV_EndBug> { struct xgene_gpio_sb * priv = d -> host_data ; u32 gpio = HWIRQ_TO_GPIO ( priv , irq_data -> hwirq ) ; if ( gpiochip_lock_as_irq ( & priv -> gc , gpio ) ... | <S2SV_ModStart> <S2SV_null> <S2SV_null> static int <S2SV_ModEnd> xgene_gpio_sb_domain_activate ( struct <S2SV_ModStart> irq_data * irq_data , bool early <S2SV_ModStart> ) ; return - ENOSPC <S2SV_ModStart> 1 ) ; return 0 ; |
1,355 | CWE-000 void prepare_alt_odb ( void ) { const char * alt ; if ( alt_odb_tail ) return ; alt = getenv ( ALTERNATE_DB_ENVIRONMENT ) ; if ( ! alt ) alt = "" ; alt_odb_tail = & alt_odb_list ; <S2SV_StartBug> link_alt_odb_entries ( alt , strlen ( alt ) , PATH_SEP , NULL , 0 ) ; <S2SV_EndBug> read_info_alternates ( get_objec... | <S2SV_ModStart> ( alt , <S2SV_ModEnd> PATH_SEP , NULL |
1,356 | CWE-000 void ary1Mpsr ( AryACB * acb , HDSLoc * loc , const char * type , const char * mode , char bad , HDSLoc * * mloc , char * copy , void * * pntr , char * dce , int * status ) { AryDCB * dcb ; AryMCB * mcb ; HDSLoc * tloc = NULL ; char extyp [ DAT__SZTYP + 1 ] ; char newbad ; hdsdim dim [ ARY__MXDIM ] ; hdsdim dim... | <S2SV_ModStart> , dimu , * <S2SV_ModStart> -> scloc , * <S2SV_ModStart> -> scloc , * <S2SV_ModStart> , el , * |
1,357 | CWE-000 void nautilus_files_view_pop_up_background_context_menu ( NautilusFilesView * view , GdkEventButton * event ) { NautilusFilesViewPrivate * priv ; g_assert ( NAUTILUS_IS_FILES_VIEW ( view ) ) ; priv = nautilus_files_view_get_instance_private ( view ) ; update_context_menus_if_pending ( view ) ; <S2SV_StartBug> n... | <S2SV_ModStart> background_menu , event , NULL |
1,358 | CWE-000 PHP_FUNCTION ( opencc_error ) { <S2SV_StartBug> } <S2SV_EndBug> | <S2SV_ModStart> opencc_error ) { int len ; if ( zend_parse_parameters_none ( ) == FAILURE ) { return ; } const char * msg ; msg = opencc_error ( ) ; if ( NULL == msg ) { msg = "" ; } len = strlen ( msg ) ; # if PHP_MAJOR_VERSION < 7 RETURN_STRINGL ( msg , len , 0 ) ; # else zend_string * ret = zend_string_alloc ( len ,... |
1,359 | CWE-000 static GPtrArray * setup_build_args ( GFile * app_dir , const char * module_name , BuilderContext * context , GFile * source_dir , const char * cwd_subdir , char * * flatpak_opts , char * * env_vars , GFile * * cwd_file ) { g_autoptr ( GPtrArray ) args = NULL ; g_autofree char * source_dir_path = g_file_get_pat... | <S2SV_ModStart> ; source_dir_path_canonical = realpath ( source_dir_path , NULL <S2SV_ModEnd> ) ; if |
1,360 | CWE-000 void deliverMail ( faction * f , region * r , unit * u , const char * s , unit * receiver ) { <S2SV_StartBug> if ( ! cansee ( f , r , u , 0 ) ) { <S2SV_EndBug> u = NULL ; } if ( ! receiver ) { ADDMSG ( & f -> msgs , msg_message ( "regionmessage" , "region<S2SV_blank>sender<S2SV_blank>string" , r , u , s ) ) ; }... | <S2SV_ModStart> u , 0 , seen_unit |
1,361 | CWE-000 int main ( int argc , char * * argv ) { IntS year , iter , incr ; Bool killedany ; logged = FALSE ; atexit ( check_log ) ; isPartialSoilwatOutput = TRUE ; storeAllIterations = FALSE ; init_args ( argc , argv ) ; printf ( "STEPWAT<S2SV_blank><S2SV_blank>init_args()<S2SV_blank>executed<S2SV_blank>successfully<S2S... | <S2SV_ModStart> } # endif SW_OUT_close_files ( ) ; |
1,362 | CWE-000 int qemuDomainNamespaceSetupMemory ( virQEMUDriverPtr driver , virDomainObjPtr vm , virDomainMemoryDefPtr mem ) <S2SV_StartBug> { <S2SV_EndBug> int ret = - 1 ; if ( mem -> model != VIR_DOMAIN_MEMORY_MODEL_NVDIMM ) return 0 ; if ( ! qemuDomainNamespaceEnabled ( vm , QEMU_DOMAIN_NS_MOUNT ) ) return 0 ; <S2SV_Star... | <S2SV_ModStart> mem ) { virQEMUDriverConfigPtr cfg = NULL ; char * * devMountsPath = NULL ; size_t ndevMountsPath = 0 ; <S2SV_ModStart> return 0 ; cfg = virQEMUDriverGetConfig ( driver ) ; if ( qemuDomainGetPreservedMounts ( cfg , vm , & devMountsPath , NULL , & ndevMountsPath ) < 0 ) goto cleanup ; <S2SV_ModStart> mem... |
1,363 | CWE-000 static void unshare_connection ( struct connection * c ) { c -> name = clone_str ( c -> name , "connection<S2SV_blank>name" ) ; c -> cisco_dns_info = clone_str ( c -> cisco_dns_info , "connection<S2SV_blank>cisco_dns_info" ) ; c -> modecfg_domain = clone_str ( c -> modecfg_domain , "connection<S2SV_blank>modecf... | <S2SV_ModStart> ai ) ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null> |
1,364 | CWE-000 int main ( void ) { Bootstrap ( ) ; printf ( "============><S2SV_blank>Start<S2SV_blank>System<S2SV_blank>Tests\\n\\n" ) ; printf ( "=><S2SV_blank>Test0:<S2SV_blank>check<S2SV_blank>error<S2SV_blank>description\\n" ) ; { const char * error ; assert ( ( error = System_getError ( EINVAL ) ) != NULL ) ; printf ( "... | <S2SV_ModStart> ; printf ( "=><S2SV_blank>Test1:<S2SV_blank>check<S2SV_blank>filedescriptors<S2SV_blank>wrapper\\n" ) ; { assert ( System_getDescriptorsGuarded ( 10 ) == 10 ) ; } printf ( "=><S2SV_blank>Test1:<S2SV_blank>OK\\n\\n" ) ; printf ( |
1,365 | CWE-000 static void write_dep_information ( dep_info * dep ) { FILE * fd = fopen ( dep -> path , "w+" ) ; if ( ! fd ) fatal ( "redo:<S2SV_blank>failed<S2SV_blank>to<S2SV_blank>open<S2SV_blank>%s" , dep -> path ) ; char hash [ 41 ] ; sha1_to_hex ( dep -> hash , hash ) ; <S2SV_StartBug> char * flags = dep -> flags & DEP_... | <S2SV_ModStart> * flags = ( <S2SV_ModStart> flags & DEP_SOURCE ) |
1,366 | CWE-000 void check_tore_inter ( t_rt * rt , int type ) { double tmp ; if ( rt -> start -> tor != NULL ) { rt -> tore = rt -> start -> tor ; while ( rt -> tore != NULL ) { if ( rt -> tore -> pln != NULL ) rt -> tore -> pln -> cut = 0 ; if ( type == 0 ) tmp = ft_check_tore ( rt , rt -> ray ) ; <S2SV_StartBug> else <S2SV_... | <S2SV_ModStart> ray ) ; if ( type == 1 ) <S2SV_ModEnd> tmp = ft_check_tore <S2SV_ModStart> rt -> light_ray ) ; if ( type == 2 && rt -> inter -> num == rt -> tore -> id && rt -> inter -> light == rt -> tore -> id ) light_tore_inter ( rt |
1,367 | CWE-000 void tb_target_set_jmp_target ( uintptr_t tc_ptr , uintptr_t jmp_addr , uintptr_t addr ) { if ( TCG_TARGET_REG_BITS == 64 ) { tcg_insn_unit i1 , i2 ; intptr_t tb_diff = addr - tc_ptr ; intptr_t br_diff = addr - ( jmp_addr + 4 ) ; uint64_t pair ; if ( tb_diff == ( int16_t ) tb_diff ) { i1 = ADDI | TAI ( TCG_REG_... | <S2SV_ModStart> ; # endif atomic_set__nocheck <S2SV_ModEnd> ( ( uint64_t |
1,368 | CWE-000 int32_t handle_get ( char * filename , uint32_t * length , char * * msg ) <S2SV_StartBug> { <S2SV_EndBug> TRACE ( "%s\\n" , filename ) ; int32_t ret_val = 0 ; ret_val = read_file_to_buffer ( filename , msg , length ) ; if ( ret_val != 0 ) { LOG_EXCEPTION ( "Could<S2SV_blank>not<S2SV_blank>read<S2SV_blank>file."... | <S2SV_ModStart> msg ) { ENTRY ( ) ; <S2SV_ModStart> } EXIT_LABEL : EXIT ( ) ; |
1,369 | CWE-000 static int fname_encrypt ( struct inode * inode , const struct qstr * iname , struct fscrypt_str * oname ) { u32 ciphertext_len ; struct ablkcipher_request * req = NULL ; DECLARE_FS_COMPLETION_RESULT ( ecr ) ; struct fscrypt_info * ci = inode -> i_crypt_info ; struct crypto_ablkcipher * tfm = ci -> ci_ctfm ; in... | <S2SV_ModStart> ; ciphertext_len = max ( iname -> len , ( u32 ) FS_CRYPTO_BLOCK_SIZE ) ; ciphertext_len = round_up <S2SV_ModEnd> ( ciphertext_len , <S2SV_ModStart> ; ciphertext_len = min ( ciphertext_len , lim ) <S2SV_ModEnd> ; if ( <S2SV_ModStart> | CRYPTO_TFM_REQ_MAY_SLEEP , fname_crypt_complete <S2SV_ModEnd> , & ecr... |
1,370 | CWE-000 <S2SV_StartBug> VOID <S2SV_EndBug> ODM_UpdateMpDriverStatus ( IN PDM_ODM_T pDM_Odm ) { # if ( DM_ODM_SUPPORT_TYPE & ODM_WIN ) # elif ( DM_ODM_SUPPORT_TYPE & ODM_CE ) PADAPTER Adapter = pDM_Odm -> Adapter ; pDM_Odm -> mp_mode = ( BOOLEAN ) Adapter -> registrypriv . mp_mode ; # else # endif } | <S2SV_ModStart> <S2SV_null> <S2SV_null> <S2SV_null> static |
1,371 | CWE-000 static void sym_validate_range ( struct symbol * sym ) { struct property * prop ; int base ; long long val , val2 ; char str [ 64 ] ; switch ( sym -> type ) { case S_INT : base = 10 ; break ; case S_HEX : base = 16 ; break ; default : return ; } prop = sym_get_range_prop ( sym ) ; if ( ! prop ) return ; val = s... | <S2SV_ModStart> . val = xstrdup <S2SV_ModEnd> ( str ) |
1,372 | CWE-000 static long slb_allocate_kernel ( unsigned long ea , unsigned long id ) { unsigned long context ; unsigned long flags ; int ssize ; if ( id == KERNEL_REGION_ID ) { if ( ( ea & ~ REGION_MASK ) > ( 1UL << MAX_PHYSMEM_BITS ) ) return - EFAULT ; flags = SLB_VSID_KERNEL | mmu_psize_defs [ mmu_linear_psize ] . sllp ;... | <S2SV_ModStart> ) flags = local_paca <S2SV_ModEnd> -> vmalloc_sllp ; |
1,373 | CWE-000 int ex_int_handle_mode ( unsigned int my_mode , int is_parallel , int run_version ) { char errmsg [ MAX_ERR_LENGTH ] ; int nc_mode = 0 ; # if NC_HAS_HDF5 static int netcdf4_mode = - 1 ; # endif # if defined ( NC_64BIT_DATA ) static int netcdf5_mode = - 1 ; # endif int filesiz = 1 ; int int64_status ; int pariom... | <S2SV_ModStart> "this<S2SV_blank>format\\n" ) ; ex_err ( <S2SV_ModEnd> __func__ , errmsg <S2SV_ModStart> "format\\n" ) ; ex_err ( <S2SV_ModEnd> __func__ , errmsg <S2SV_ModStart> "64BIT_DATA<S2SV_blank>extensions.\\n" ) ; ex_err ( <S2SV_ModEnd> __func__ , errmsg <S2SV_ModStart> "not<S2SV_blank>have<S2SV_blank>that<S2SV_... |
1,374 | CWE-000 <S2SV_StartBug> Message createFileListMessage ( char * username ) { <S2SV_EndBug> char * strList = calloc ( 1 , MAX_FILES_PER_USER * ( 2 + MAX_FILENAME ) ) ; DIR * dirp ; char * path = calloc ( 1 , MAX_FILENAME ) ; <S2SV_StartBug> sprintf ( path , "SERVER/DATA/%s/" , username ) ; <S2SV_EndBug> struct dirent * e... | <S2SV_ModStart> char * username , char * dataPath <S2SV_ModStart> ( path , "%s/%s/" , dataPath <S2SV_ModEnd> , username ) |
1,375 | CWE-000 <S2SV_StartBug> int isLinkLocalAddress ( char * address , int family ) <S2SV_EndBug> { if ( ! address || ( strlen ( address ) == 0 ) ) { return 0 ; } if ( ( family != PR_AF_INET ) && ( family != PR_AF_INET6 ) ) { return 0 ; } if ( family == PR_AF_INET6 ) { if ( ( strncasecmp ( address , "fe80" , 4 ) >= 0 ) && (... | <S2SV_ModStart> <S2SV_null> <S2SV_null> <S2SV_null> static |
1,376 | CWE-000 void server_pubdown ( char * file , char * out ) { char fullpath [ BUFFER_SIZE ] ; memset ( fullpath , 0 , strlen ( fullpath ) ) ; strcat ( fullpath , filepath ) ; strcat ( fullpath , "/" ) ; strcat ( fullpath , file ) ; if ( access ( fullpath , F_OK ) != - 1 ) { int fd = open ( fullpath , O_RDONLY ) ; <S2SV_St... | <S2SV_ModStart> , out , FILE_SIZE <S2SV_ModEnd> ) ; close <S2SV_ModStart> ( out , "pubdown::nofile" <S2SV_ModEnd> ) ; } |
1,377 | CWE-000 static bc_tick_t _bc_spirit1_check_state_rx ( void ) { if ( bc_tick_get ( ) >= _bc_spirit1 . rx_tick_timeout ) { if ( _bc_spirit1 . event_handler != NULL ) { _bc_spirit1 . event_handler ( BC_SPIRIT1_EVENT_RX_TIMEOUT ) ; } } SpiritIrqs xIrqStatus ; SpiritIrqGetStatus ( & xIrqStatus ) ; if ( xIrqStatus . IRQ_RX_D... | <S2SV_ModStart> ( ) ; if ( cRxData <= BC_SPIRIT1_MAX_PACKET_SIZE ) { <S2SV_ModStart> ; } } } |
1,378 | CWE-000 uint64_t <S2SV_StartBug> GetErrno_Syscall ( uint64_t UNUSED ( instruction_pointer ) , <S2SV_EndBug> uint64_t syscall_num , uint64_t * UNUSED ( syscall_params ) ) { if ( syscall_num != Syscall_GetErrno ) return - ENOSYS ; return GetThreadErrno ( GetCurrentThreadUID ( ) ) ; } | <S2SV_ModStart> uint64_t GetErrno_Syscall ( void ) { <S2SV_ModEnd> return GetThreadErrno ( |
1,379 | CWE-000 static void __sched_fork ( unsigned long clone_flags , struct task_struct * p ) { p -> on_rq = 0 ; p -> se . on_rq = 0 ; p -> se . exec_start = 0 ; p -> se . sum_exec_runtime = 0 ; p -> se . prev_sum_exec_runtime = 0 ; p -> se . nr_migrations = 0 ; p -> se . vruntime = 0 ; INIT_LIST_HEAD ( & p -> se . group_nod... | <S2SV_ModStart> ; # endif <S2SV_ModEnd> RB_CLEAR_NODE ( & |
1,380 | CWE-000 int ft_get_line_type ( char * str ) <S2SV_StartBug> { <S2SV_EndBug> if ( ! ft_strcmp ( str , "##start" ) ) return ( 2 ) ; else if ( ! ft_strcmp ( str , "##end" ) ) return ( 3 ) ; else if ( str [ 0 ] == '#' ) return ( 1 ) ; else if ( ft_is_link ( str ) ) return ( 4 ) ; else if ( ft_is_room ( str ) ) return ( 5 )... | <S2SV_ModStart> str ) { if ( str == NULL ) return ( - 1 ) ; |
1,381 | CWE-000 static inline void trace_load ( struct ktz_tdq * tdq ) <S2SV_StartBug> { <S2SV_EndBug> struct rq * rq = RQ ( tdq ) ; trace_sched_load_changed ( rq -> cpu , rq -> nr_running ) ; <S2SV_StartBug> } <S2SV_EndBug> | <S2SV_ModStart> tdq ) { # ifdef CONFIG_SMP <S2SV_ModStart> nr_running ) ; # endif |
1,382 | CWE-000 static int process_call_results ( plcConn * conn , SEXP retval , plcRFunction * r_func ) { plcMsgResult * res ; int i = 0 , ret = 0 ; res = malloc ( sizeof ( plcMsgResult ) ) ; res -> msgtype = MT_RESULT ; res -> names = malloc ( 1 * sizeof ( char * ) ) ; res -> types = malloc ( 1 * sizeof ( plcType ) ) ; res -... | <S2SV_ModStart> { raise_execution_error ( <S2SV_ModEnd> "Type<S2SV_blank>%d<S2SV_blank>is<S2SV_blank>not<S2SV_blank>yet<S2SV_blank>supported<S2SV_blank>by<S2SV_blank>R<S2SV_blank>container" , ( <S2SV_ModStart> { raise_execution_error ( <S2SV_ModEnd> "Exception<S2SV_blank>raised<S2SV_blank>converting<S2SV_blank>function... |
1,383 | CWE-000 int ddcb_register_accelerator ( struct ddcb_accel_funcs * accel ) { int rc ; if ( accel == NULL ) return DDCB_ERR_INVAL ; <S2SV_StartBug> if ddcb_gather_statistics ( ) { <S2SV_EndBug> rc = pthread_mutex_init ( & accel -> slock , NULL ) ; if ( rc != 0 ) return DDCB_ERRNO ; } accel -> priv_data = accel_list ; acc... | <S2SV_ModStart> DDCB_ERR_INVAL ; if ( ddcb_gather_statistics ( ) <S2SV_ModEnd> ) { rc |
1,384 | CWE-000 static void mtk_drm_kms_deinit ( struct drm_device * drm ) <S2SV_StartBug> { <S2SV_EndBug> drm_kms_helper_poll_fini ( drm ) ; component_unbind_all ( drm -> dev , drm ) ; drm_mode_config_cleanup ( drm ) ; } | <S2SV_ModStart> drm ) { mtk_fbdev_fini ( drm ) ; |
1,385 | CWE-000 static void include_source_if_needed ( docgen_t * docgen , source_t * source , const char * package_name ) { pony_assert ( source != NULL ) ; pony_assert ( docgen != NULL ) ; const char * source_path = source -> file ; pony_assert ( source_path != NULL ) ; bool was_included = false ; for ( size_t i = 0 ; i < do... | <S2SV_ModStart> included_sources_count ; i <S2SV_ModEnd> ++ ) { |
1,386 | CWE-000 char * flag_wchar ( t_format * fmt , va_list valist ) { wchar_t c ; char * newstr ; c = va_arg ( valist , wchar_t ) ; newstr = conv_utf8_char ( c , 0 ) ; <S2SV_StartBug> return ( newstr ) ; <S2SV_EndBug> } | <S2SV_ModStart> 0 ) ; fmt -> width = ft_strlen ( newstr ) ; |
1,387 | CWE-000 static void mpi_message_pack ( mpi_message_t * msg , void * data , ssize_t send_offset , exchanger_map_t * send_map , exchanger_map_t * receive_map ) { ASSERT ( send_map -> size >= 0 ) ; ASSERT ( receive_map -> size >= 0 ) ; int num_sends = send_map -> size ; int num_receives = receive_map -> size ; msg -> num_... | <S2SV_ModStart> ( msg , MPI_C_DOUBLE_COMPLEX , double complex ) else PACK ( msg , MPI_C_FLOAT_COMPLEX , float complex <S2SV_ModEnd> ) else polymec_error |
1,388 | CWE-000 int resenddata ( ) { int backup_len = 0 ; int i = 0 ; uint8_t * postdata = NULL ; int len ; uint32_t first_time = 0 ; <S2SV_StartBug> int ret = 0 ; <S2SV_EndBug> backup_len = im_redis_get_backup_len ( ) ; imlogV ( "resenddata<S2SV_blank>=<S2SV_blank>%d<S2SV_blank>\\n" , backup_len ) ; if ( backup_len > 0 ) { fo... | <S2SV_ModStart> ret = 0 ; if ( resend_status == RESEND_RESEND ) { imlogV ( "resenddata<S2SV_blank>busy." ) ; return ret ; } resend_status = RESEND_RESEND <S2SV_ModStart> , len , HTTP_RETRY_NONE <S2SV_ModEnd> ) ; if <S2SV_ModStart> ; im_redis_pop_head ( name <S2SV_ModStart> ; im_redis_pop_head ( name <S2SV_ModStart> } }... |
1,389 | CWE-000 static bool setup_stack ( void * * esp , struct process * p ) { uint8_t * kpage ; bool success = false ; <S2SV_StartBug> kpage = get_frame ( FRAME_ZERO , ( uint8_t * ) PHYS_BASE ) - PGSIZE ) ; <S2SV_EndBug> if ( kpage != NULL ) { <S2SV_StartBug> uint8_t * upage = ( uint8_t * ) PHYS_BASE ) - PGSIZE <S2SV_EndBug>... | <S2SV_ModStart> FRAME_ZERO , ( ( <S2SV_ModStart> upage = ( ( <S2SV_ModStart> ) - PGSIZE ; <S2SV_ModStart> -> s_page_table , & |
1,390 | CWE-000 void recieveMessage ( char * text ) { int len = my_strlen ( text ) ; char * p ; int paginate = 1 ; int moveBy = SEGMENT_SIZE - 1 ; PROMPT_DISPLAY ( text ) ; for ( p = text + len - moveBy ; p >= text ; p -= moveBy ) { pushMessage ( newMessageSegment ( paginate , p ) ) ; paginate = 0 ; <S2SV_StartBug> } <S2SV_End... | <S2SV_ModStart> = 0 ; ++ display_queue_len ; <S2SV_ModStart> != 0 ) { <S2SV_ModStart> ) ) ; ++ display_queue_len ; } <S2SV_ModStart> display_queue ) ; while ( display_queue_len > NUM_SAVED_SEGMENTS ) { remove_node ( display_tail ) ; -- display_queue_len ; } |
1,391 | CWE-000 GSM_SMSDConfig * SMSD_NewConfig ( const char * name ) { GSM_SMSDConfig * Config ; <S2SV_StartBug> Config = ( GSM_SMSDConfig * ) malloc ( sizeof ( GSM_SMSDConfig ) ) ; <S2SV_EndBug> if ( Config == NULL ) return Config ; Config -> running = FALSE ; Config -> failure = ERR_NONE ; Config -> exit_on_failure = TRUE ;... | <S2SV_ModStart> * Config ; int i ; <S2SV_ModStart> ; # endif for ( i = 0 ; i < GSM_MAX_MULTI_SMS ; i ++ ) { Config -> SkipMessage [ i ] = FALSE ; } |
1,392 | CWE-000 int AdventurerCard ( int currentPlayer , struct gameState * state , int drawntreasure , int temphand [ ] , int cardDrawn , int z ) { <S2SV_StartBug> while ( drawntreasure < 5 ) { <S2SV_EndBug> if ( state -> deckCount [ currentPlayer ] < 1 ) { shuffle ( currentPlayer , state ) ; } drawCard ( currentPlayer , stat... | <S2SV_ModStart> ( drawntreasure < 2 <S2SV_ModEnd> ) { if |
1,393 | CWE-000 bool init_dbus ( struct mako_state * state ) { int ret = 0 ; state -> bus = NULL ; state -> xdg_slot = state -> mako_slot = NULL ; ret = sd_bus_open_user ( & state -> bus ) ; if ( ret < 0 ) { <S2SV_StartBug> fprintf ( stderr , "Failed<S2SV_blank>to<S2SV_blank>connect<S2SV_blank>to<S2SV_blank>system<S2SV_blank>b... | <S2SV_ModStart> ( stderr , "Failed<S2SV_blank>to<S2SV_blank>connect<S2SV_blank>to<S2SV_blank>user<S2SV_blank>bus:<S2SV_blank>%s\\n" <S2SV_ModEnd> , strerror ( |
1,394 | CWE-000 static int spi_nor_init_params ( struct spi_nor * nor , struct spi_nor_flash_parameter * params ) { struct spi_nor_erase_map * map = & nor -> erase_map ; const struct flash_info * info = nor -> info ; u8 i , erase_mask ; memset ( params , 0 , sizeof ( * params ) ) ; params -> size = info -> sector_size * info -... | <S2SV_ModStart> ; if ( <S2SV_ModEnd> ( info -> |
1,395 | CWE-000 static Eina_Bool <S2SV_StartBug> _dispatch ( Client * src , void * buffer , int size ) <S2SV_EndBug> { Eina_Debug_Packet_Header * hdr = ( Eina_Debug_Packet_Header * ) buffer ; if ( hdr -> cid ) { Client * dest = _client_find_by_cid ( hdr -> cid ) ; if ( dest ) { if ( dest -> is_master != src -> is_master ) { hd... | <S2SV_ModStart> * buffer , unsigned <S2SV_ModStart> -> cid ; if ( <S2SV_ModStart> size , 0 ) != size ) perror ( "send" |
1,396 | CWE-000 void calculateCenterBound ( TransInfo * t , float r_center [ 3 ] ) { <S2SV_StartBug> float max [ 3 ] ; <S2SV_EndBug> float min [ 3 ] ; int i ; bool is_first = true ; FOREACH_TRANS_DATA_CONTAINER ( t , tc ) { <S2SV_StartBug> for ( i = 0 ; i < tc -> data_len ; i ++ ) { <S2SV_EndBug> if ( is_first == false ) { if ... | <S2SV_ModStart> [ 3 ] , min [ 3 ] ; bool changed = false ; INIT_MINMAX ( min , max ) ; FOREACH_TRANS_DATA_CONTAINER ( t , tc ) { for ( int <S2SV_ModEnd> i = 0 <S2SV_ModStart> ; i ++ <S2SV_ModEnd> ) { if <S2SV_ModStart> ) ; } changed = true ; } } } } if ( changed ) { <S2SV_ModEnd> mid_v3_v3v3 ( r_center <S2SV_ModStart> ... |
1,397 | CWE-000 static long snd_timer_user_ioctl_compat ( struct file * file , unsigned int cmd , unsigned long arg ) { void __user * argp = compat_ptr ( arg ) ; switch ( cmd ) { case SNDRV_TIMER_IOCTL_PVERSION : case SNDRV_TIMER_IOCTL_TREAD : case SNDRV_TIMER_IOCTL_GINFO : case SNDRV_TIMER_IOCTL_GPARAMS : case SNDRV_TIMER_IOC... | <S2SV_ModStart> argp ) ; # ifdef CONFIG_X86_X32 case SNDRV_TIMER_IOCTL_STATUS_X32 : return snd_timer_user_status_x32 ( file , argp ) ; # endif |
1,398 | CWE-000 static ssize_t store_protocols ( struct device * device , struct device_attribute * mattr , const char * buf , size_t len ) { struct rc_dev * dev = to_rc_dev ( device ) ; u64 * current_protocols ; struct rc_scancode_filter * filter ; u64 old_protocols , new_protocols ; ssize_t rc ; <S2SV_StartBug> if ( ! dev ) ... | <S2SV_ModStart> ssize_t rc ; IR_dprintk ( 1 , "Normal<S2SV_blank>protocol<S2SV_blank>change<S2SV_blank>requested\\n" ) ; current_protocols = & dev -> enabled_protocols ; filter = & dev -> scancode_filter ; <S2SV_ModStart> ( ! dev -> change_protocol ) { IR_dprintk ( 1 , "Protocol<S2SV_blank>switching<S2SV_blank>not<S2SV... |
1,399 | CWE-000 inline constr nTrans_GetConnUrls ( nTrans trans ) { is0_ret ( trans , NULL ) ; trans -> conn . s = natsConnection_GetConnectedUrl ( trans -> conn . nc , trans -> conn . conn_urls , 512 ) ; <S2SV_StartBug> is1_ret ( trans -> conn . s == NATS_OK , trans -> conn . conn_urls ) ; <S2SV_EndBug> return NULL ; } | <S2SV_ModStart> 512 ) ; is1_exeret <S2SV_ModEnd> ( trans -> <S2SV_ModStart> s == NATS_OK , trans -> conn . urls = 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.