Unnamed: 0 int64 0 535k | source stringlengths 50 89.8k | target stringlengths 23 37.7k |
|---|---|---|
11,700 | CWE-000 static void ipv4_parse_component ( ipv6_reader_state_t * state ) { int32_t octet = read_decimal_token ( state ) ; <S2SV_StartBug> TRACE ( "<S2SV_blank><S2SV_blank>*<S2SV_blank>ipv4<S2SV_blank>address<S2SV_blank>octet<S2SV_blank>%2x<S2SV_blank>(%d)\\n" , ( uint8_t ) octet , octet ) ; <S2SV_EndBug> VALIDATE ( "On... | <S2SV_ModStart> state ) ; IPV6_TRACE <S2SV_ModEnd> ( "<S2SV_blank><S2SV_blank>*<S2SV_blank>ipv4<S2SV_blank>address<S2SV_blank>octet<S2SV_blank>%2x<S2SV_blank>(%d)\\n" , |
11,701 | CWE-000 static void create_video_stream ( struct ffmpeg_mux * ffm ) { AVCodecContext * context ; void * extradata = NULL ; if ( ! new_stream ( ffm , & ffm -> video_stream , ffm -> params . vcodec , & ffm -> output -> oformat -> video_codec ) ) return ; if ( ffm -> video_header . size ) { extradata = av_memdup ( ffm -> ... | <S2SV_ModStart> -> time_base ; ffm -> video_stream -> avg_frame_rate = av_inv_q ( context -> time_base ) ; |
11,702 | CWE-000 static long kgsl_ioctl_map_user_mem ( struct kgsl_device_private * dev_priv , unsigned int cmd , void * data ) { int result = - EINVAL ; struct kgsl_map_user_mem * param = data ; struct kgsl_mem_entry * entry = NULL ; struct kgsl_process_private * private = dev_priv -> process_priv ; enum kgsl_user_mem_type mem... | <S2SV_ModStart> entry ) ; kgsl_mem_entry_put ( entry ) ; |
11,703 | CWE-000 int mock_tr181_db_write ( char * data ) <S2SV_StartBug> { <S2SV_EndBug> FILE * fp ; if ( g_mock_tr181_db_name ) { fp = fopen ( g_mock_tr181_db_name , "w" ) ; if ( fp == NULL ) { Error ( "Failed<S2SV_blank>to<S2SV_blank>open<S2SV_blank>db<S2SV_blank>file<S2SV_blank>\\"%s\\"\\n" , g_mock_tr181_db_name ) ; return ... | <S2SV_ModStart> data ) { Print ( "mock_tr181_db_write()<S2SV_blank>Entered\\n" ) ; <S2SV_ModStart> fp ) ; Print ( "mock_tr181_db_write()<S2SV_blank>Returned<S2SV_blank>Success\\n" ) ; |
11,704 | CWE-000 static int vdbeSorterSort ( sqlite3 * db , VdbeCursor * pCsr ) { int rc = SQLITE_OK ; int i ; SorterRecord * * aSlot ; SorterRecord * p ; VdbeSorter * pSorter = pCsr -> pSorter ; aSlot = ( SorterRecord * * ) sqlite3MallocZero ( 64 * sizeof ( SorterRecord * ) ) ; if ( ! aSlot ) { return SQLITE_NOMEM ; } p = pSor... | <S2SV_ModStart> = p ; <S2SV_ModEnd> sqlite3_free ( aSlot |
11,705 | CWE-000 int EEPROM_write ( uint32_t addr , char * data , uint32_t size ) { int i ; int pageNum ; int startPage ; pageNum = size / FSL_FEATURE_EEPROM_PAGE_SIZE + ( size % FSL_FEATURE_EEPROM_PAGE_SIZE != 0 ) ; startPage = addr / FSL_FEATURE_EEPROM_PAGE_SIZE ; if ( ( addr >= FSL_FEATURE_EEPROM_SIZE ) || ( addr % FSL_FEATU... | <S2SV_ModStart> uint32_t * ) ( data + i * FSL_FEATURE_EEPROM_PAGE_SIZE ) <S2SV_ModEnd> ) ; } |
11,706 | CWE-000 void find_name_comment ( char * line , t_asm * asem , char * * str_new ) { if ( ft_strposlen ( line , \'"\' ) == 2 && ! asem -> k ) <S2SV_StartBug> { <S2SV_EndBug> write_name_comment ( asem , check_name_comment ( line , 3 , 0 , 0 ) ) ; <S2SV_StartBug> free ( * str_new ) ; <S2SV_EndBug> } else if ( ft_strposlen ... | <S2SV_ModStart> -> k ) <S2SV_ModEnd> write_name_comment ( asem <S2SV_ModStart> ) ) ; <S2SV_ModEnd> else if ( |
11,707 | CWE-000 void free_tid ( struct lfq_ctx * ctx , int tid ) { <S2SV_StartBug> __sync_lock_release ( & ctx -> tid_map [ tid ] ) ; <S2SV_EndBug> } | <S2SV_ModStart> tid ) { ATOMIC_RELEASE <S2SV_ModEnd> ( & ctx |
11,708 | CWE-000 static void brcmf_cfg80211_reg_notifier ( struct wiphy * wiphy , struct regulatory_request * req ) { struct brcmf_cfg80211_info * cfg = wiphy_priv ( wiphy ) ; struct brcmf_if * ifp = netdev_priv ( cfg_to_ndev ( cfg ) ) ; struct brcmf_fil_country_le ccreq ; int i ; brcmf_dbg ( TRACE , "enter:<S2SV_blank>initiato... | <S2SV_ModStart> ; i < 2 <S2SV_ModEnd> ; i ++ |
11,709 | CWE-000 int main ( ) { char infix [ 128 ] ; int x , ans ; while ( ( x = readline ( infix , 128 ) ) ) { ans = infixeval ( infix ) ; if ( ans == INT_MIN ) { fprintf ( stderr , "Error<S2SV_blank>in<S2SV_blank>expression\\n" ) ; } <S2SV_StartBug> } <S2SV_EndBug> return 0 ; } | <S2SV_ModStart> ) ; } else fprintf ( stdout , "%d\\n" , ans ) ; |
11,710 | CWE-000 int ble_ll_init_rx_isr_end ( uint8_t * rxbuf , uint8_t crcok , struct ble_mbuf_hdr * ble_hdr ) { int rc ; int resolved ; int chk_send_req ; int chk_wl ; int index ; uint8_t pdu_type ; uint8_t addr_type ; uint8_t peer_addr_type ; uint8_t * adv_addr ; uint8_t * peer ; <S2SV_StartBug> uint8_t * init_addr ; <S2SV_E... | <S2SV_ModStart> uint8_t * init_addr = NULL <S2SV_ModStart> ; if ( init_addr && |
11,711 | CWE-000 <S2SV_StartBug> void construct_map_random ( int num , int deviation , int fin_gold ) { <S2SV_EndBug> map_piece_t * arr [ num ] ; int n = num - 2 ; init = make_piece ( 0 , base_duration ) ; for ( int i = 0 ; i < n ; i ++ ) { <S2SV_StartBug> int gold = rand ( ) % 10 ; <S2SV_EndBug> int dur = rand ( ) % deviation ... | <S2SV_ModStart> fin_gold ) { time_t t ; srand ( ( unsigned ) time ( & t ) ) ; <S2SV_ModStart> int gold = - ( <S2SV_ModStart> ) % 10 ) <S2SV_ModStart> = make_piece ( <S2SV_ModEnd> gold , base_duration <S2SV_ModStart> NULL ; } <S2SV_ModEnd> } } if |
11,712 | CWE-000 ZWRAP_CCtx * ZWRAP_createCCtx ( z_streamp strm ) { ZWRAP_CCtx * zwc ; if ( strm -> zalloc && strm -> zfree ) { zwc = ( ZWRAP_CCtx * ) strm -> zalloc ( strm -> opaque , 1 , sizeof ( ZWRAP_CCtx ) ) ; if ( zwc == NULL ) return NULL ; memset ( zwc , 0 , sizeof ( ZWRAP_CCtx ) ) ; memcpy ( & zwc -> allocFunc , strm ,... | <S2SV_ModStart> ZWRAP_CCtx * ) calloc ( 1 <S2SV_ModEnd> , sizeof ( <S2SV_ModStart> , sizeof ( * zwc <S2SV_ModEnd> ) ) ; <S2SV_ModStart> return NULL ; <S2SV_ModEnd> } return zwc |
11,713 | CWE-000 static void emit_binop_float_arith ( Ast * ast ) { SAVE ; char * op ; switch ( ast -> type ) { case '+' : op = "addss" ; break ; case '-' : op = "subss" ; break ; case '*' : op = "mulss" ; break ; case '/' : op = "divss" ; break ; default : error ( "invalid<S2SV_blank>operator<S2SV_blank>\'%d\'" , ast -> type )... | <S2SV_ModStart> ctype ) ; push_xmm <S2SV_ModEnd> ( 0 ) <S2SV_ModStart> "movsd<S2SV_blank>%%xmm0,<S2SV_blank>%%xmm1" ) ; pop_xmm <S2SV_ModEnd> ( 0 ) |
11,714 | CWE-000 static int dirac_decode_frame_internal ( DiracContext * s ) { DWTContext d ; int y , i , comp , dsty ; int ret ; if ( s -> low_delay ) { if ( ! s -> hq_picture ) { for ( comp = 0 ; comp < 3 ; comp ++ ) { Plane * p = & s -> plane [ comp ] ; memset ( p -> idwt . buf , 0 , p -> idwt . stride * p -> idwt . height )... | <S2SV_ModStart> height ) ; ret = <S2SV_ModStart> , comp ) ; if ( ret < 0 ) return ret |
11,715 | CWE-000 void clearProcRequest ( processPtr proc ) { proc -> diskRequest . op = EMPTY ; proc -> diskRequest . memAddress = NULL ; proc -> diskRequest . numSectors = EMPTY ; proc -> diskRequest . startTrack = EMPTY ; proc -> diskRequest . startSector = EMPTY ; proc -> diskRequest . unit = EMPTY ; <S2SV_StartBug> } <S2SV_... | <S2SV_ModStart> = EMPTY ; proc -> diskRequest . resultStatus = 0 ; |
11,716 | CWE-000 void ZC_updateZCRootTexFile ( char * dataSetName ) { int lineCount ; char rootTexFile [ ZC_BUFS ] , dsName [ ZC_BUFS ] ; char * titleLineString = ( char * ) malloc ( sizeof ( char ) * ZC_BUFS ) ; sprintf ( rootTexFile , "report/z-checker-report.tex" ) ; StringLine * texLines = ZC_readLines ( rootTexFile , & lin... | <S2SV_ModStart> , "_" , "\\\\_" <S2SV_ModEnd> ) ; sprintf |
11,717 | CWE-000 int <S2SV_StartBug> rpmem_obc_close ( struct rpmem_obc * rpc ) <S2SV_EndBug> { if ( ! rpmem_obc_is_connected ( rpc ) ) { errno = ENOTCONN ; return - 1 ; } struct rpmem_msg_close msg ; rpmem_obc_set_msg_hdr ( & msg . hdr , RPMEM_MSG_TYPE_CLOSE , sizeof ( msg ) ) ; <S2SV_StartBug> RPMEM_LOG ( INFO , "sending<S2SV... | <S2SV_ModStart> rpmem_obc * rpc , int remove <S2SV_ModStart> ) ) ; msg . remove = ( uint32_t ) remove ; |
11,718 | CWE-000 static NTSTATUS store_urb_bulk ( PIRP irp , PURB urb , struct urb_req * urb_r ) { struct _URB_BULK_OR_INTERRUPT_TRANSFER * urb_bi = & urb -> UrbBulkOrInterruptTransfer ; struct usbip_header * hdr ; <S2SV_StartBug> int in , type ; <S2SV_EndBug> int len ; <S2SV_StartBug> in = PIPE2DIRECT ( urb_bi -> PipeHandle ) ... | <S2SV_ModStart> * hdr ; BOOLEAN in ; int <S2SV_ModEnd> type ; int <S2SV_ModStart> ; in = ( urb_bi -> TransferFlags & USBD_TRANSFER_DIRECTION_IN ) ? TRUE : FALSE ; type = PIPE2TYPE <S2SV_ModEnd> ( urb_bi -> <S2SV_ModStart> PipeHandle ) ; <S2SV_ModEnd> len = sizeof <S2SV_ModStart> ; if ( ! |
11,719 | CWE-000 int sepreader ( void ) { int comment = 0 ; while ( cbuf == '<S2SV_blank>' || cbuf == '\\n' || cbuf == '\\r' || cbuf == '\\t' || cbuf == '/' || cbuf == '{' || comment ) { if ( cbuf == '\\n' && comment == 0 ) { if ( ( cbuf = fgetc ( fp ) ) != '\\r' ) { linenum ++ ; continue ; } cbuf = fgetc ( fp ) ; linenum ++ ; ... | <S2SV_ModStart> ; } } else if ( cbuf == EOF ) { error ( "comment<S2SV_blank>didn\'t<S2SV_blank>end\\n" ) ; return - 1 ; } <S2SV_ModStart> 0 ; } <S2SV_ModEnd> if ( cbuf <S2SV_ModStart> EOF ) { error ( "Comment<S2SV_blank>didn\'t<S2SV_blank>end\\n" ) ; <S2SV_ModStart> 1 ; } } cbuf = fgetc ( fp ) ; } if ( cbuf == EOF ) { ... |
11,720 | CWE-000 int start_client ( client_info client_datas ) { <S2SV_StartBug> int threads = client_datas . num_of_threads ; <S2SV_EndBug> int count = 0 ; <S2SV_StartBug> client_info data [ threads ] ; <S2SV_EndBug> pthread_t thread = 0 ; pthread_attr_t attribute ; <S2SV_StartBug> pthread_attr_init ( & attribute ) ; <S2SV_End... | <S2SV_ModStart> = client_datas . num_of_clients <S2SV_ModEnd> ; int count <S2SV_ModStart> 0 ; client_info * data = malloc ( sizeof ( client_info ) * client_datas . num_of_clients ) <S2SV_ModEnd> ; pthread_t thread <S2SV_ModStart> pthread_attr_t attribute ; if ( data == NULL ) { perror ( "malloc" <S2SV_ModEnd> ) ; retur... |
11,721 | CWE-000 <S2SV_StartBug> int cil_gen_ioportcon ( __attribute__ ( ( unused ) ) struct cil_db * db , struct cil_tree_node * parse_current , struct cil_tree_node * ast_node ) <S2SV_EndBug> { enum cil_syntax syntax [ ] = { CIL_SYN_STRING , CIL_SYN_STRING | CIL_SYN_LIST , CIL_SYN_STRING | CIL_SYN_LIST , CIL_SYN_END } ; int s... | <S2SV_ModStart> int cil_gen_ioportcon ( <S2SV_ModEnd> struct cil_db * |
11,722 | CWE-000 static bool decode_packet_diag_mclist ( struct tcb * const tcp , const kernel_ulong_t addr , const unsigned int len , const void * const opaque_data ) { struct packet_diag_mclist dml ; const size_t nmemb = len / sizeof ( dml ) ; if ( ! nmemb ) return false ; print_array ( tcp , addr , nmemb , & dml , sizeof ( d... | <S2SV_ModStart> dml ) , ucopyn_for_print <S2SV_ModEnd> , print_packet_diag_mclist , |
11,723 | CWE-000 void bf ( char chr , int length , int shift ) { static const double a = 440.0 ; double c = 440.0 * pow ( 2 , 3 / 12 ) ; if ( chr == '<S2SV_blank>' ) { Sleep ( note_duration ) ; return ; } for ( int i = 0 ; str [ i ] != 0 ; ++ i ) if ( ( int ) str [ i ] == chr ) { <S2SV_StartBug> Beep ( c * pow ( 2 , ( ( double ... | <S2SV_ModStart> / 12.0 ) ) <S2SV_ModStart> ; } } <S2SV_ModEnd> <S2SV_null> <S2SV_null> <S2SV_null> |
11,724 | CWE-000 static LWCHAR <S2SV_StartBug> getccu ( ) <S2SV_EndBug> { LWCHAR c ; if ( ungot == NULL ) { c = getchr ( ) ; } else { struct ungot * ug = ungot ; c = ug -> ug_char ; ungot = ug -> ug_next ; free ( ug ) ; if ( c == CHAR_END_COMMAND ) c = getcc_end_command ( ) ; } return ( c ) ; } | <S2SV_ModStart> LWCHAR getccu ( VOID_PARAM |
11,725 | CWE-000 static void ugfx_event ( eventid_t id ) { ( void ) id ; <S2SV_StartBug> if ( ugfx_evt . ugfx . pEvent -> type == GEVENT_GWIN_BUTTON ) <S2SV_EndBug> <S2SV_StartBug> dacPlay ( "click.raw" ) ; <S2SV_EndBug> instance . app -> event ( instance . context , & ugfx_evt ) ; geventEventComplete ( ugfx_evt . ugfx . pListe... | <S2SV_ModStart> pEvent -> type != GEVENT_GWIN_BUTTON_UP ) { <S2SV_ModEnd> dacPlay ( "click.raw" <S2SV_ModStart> "click.raw" ) ; dacWait ( ) ; } |
11,726 | CWE-000 static int daq_regtest_modify_flow ( void * handle , const DAQ_PktHdr_t * hdr , const DAQ_ModFlow_t * modify ) { DAQRegTestContext * context = ( DAQRegTestContext * ) handle ; if ( modify -> type == DAQ_MODFLOW_TYPE_PKT_TRACE ) { if ( modify -> length != sizeof ( DAQ_ModFlowPktTrace_t ) ) return DAQ_ERROR_INVAL... | <S2SV_ModStart> return DAQ_ERROR_INVAL ; const <S2SV_ModStart> mod_tr = ( const |
11,727 | CWE-000 static void cc_network_panel_class_init ( CcNetworkPanelClass * klass ) { GObjectClass * object_class = G_OBJECT_CLASS ( klass ) ; CcPanelClass * panel_class = CC_PANEL_CLASS ( klass ) ; g_type_class_add_private ( klass , sizeof ( CcNetworkPanelPrivate ) ) ; panel_class -> get_help_uri = cc_network_panel_get_he... | <S2SV_ModStart> = cc_network_panel_finalize ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null> |
11,728 | CWE-000 static int <S2SV_StartBug> terminal ( struct nk_context * ctx , int x , int y , int width , int height ) <S2SV_EndBug> { <S2SV_StartBug> if ( nk_begin ( ctx , "Terminal" , nk_rect ( x , y , width , height ) , 0 ) ) <S2SV_EndBug> { nk_layout_row_dynamic ( ctx , 20 , 1 ) ; <S2SV_StartBug> nk_label ( ctx , "Here<S... | <S2SV_ModStart> , int height , char * command <S2SV_ModStart> height ) , NK_WINDOW_TITLE <S2SV_ModEnd> ) ) { <S2SV_ModStart> 1 ) ; nk_label_wrap <S2SV_ModEnd> ( ctx , <S2SV_ModStart> ( ctx , command <S2SV_ModEnd> ) ; } |
11,729 | CWE-000 <S2SV_StartBug> extern int x11_delete_xauth ( char * xauthority , uint16_t display ) <S2SV_EndBug> { int i = 0 , status ; char * result ; char * * xauth_argv ; xauth_argv = xmalloc ( sizeof ( char * ) * 10 ) ; xauth_argv [ i ++ ] = xstrdup ( "xauth" ) ; xauth_argv [ i ++ ] = xstrdup ( "-v" ) ; xauth_argv [ i ++... | <S2SV_ModStart> char * xauthority , char * host <S2SV_ModStart> = xstrdup_printf ( "%s/unix:%u" , host <S2SV_ModEnd> , display ) |
11,730 | CWE-000 static BOOL wl_update_content ( wlfContext * context_w ) <S2SV_StartBug> { <S2SV_EndBug> if ( ! context_w -> waitingFrameDone && context_w -> haveDamage ) { UwacWindowSubmitBuffer ( context_w -> window , true ) ; context_w -> waitingFrameDone = TRUE ; context_w -> haveDamage = FALSE ; } return TRUE ; } | <S2SV_ModStart> context_w ) { if ( ! context_w ) return FALSE ; |
11,731 | CWE-000 static void sysrepoctl_test_change ( void * * state ) { char buff [ PATH_MAX ] = { 0 , } ; char * user = NULL ; register struct passwd * pw = NULL ; register uid_t uid = geteuid ( ) ; pw = getpwuid ( uid ) ; assert_non_null ( pw ) ; user = pw -> pw_name ; snprintf ( buff , PATH_MAX , "../src/sysrepoctl<S2SV_bla... | <S2SV_ModStart> , PATH_MAX , "ietf-interfaces[[:space:]]*\\\\|<S2SV_blank>2014-05-08<S2SV_blank>\\\\|<S2SV_blank>Installed[[:space:]]*\\\\|<S2SV_blank>%s:[[:alnum:]]*[[:space:]]*\\\\|<S2SV_blank>664[[:space:]]*\\\\|" <S2SV_ModEnd> , user ) |
11,732 | CWE-000 static int process_aes_gmac_param ( odp_crypto_generic_session_t * session , const EVP_CIPHER * cipher ) { if ( ( uint32_t ) EVP_CIPHER_key_length ( cipher ) != <S2SV_StartBug> session -> p . auth_key . length ) <S2SV_EndBug> return - 1 ; memcpy ( session -> auth . key , session -> p . auth_key . data , session... | <S2SV_ModStart> p . auth_key . length ) return - 1 ; if ( 12 != session -> p . auth_iv |
11,733 | CWE-000 long long int __strtoll ( const char * nptr , char * * endptr , int base ) { int negative = 0 ; while ( is_space ( * nptr ) ) { nptr ++ ; } switch ( * nptr ) { case '-' : negative = 1 ; case '+' : nptr ++ ; } switch ( base ) { case 0 : if ( nptr [ 0 ] == '0' ) { if ( ( nptr [ 1 ] == 'x' || nptr [ 1 ] == 'X' ) )... | <S2SV_ModStart> 10 ; } break ; <S2SV_ModStart> 2 ; } break ; |
11,734 | CWE-000 static int team_nl_cmd_options_get ( struct sk_buff * skb , struct genl_info * info ) { struct team * team ; int err ; team = team_nl_team_get ( info ) ; if ( ! team ) return - EINVAL ; <S2SV_StartBug> err = team_nl_send_generic ( info , team , team_nl_fill_options_get ) ; <S2SV_EndBug> team_nl_team_put ( team ... | <S2SV_ModStart> , team , team_nl_fill_options_get_all <S2SV_ModEnd> ) ; team_nl_team_put |
11,735 | CWE-000 A_Package * axu_package_new ( int len ) { <S2SV_StartBug> len += sizeof ( A_Package ) ; <S2SV_EndBug> if ( len > PACKAGE_MAX_SIZE ) return NULL ; <S2SV_StartBug> A_Package * pack = ( A_Package * ) malloc ( len ) ; <S2SV_EndBug> if ( pack != NULL ) pack -> header . body_length = len ; return pack ; } | <S2SV_ModStart> len ) { <S2SV_ModEnd> if ( len <S2SV_ModStart> malloc ( len + sizeof ( A_Package ) |
11,736 | CWE-000 void RF_CalcTics ( void ) { long newtime , oldtimecount ; word TimeCount = * clockw ; if ( lasttimecount > TimeCount ) TimeCount = lasttimecount ; <S2SV_StartBug> if ( DemoMode ) <S2SV_EndBug> { oldtimecount = lasttimecount ; while ( TimeCount < oldtimecount + DEMOTICS * 2 ) ; lasttimecount = oldtimecount + DEM... | <S2SV_ModStart> = lasttimecount ; <S2SV_ModEnd> do { newtime <S2SV_ModStart> ; } } <S2SV_ModEnd> <S2SV_null> <S2SV_null> <S2SV_null> |
11,737 | CWE-000 char * getProviderNameList ( struct oidc_provider * p , size_t size ) { <S2SV_StartBug> if ( NULL == p || size == 0 ) { <S2SV_EndBug> oidc_errno = OIDC_EARGNULL ; return NULL ; } unsigned int i ; char * providerList = calloc ( sizeof ( char ) , strlen ( provider_getName ( * p ) ) + 1 ) ; sprintf ( providerList ... | <S2SV_ModStart> NULL == p ) { oidc_errno = OIDC_EARGNULL ; return NULL ; } if ( 0 == size ) { return calloc ( sizeof ( char ) , 1 ) <S2SV_ModEnd> ; } unsigned |
11,738 | CWE-000 static int scpi_clocks_probe ( struct platform_device * pdev ) { int ret ; struct device * dev = & pdev -> dev ; struct device_node * child , * np = dev -> of_node ; const struct of_device_id * match ; if ( ! get_scpi_ops ( ) ) return - ENXIO ; for_each_available_child_of_node ( np , child ) { match = of_match_... | <S2SV_ModStart> pdev ) ; of_node_put ( child ) ; |
11,739 | CWE-000 void process_scmp ( uint8_t * buf , SCMPL4Header * scmp , int len , HostAddr * from ) { int calc_chk = scmp_checksum ( buf ) ; if ( calc_chk != scmp -> checksum ) { <S2SV_StartBug> zlog_error ( zc , "SCMP<S2SV_blank>header<S2SV_blank>checksum<S2SV_blank>(%x)<S2SV_blank>doesn\'t<S2SV_blank>match<S2SV_blank>compu... | <S2SV_ModStart> ( zc , "SCMP<S2SV_blank>header<S2SV_blank>checksum<S2SV_blank>(%x)<S2SV_blank>doesn\'t<S2SV_blank>match<S2SV_blank>computed<S2SV_blank>checksum<S2SV_blank>(%x)" , ntohs ( <S2SV_ModEnd> scmp -> checksum <S2SV_ModStart> scmp -> checksum ) , ntohs ( calc_chk ) <S2SV_ModEnd> ) ; return |
11,740 | CWE-000 void spdk_io_device_register ( void * io_device , spdk_io_channel_create_cb create_cb , spdk_io_channel_destroy_cb destroy_cb , uint32_t ctx_size ) { struct io_device * dev , * tmp ; dev = calloc ( 1 , sizeof ( struct io_device ) ) ; if ( dev == NULL ) { SPDK_ERRLOG ( "could<S2SV_blank>not<S2SV_blank>allocate<S... | <S2SV_ModStart> = false ; dev -> refcnt = 0 ; |
11,741 | CWE-000 void setAlarm ( int hour , int minute ) { AHOUR = hour ; AMIN = minute ; RTC_C -> AMINHR = AHOUR << 8 | AMIN | BIT ( 15 ) | BIT ( 7 ) ; <S2SV_StartBug> char buff [ 20 ] ; <S2SV_EndBug> writeOutput ( "Alarm<S2SV_blank>set<S2SV_blank>to<S2SV_blank>" ) ; sprintf ( buff , "%02d:%02d%c" , AHOUR , AMIN , '\\0' ) ; wr... | <S2SV_ModStart> 7 ) ; alarm = 1 ; |
11,742 | CWE-000 int xfs_bmap_punch_delalloc_range ( struct xfs_inode * ip , xfs_fileoff_t start_fsb , xfs_fileoff_t length ) { struct xfs_ifork * ifp = & ip -> i_df ; xfs_fileoff_t end_fsb = start_fsb + length ; struct xfs_bmbt_irec got , del ; struct xfs_iext_cursor icur ; int error = 0 ; <S2SV_StartBug> xfs_ilock ( ip , XFS_... | <S2SV_ModStart> = 0 ; ASSERT <S2SV_ModEnd> ( ifp -> <S2SV_ModStart> & XFS_IFEXTENTS ) ; xfs_ilock ( ip , XFS_ILOCK_EXCL ) ; if ( ! xfs_iext_lookup_extent_before ( ip , ifp , & end_fsb , & icur , & got ) <S2SV_ModEnd> ) goto out_unlock <S2SV_ModStart> goto out_unlock ; <S2SV_ModEnd> while ( got |
11,743 | CWE-000 long my_atol ( const char * str ) { long val = 0 ; char sign = 1 ; for ( ; * str != '\\0' ; str ++ ) { if ( ! isspace ( * str ) ) break ; } if ( * str == '-' ) { sign = - 1 ; str ++ ; <S2SV_StartBug> } <S2SV_EndBug> for ( ; * str != '\\0' ; str ++ ) { if ( isnumber ( * str ) ) { val *= 10 ; val += ( * str - '0'... | <S2SV_ModStart> ++ ; } else if ( * str == '+' ) str ++ ; |
11,744 | CWE-000 uint32_t eri_read ( int addr ) { uint32_t ret ; <S2SV_StartBug> asm ( <S2SV_EndBug> "RER<S2SV_blank>%0,%1" : "=r" ( ret ) : "r" ( addr ) ) ; return ret ; } | <S2SV_ModStart> ret ; asm volatile |
11,745 | CWE-000 int ci_connection_pre_check ( const char * DomainName , char * * pIP ) { <S2SV_StartBug> int n_err = - 1 ; <S2SV_EndBug> n_err = CICheckDomain ( "samsung.com" , NULL ) ; if ( n_err != 0 ) { THINGS_LOG_E ( TAG , "AP<S2SV_blank>is<S2SV_blank>Not<S2SV_blank>Connected<S2SV_blank>to<S2SV_blank>Internet" ) ; return n... | <S2SV_ModStart> ) { int <S2SV_ModEnd> n_err = CICheckDomain |
11,746 | CWE-000 static void cli_incoming_set_redisconnecttimeout ( str * instr , struct streambuf * replybuffer ) { long timeout ; char * endptr ; if ( str_shift ( instr , 1 ) ) { streambuf_printf ( replybuffer , "%s\\n" , "More<S2SV_blank>parameters<S2SV_blank>required." ) ; return ; <S2SV_StartBug> } <S2SV_EndBug> timeout = ... | <S2SV_ModStart> return ; } errno = 0 ; |
11,747 | CWE-000 void test_vector_centroids_from_class ( ) { int n = 9 ; vector_t * pos = vectors_allocate ( n ) ; set ( pos , 0 , 0 , 10 ) ; set ( pos , 1 , 10 , 0 ) ; set ( pos , 2 , 10 , 10 ) ; set ( pos , 3 , 0 , 0 ) ; set ( pos , 4 , 0 , 1 ) ; set ( pos , 5 , 10 , 1 ) ; set ( pos , 6 , 11 , - 1 ) ; set ( pos , 7 , 11 , 12 ... | <S2SV_ModStart> 8 ) ; <S2SV_ModEnd> for ( int <S2SV_ModStart> i ++ ) { printf ( "%d<S2SV_blank>" <S2SV_ModEnd> , c . <S2SV_ModStart> ] ) ; vector_print ( pos [ i ] ) ; } |
11,748 | CWE-000 static PyObject * Pympz_mpmath_normalize ( PyObject * self , PyObject * args ) { long sign = 0 ; mpir_si bc = 0 , prec = 0 , shift , zbits , carry = 0 ; PyObject * exp = 0 , * newexp = 0 , * newexp2 = 0 , * tmp = 0 , * rndstr = 0 ; PympzObject * man = 0 , * upper = 0 , * lower = 0 ; char rnd = 0 ; if ( PyTuple_... | <S2SV_ModStart> ) ) { if ( PyIntOrLong_Check ( ( PyObject * ) man ) ) { if ( ! ( man = Pympz_From_Number ( ( PyObject * ) man ) ) ) { <S2SV_ModStart> return NULL ; } } else { TYPE_ERROR ( "argument<S2SV_blank>is<S2SV_blank>not<S2SV_blank>an<S2SV_blank>mpz" ) ; return NULL ; } |
11,749 | CWE-000 int builtincall ( char * av [ ] ) { int retval = 0 ; char * retstr ; if ( av [ 0 ] == NULL ) return ( 0 ) ; # ifdef DEBUGMODE printf ( "In<S2SV_blank>builtincall<S2SV_blank>%p\\n%s\\n" , av [ 0 ] , av [ 0 ] ) ; printf ( "av[1]:%s\\n" , av [ 1 ] ) ; # endif if ( ! _strcmp ( av [ 0 ] , "exit" ) ) { if ( av [ 1 ] ... | <S2SV_ModStart> ] != '/' && ! ( av [ 0 ] [ 0 ] == '.' && ( av [ 0 ] [ 1 ] == '/' || ( av [ 0 ] [ 1 ] == '.' && av [ 0 ] [ 2 ] == '/' ) ) ) |
11,750 | CWE-000 <S2SV_StartBug> PHP_METHOD ( rocksdb_write_batch , deleteCf ) { } <S2SV_EndBug> | <S2SV_ModStart> ( rocksdb_write_batch , destroy ) { php_rocksdb_write_batch_object * this ; if ( zend_parse_parameters_none ( ) == FAILURE ) { return ; } this = Z_ROCKSDB_WRITE_BATCH_P ( getThis ( ) TSRMLS_CC ) ; rocksdb_writebatch_destroy ( this -> batch ) ; RETURN_TRUE ; <S2SV_ModEnd> } <S2SV_null> <S2SV_null> |
11,751 | CWE-000 static int __allocate_data_block ( struct dnode_of_data * dn , int seg_type ) { struct f2fs_sb_info * sbi = F2FS_I_SB ( dn -> inode ) ; struct f2fs_summary sum ; struct node_info ni ; block_t old_blkaddr ; <S2SV_StartBug> blkcnt_t count = 1 ; <S2SV_EndBug> int err ; if ( unlikely ( is_inode_flag_set ( dn -> ino... | <S2SV_ModStart> block_t old_blkaddr ; pgoff_t fofs ; <S2SV_ModStart> dn ) ; fofs = f2fs_start_bidx_of_node ( ofs_of_node ( dn -> node_page ) , dn -> inode ) + dn -> ofs_in_node ; if ( i_size_read ( dn -> inode ) < ( ( loff_t ) ( fofs + 1 ) << PAGE_SHIFT ) ) f2fs_i_size_write ( dn -> inode , ( ( loff_t ) ( fofs + 1 ) <<... |
11,752 | CWE-000 static void set_dummy_tlist_references ( Plan * plan , int rtoffset ) { List * output_targetlist ; ListCell * l ; output_targetlist = NIL ; foreach ( l , plan -> targetlist ) { TargetEntry * tle = ( TargetEntry * ) lfirst ( l ) ; Var * oldvar = ( Var * ) tle -> expr ; <S2SV_StartBug> Var * newvar ; <S2SV_EndBug... | <S2SV_ModStart> * newvar ; if ( IsA ( oldvar , Const ) ) { output_targetlist = lappend ( output_targetlist , tle ) ; continue ; } |
11,753 | CWE-000 int execute_tool ( int argc , char * argv [ ] , char * envp [ ] , common_opts_t * opts , TSS2_SYS_CONTEXT * sapi_context ) { ( void ) opts ; ( void ) envp ; static const char * optstring = "e:o:H:P:g:f:X:N:O:E:S:U" ; static struct option long_options [ ] = { { "endorsePasswd" , 1 , NULL , 'e' } , { "ownerPasswd... | <S2SV_ModStart> } EKserverAddr = strdup ( optarg <S2SV_ModEnd> ) ; if <S2SV_ModStart> NULL ) { LOG_ERR <S2SV_ModEnd> ( "Memory<S2SV_blank>allocation<S2SV_blank>failed." ) |
11,754 | CWE-000 static bool jsfIsErased ( uint32_t addr , uint32_t len ) { <S2SV_StartBug> for ( uint32_t x = 0 ; x < len ; x ++ ) { <S2SV_EndBug> unsigned char buf ; jshFlashRead ( & buf , addr + x , 1 ) ; if ( buf != 0xFF ) return false ; } return true ; } | <S2SV_ModStart> len ) { uint32_t x ; for ( <S2SV_ModEnd> x = 0 |
11,755 | CWE-000 int main ( ) { int ret = - 1 ; sr_schema_t * schemas = NULL ; size_t schema_cnt = 0 ; const char * path = NULL ; const struct lys_module * module = NULL ; uint32_t idx = 0 ; const struct CMUnitTest tests [ ] = { cmocka_unit_test_setup_teardown ( srcfg_test_version , NULL , NULL ) , cmocka_unit_test_setup_teardo... | <S2SV_ModStart> , srcfg_test_set_running_datastore , srcfg_test_teardown <S2SV_ModEnd> ) , cmocka_unit_test_setup_teardown |
11,756 | CWE-000 eMBErrorCode eMBMasterRegHoldingCB ( mb_instance * inst , UCHAR * pucRegBuffer , USHORT usAddress , USHORT usNRegs , eMBRegisterMode eMode ) { eMBErrorCode eStatus = MB_ENOERR ; uint8_t reg_index = 0 ; usAddress -- ; switch ( eMode ) { case MB_REG_WRITE : <S2SV_StartBug> while ( usNRegs > 0 ) <S2SV_EndBug> { re... | <S2SV_ModStart> case MB_REG_WRITE : break ; |
11,757 | CWE-000 static void poll_timeout_destroy ( GsdNightLight * self ) { if ( self -> source == NULL ) return ; g_source_destroy ( self -> source ) ; <S2SV_StartBug> self -> source = NULL ; <S2SV_EndBug> } | <S2SV_ModStart> source ) ; g_source_unref ( self -> source ) ; |
11,758 | CWE-000 static void check_cached_events ( pmix_rshift_caddy_t * cd ) { size_t i , n ; pmix_notify_caddy_t * ncd ; bool found , matched ; pmix_event_chain_t * chain ; for ( i = 0 ; i < ( size_t ) pmix_globals . notifications . size ; i ++ ) { if ( NULL == ( ncd = ( pmix_notify_caddy_t * ) pmix_ring_buffer_poke ( & pmix_... | <S2SV_ModStart> ; chain -> nallocated = ncd -> ninfo + 2 <S2SV_ModEnd> ; PMIX_INFO_CREATE ( <S2SV_ModStart> , chain -> nallocated <S2SV_ModEnd> ) ; if <S2SV_ModStart> ninfo ) { chain -> ninfo = ncd -> ninfo ; |
11,759 | CWE-000 uint32_t circMultiRead ( struct circularBuffer * buff , struct complexData * data , uint32_t howMany ) { uint32_t nrItems = 0 ; if ( buff -> head == buff -> tail ) { return BUFFER_EMPTY ; } if ( howMany > buff -> maxLen ) { return BUFFER_OUT_OF_BOUNDS ; } if ( buff -> head > buff -> tail ) { nrItems = buff -> h... | <S2SV_ModStart> buff -> head + 1 <S2SV_ModStart> -> tail ; nrItems = 0 ; <S2SV_ModStart> nrItems < howMany <S2SV_ModEnd> ) { data <S2SV_ModStart> imagData ; item ++ ; if ( item >= buff -> maxLen ) { item = 0 <S2SV_ModEnd> ; } nrItems |
11,760 | CWE-000 void printCurrentDir ( ) { <S2SV_StartBug> if ( cdir == 0 ) cdir = String ( "/" ) ; <S2SV_EndBug> println ( cdir ) ; return ; } | <S2SV_ModStart> String ( "/" ) ; else println ( "hello" |
11,761 | CWE-000 void ps2_init ( ) { <S2SV_StartBug> if ( ! ps2_wait_for_write ( 0.5 ) ) { <S2SV_EndBug> io_out8 ( PS2_COMMAND_PORT , 0xAD ) ; ps2_wait_for_write ( 0.1 ) ; io_out8 ( PS2_COMMAND_PORT , 0xA7 ) ; for ( int i = 0 ; i < 16 ; i ++ ) { io_in8 ( PS2_DATA_PORT ) ; } ps2_wait_for_write ( 0.1 ) ; io_out8 ( PS2_COMMAND_POR... | <S2SV_ModStart> ! ps2_wait_for_write ( 0.25 <S2SV_ModEnd> ) ) { <S2SV_ModStart> 0x47 ) ; ps2_wait_for_write ( 0.1 ) ; io_out8 ( PS2_COMMAND_PORT , 0xD4 ) ; ps2_wait_for_write ( 0.1 ) ; io_out8 ( PS2_DATA_PORT , 0xF4 ) ; <S2SV_ModStart> ps2_irq_handler ) ; apic_enable_irq ( 12 , ps2_irq_handler ) ; |
11,762 | CWE-000 int main ( int argc , char const * argv [ ] ) { int sock = 0 ; ssize_t read_size ; struct sockaddr_in serv_addr ; char * snd_str = "Hello<S2SV_blank>from<S2SV_blank>client" ; char buffer [ MAX_MSG_SIZE ] = { 0 } ; if ( ( sock = socket ( AF_INET , SOCK_STREAM , 0 ) ) < 0 ) { printf ( "\\n<S2SV_blank>Socket<S2SV_... | <S2SV_ModStart> 1 ; } write <S2SV_ModEnd> ( sock , <S2SV_ModStart> ( snd_str ) <S2SV_ModEnd> ) ; printf <S2SV_ModStart> ; printf ( "Received<S2SV_blank>from<S2SV_blank>server:<S2SV_blank>%s\\n" <S2SV_ModEnd> , buffer ) |
11,763 | CWE-000 int as_err_note2 ( int line_nr , int column_nr ) { ft_printf ( BOLDWHITE "\\nline<S2SV_blank>%d,<S2SV_blank>column<S2SV_blank>%d:" RESET , line_nr , column_nr ) ; ft_printf ( BOLDBLACK "<S2SV_blank>note:" RESET ) ; <S2SV_StartBug> ft_printf ( WHITE "<S2SV_blank>choose<S2SV_blank>a<S2SV_blank>register<S2SV_blank... | <S2SV_ModStart> ft_printf ( WHITE "<S2SV_blank>choose<S2SV_blank>a<S2SV_blank>non-zero<S2SV_blank>register<S2SV_blank>number<S2SV_blank>that<S2SV_blank>is<S2SV_blank>not<S2SV_blank>higher<S2SV_blank>than<S2SV_blank>%d<S2SV_blank>to<S2SV_blank>silence<S2SV_blank>this<S2SV_blank>warning\\n" RESET , REG_NUMBER <S2SV_ModEn... |
11,764 | CWE-000 <S2SV_StartBug> void kernel_init ( void ) { <S2SV_EndBug> terminal_initialize ( ) ; kernel_welcome ( ) ; gdt_init ( ) ; idt_init ( ) ; <S2SV_StartBug> kb_init ( ) ; <S2SV_EndBug> asm ( "<S2SV_blank>sti<S2SV_blank>" ) ; } | <S2SV_ModStart> void kernel_init ( struct multiboot_info * mb <S2SV_ModEnd> ) { terminal_initialize <S2SV_ModStart> ( ) ; pmem_init ( mb ) ; |
11,765 | CWE-000 UINT64 get_directory_size ( const char * dir ) { struct dirent2 * * namelist = NULL ; int i , n = scandir2 ( dir , & namelist , NULL , NULL ) ; UINT64 size = 0 ; for ( i = 0 ; i < n ; i ++ ) { int is_dir = ( namelist [ i ] -> d_attrib & FILE_ATTRIBUTE_DIRECTORY ) ; int is_junction = ( namelist [ i ] -> d_attrib... | <S2SV_ModStart> FILE_ATTRIBUTE_REPARSE_POINT ) ; <S2SV_ModEnd> const char * <S2SV_ModStart> const char * link ; if ( is_junction ) { |
11,766 | CWE-000 static void open_shared_lib ( char_os * name ) { char_os * realname ; char * u8 ; void * handle ; realname = caml_search_dll_in_path ( & caml_shared_libs_path , name ) ; u8 = caml_stat_strdup_of_os ( realname ) ; caml_gc_message ( 0x100 , "Loading<S2SV_blank>shared<S2SV_blank>library<S2SV_blank>%s\\n" , u8 ) ; ... | <S2SV_ModStart> == NULL ) caml_fatal_error ( "cannot<S2SV_blank>load<S2SV_blank>shared<S2SV_blank>library<S2SV_blank>%s\\n" "Reason:<S2SV_blank>%s" <S2SV_ModEnd> , caml_stat_strdup_of_os ( <S2SV_ModStart> name ) , <S2SV_ModEnd> caml_dlerror ( ) |
11,767 | CWE-000 <S2SV_StartBug> void print_ele ( ele * e , size_t num_row , size_t num_col ) <S2SV_EndBug> { <S2SV_StartBug> for ( size_t i = 0 ; i < 9 ; i ++ ) <S2SV_EndBug> { printf ( "element<S2SV_blank>%d,<S2SV_blank>val<S2SV_blank>=<S2SV_blank>%f,<S2SV_blank>pos<S2SV_blank>=<S2SV_blank>%d,%d\\n" , i , val ( e [ i ] ) , ro... | <S2SV_ModStart> * e , count_t num_row , count_t <S2SV_ModEnd> num_col ) { <S2SV_ModStart> { for ( count_t <S2SV_ModEnd> i = 0 |
11,768 | CWE-000 void kernel_activate_thread ( thread_t * t ) { <S2SV_StartBug> thread_list_t * item = ( thread_list_t * ) kmalloc ( sizeof ( thread_list_t * ) ) ; <S2SV_EndBug> item -> thread = t ; item -> next = 0 ; if ( ! ready_queue ) { ready_queue = item ; } else { thread_list_t * iterator = ready_queue ; while ( iterator ... | <S2SV_ModStart> sizeof ( thread_list_t <S2SV_ModEnd> ) ) ; |
11,769 | CWE-000 int parseCommandAuth ( clientDataType * theClientData ) { char * theAuth ; theAuth = getFtpCommandArg ( "AUTH" , theClientData -> theCommandReceived ) ; printTimeStamp ( ) ; printf ( "The<S2SV_blank>Auth<S2SV_blank>is:<S2SV_blank>%s" , theAuth ) ; <S2SV_StartBug> char * theResponse = "502<S2SV_blank>Auth<S2SV_b... | <S2SV_ModStart> * theResponse = "502<S2SV_blank>Security<S2SV_blank>extensions<S2SV_blank>not<S2SV_blank>implemented.\\r\\n" <S2SV_ModEnd> ; write ( |
11,770 | CWE-000 void find_all_face_file ( GtkListStore * list_store , GtkTreeIter iter ) { if ( ! g_file_test ( FACES_PATH , G_FILE_TEST_IS_DIR ) ) { g_warning ( "dir<S2SV_blank>is<S2SV_blank>not<S2SV_blank>exists" ) ; exit ( 0 ) ; } GError * error = NULL ; GError * err = NULL ; GFile * directory ; GFileEnumerator * enumer ; G... | <S2SV_ModStart> * pixbuf ; GFileType type ; const gchar * target ; <S2SV_ModStart> directory , G_FILE_ATTRIBUTE_STANDARD_NAME "," G_FILE_ATTRIBUTE_STANDARD_TYPE "," G_FILE_ATTRIBUTE_STANDARD_IS_SYMLINK "," G_FILE_ATTRIBUTE_STANDARD_SYMLINK_TARGET , <S2SV_ModEnd> G_FILE_QUERY_INFO_NONE , NULL <S2SV_ModStart> ) ) { char ... |
11,771 | CWE-000 int main ( void ) { AR_sim ( T , pd , mean_pd , sd_sig_pd , phi_pd ) ; AR_sim ( T , rho , mean_rho , sd_sig_rho , phi_rho ) ; pd [ 0 ] = 0.04 ; for ( t = 0 ; t < T ; t ++ ) { DR [ t ] = reject_sample ( pd [ t ] , rho [ t ] ) ; } phi_rho_est = phi_rho ; phi_pd_est = phi_pd ; mean_rho_est = mean_rho ; mean_pd_est... | <S2SV_ModStart> , N / 100 <S2SV_ModEnd> * weight_state_all [ <S2SV_ModStart> ( gp , "plot<S2SV_blank>\'particle.csv\'<S2SV_blank>using<S2SV_blank>1:2:5:4<S2SV_blank>with<S2SV_blank>circles<S2SV_blank>notitle<S2SV_blank>fs<S2SV_blank>transparent<S2SV_blank>solid<S2SV_blank>0.65<S2SV_blank>lw<S2SV_blank>2.0<S2SV_blank>pa... |
11,772 | CWE-000 static node * insert_into_node_after_splitting ( node * root , node * old_node , int left_index , int key , node * right ) { int i , j , split , k_prime ; node * new_node , * child ; int * temp_keys ; _off_t * temp_vals ; temp_vals = malloc ( ( ORDER + 2 ) * sizeof ( _off_t ) ) ; if ( temp_vals == NULL ) { <S2S... | <S2SV_ModStart> { # if TEST2 <S2SV_ModEnd> printf ( "temp_vals<S2SV_blank>node\\n" <S2SV_ModStart> { # if TEST2 <S2SV_ModEnd> printf ( "temp_keys<S2SV_blank>node\\n" |
11,773 | CWE-000 <S2SV_StartBug> void myAESStorage_set_encryptblock ( unsigned char * key , unsigned char * iv , unsigned char * password ) { <S2SV_EndBug> if ( encryptblock == NULL ) { <S2SV_StartBug> encryptblock = malloc ( sizeof ( struct myAES_encryptblock ) + sizeof ( unsigned char * ) * ( 32 * 2 + 16 ) ) ; <S2SV_EndBug> <... | <S2SV_ModStart> char * password , int password_len <S2SV_ModStart> ) * ( KEY_SIZE * 3 / 2 ) + sizeof ( char <S2SV_ModEnd> ) ) ; <S2SV_ModStart> ( unsigned char ) * KEY_SIZE <S2SV_ModEnd> ) ; encryptblock <S2SV_ModStart> ( unsigned char ) * KEY_SIZE / 2 <S2SV_ModEnd> ) ; encryptblock <S2SV_ModStart> ( unsigned char ) * ... |
11,774 | CWE-000 static int readPacket ( MQTTClient * c , Timer * timer ) { int rc = MQTT_FAILURE ; MQTTHeader header = { 0 } ; int len = 0 ; int rem_len = 0 ; int read_bytes = platform_network_read ( c -> ipstack , c -> readbuf , 1 , platform_timer_left ( timer ) ) ; if ( read_bytes != 1 ) { if ( read_bytes == 0 ) rc = MQTT_CO... | <S2SV_ModStart> = 1 ; read_bytes = readRemainingLength <S2SV_ModEnd> ( c , <S2SV_ModStart> ) ) ; if ( read_bytes == 0 ) { rc = MQTT_CONNECTION_LOST ; goto exit ; } <S2SV_ModStart> rem_len ) ) { rc = MQTT_CONNECTION_LOST ; <S2SV_ModStart> goto exit ; } |
11,775 | CWE-000 <S2SV_StartBug> int PerlXlib_X_IO_error_handler ( Display * d ) { <S2SV_EndBug> sv_setiv ( get_sv ( "X11::Xlib::_error_fatal_trapped" , GV_ADD ) , 1 ) ; warn ( "Xlib<S2SV_blank>fatal<S2SV_blank>error.<S2SV_blank><S2SV_blank>Further<S2SV_blank>calls<S2SV_blank>to<S2SV_blank>Xlib<S2SV_blank>are<S2SV_blank>forbidd... | <S2SV_ModStart> d ) { SV * conn ; <S2SV_ModStart> ; dSP ; ENTER ; SAVETMPS ; <S2SV_ModStart> ( SP ) ; EXTEND ( SP , 1 ) ; conn = sv_2mortal ( newSV ( 0 ) ) ; PerlXlib_sv_from_display ( conn , d ) ; PUSHs ( conn ) ; PUTBACK <S2SV_ModStart> | G_DISCARD | <S2SV_ModEnd> G_EVAL | G_KEEPERR <S2SV_ModStart> | G_KEEPERR ) ; FR... |
11,776 | CWE-000 bool check_whitespace ( char c ) { if ( c == 0 ) return true ; <S2SV_StartBug> for ( int i = 0 ; i < 6 ; i ++ ) <S2SV_EndBug> if ( c == whitespace [ i ] ) return true ; return false ; } | <S2SV_ModStart> ; i < strlen ( whitespace ) <S2SV_ModEnd> ; i ++ |
11,777 | CWE-000 void gnc_item_edit_hide_popup ( GncItemEdit * item_edit ) { g_return_if_fail ( item_edit != NULL ) ; g_return_if_fail ( GNC_IS_ITEM_EDIT ( item_edit ) ) ; if ( ! item_edit -> is_popup ) return ; <S2SV_StartBug> gtk_widget_hide ( item_edit -> popup_item ) ; <S2SV_EndBug> gtk_arrow_set ( item_edit -> popup_toggle... | <S2SV_ModStart> ) return ; gtk_container_remove ( GTK_CONTAINER ( item_edit -> sheet ) , <S2SV_ModEnd> item_edit -> popup_item |
11,778 | CWE-000 int comparePrices ( const void * a , const void * b ) { double aValue = * ( ( double * ) a ) ; double bValue = * ( ( double * ) b ) ; <S2SV_StartBug> return round ( bValue + aValue ) ; <S2SV_EndBug> } | <S2SV_ModStart> return round ( aValue - bValue <S2SV_ModEnd> ) ; } |
11,779 | CWE-000 void lval_print ( lval * value ) { switch ( value -> type ) { case LVAL_NUM : printf ( "%li" , value -> num ) ; break ; case LVAL_ERR : printf ( "Error:<S2SV_blank>%s" , value -> err ) ; break ; case LVAL_SYM : printf ( "%s" , value -> sym ) ; break ; <S2SV_StartBug> case LVAL_SEXPR : { <S2SV_EndBug> putchar ( ... | <S2SV_ModStart> case LVAL_SEXPR : lval_expr_print ( value , '(' , <S2SV_ModEnd> ')' ) ; <S2SV_ModStart> ')' ) ; break ; case LVAL_QEXPR : lval_expr_print ( value , '{' , '}' ) ; <S2SV_ModStart> ; } } <S2SV_ModEnd> <S2SV_null> <S2SV_null> <S2SV_null> |
11,780 | CWE-000 int xfindform ( int x , int zone , struct ZONES * z ) { int n , at , num ; at = 0 ; for ( n = 0 ; n < z -> num ; ++ n ) { num = z -> ptr [ n ] . numforms ; if ( n == zone ) { return at + x ; } at += num ; } <S2SV_StartBug> } <S2SV_EndBug> | <S2SV_ModStart> num ; } return 0 ; |
11,781 | CWE-000 MDGUI__meta_box_t MDGUIMB__create ( char * name , int x , int y , int height , int width ) { MDGUI__meta_box_t new_box ; new_box . fft_first = NULL ; <S2SV_StartBug> new_box . fft_curr = NULL ; <S2SV_EndBug> <S2SV_StartBug> new_box . fft_last = NULL ; <S2SV_EndBug> new_box . fft_sample_size = 2048 ; MDGUIMB__re... | <S2SV_ModStart> ; new_box . <S2SV_ModEnd> fft_last = NULL <S2SV_ModStart> fft_last = NULL <S2SV_ModEnd> ; MDGUIMB__reset_variables ( |
11,782 | CWE-000 int ipforward_ipv6_on ( void ) { size_t len ; int ip6forwarding = 1 ; len = sizeof ip6forwarding ; frr_elevate_privs ( & zserv_privs ) { if ( sysctl ( mib_ipv6 , MIB_SIZ , NULL , NULL , & ip6forwarding , len ) < 0 ) { <S2SV_StartBug> flog_err_sys ( LIB_ERR_SYSCALL , <S2SV_EndBug> "can\'t<S2SV_blank>get<S2SV_bla... | <S2SV_ModStart> { flog_err_sys ( LIB_ERR_SYSTEM_CALL <S2SV_ModEnd> , "can\'t<S2SV_blank>get<S2SV_blank>ip6forwarding<S2SV_blank>value" ) |
11,783 | CWE-000 PROCESS_LIB_ERROR fork_exec_redirect ( int argc , const char * argv [ ] , const char * working_directory , int stdin_pipe , int stdout_pipe , int stderr_pipe , pid_t * pid ) { assert ( argc > 0 ) ; assert ( argv ) ; <S2SV_StartBug> assert ( argv [ argc ] ) ; <S2SV_EndBug> for ( int i = 0 ; i < argc ; i ++ ) { a... | <S2SV_ModStart> [ argc ] == NULL |
11,784 | CWE-000 bool parse_refer ( request_rec * r , char * line ) { char * last = NULL ; char * value = NULL ; <S2SV_StartBug> char * cmd = apr_strtok ( line , "" , & last ) ; <S2SV_EndBug> int i = 0 , counter = 0 ; if ( ! cmd || apr_strnatcmp ( cmd , "refer" ) != 0 ) { config . refer_op = 3 ; error ( r -> server , log_header... | <S2SV_ModStart> ( line , SEP_CHAR <S2SV_ModEnd> , & last <S2SV_ModStart> ( NULL , SEP_CHAR <S2SV_ModEnd> , & last |
11,785 | CWE-000 void mlvpn_reorder_tick ( EV_P_ ev_timer * w , int revents ) { mlvpn_tunnel_t * t ; double max_srtt = 0.0 ; int ts = 0 ; LIST_FOREACH ( t , & rtuns , entries ) { if ( t -> status >= MLVPN_AUTHOK ) { max_srtt += t -> srtt_av ; ts ++ ; } } <S2SV_StartBug> max_srtt /= ts ; <S2SV_EndBug> if ( max_srtt <= 0 ) { max_... | <S2SV_ModStart> ; } } if ( ts > 0 ) { <S2SV_ModStart> /= ts ; } <S2SV_ModStart> ( max_srtt * 5.2 <S2SV_ModEnd> ) / 1000.0 |
11,786 | CWE-000 void kernel_default_signal ( struct signal_info * sig ) { switch ( sig -> signum ) { case SIGABRT : { printk ( "sig:<S2SV_blank>Aborting!\\n" ) ; break ; } case SIGSEGV : { printk ( "Segmentation<S2SV_blank>fault\\n" ) ; get_current_process ( ) -> signal_pending = 0 ; <S2SV_StartBug> sys__exit ( 127 ) ; <S2SV_E... | <S2SV_ModStart> = 0 ; sys_exit <S2SV_ModEnd> ( 127 ) |
11,787 | CWE-000 void Rs485ConfigTask ( ) { osEvent ret ; mRxState = CONFIG_STATE_ZERO ; indexRx = 0 ; while ( 1 ) { <S2SV_StartBug> ret = osSignalWait ( 0x3 , 1000 ) ; <S2SV_EndBug> if ( ret . status == osEventSignal && ret . value . v == 1 ) { printf ( "%d:%s\\r\\n" , strlen ( ( char * ) THREAD_RX_BUF ) , THREAD_RX_BUF ) ; pa... | <S2SV_ModStart> ( 0x3 , 2000 <S2SV_ModEnd> ) ; if |
11,788 | CWE-000 void ReplicationSlotCleanup ( void ) { int i ; <S2SV_StartBug> Assert ( MyReplicationSlot == NULL ) ; <S2SV_EndBug> for ( i = 0 ; i < max_replication_slots ; i ++ ) { ReplicationSlot * s = & ReplicationSlotCtl -> replication_slots [ i ] ; <S2SV_StartBug> if ( s -> active_pid == MyProcPid ) <S2SV_EndBug> { <S2SV... | <S2SV_ModStart> MyReplicationSlot == NULL ) ; restart : LWLockAcquire ( ReplicationSlotControlLock , LW_SHARED <S2SV_ModStart> ; if ( ! s -> in_use ) continue ; SpinLockAcquire ( & s -> mutex ) ; if ( <S2SV_ModStart> ( s -> <S2SV_ModEnd> data . persistency <S2SV_ModStart> persistency == RS_TEMPORARY ) ; SpinLockRelease... |
11,789 | CWE-000 static int log_append_logfile ( const struct lxc_log_appender * appender , struct lxc_log_event * event ) { char buffer [ LXC_LOG_BUFFER_SIZE ] ; char date_time [ LXC_LOG_TIME_SIZE ] ; int n , ret ; int fd_to_use = - 1 ; <S2SV_StartBug> # ifndef NO_LXC_CONF <S2SV_EndBug> <S2SV_StartBug> if ( ! lxc_log_use_globa... | <S2SV_ModStart> - 1 ; const char * log_container_name = log_vmname ; <S2SV_ModStart> NO_LXC_CONF if ( current_config ) { if ( ! lxc_log_use_global_fd ) fd_to_use = current_config -> logfd ; if ( ! log_container_name ) log_container_name <S2SV_ModEnd> = current_config -> <S2SV_ModStart> = current_config -> name ; } <S2S... |
11,790 | CWE-000 void xi_parse_file_chunk ( cn_cbor * cb ) { cn_cbor * cb_item ; unsigned chunkoffset = 0 ; int retval ; cb_item = cn_cbor_mapget_string ( cb , "msgver" ) ; if ( cb_item ) { printf ( "FILE_CHUNK:<S2SV_blank>msgver<S2SV_blank>=<S2SV_blank>%d\\n" , cb_item -> v . uint ) ; } cb_item = cn_cbor_mapget_string ( cb , "... | <S2SV_ModStart> ctx , ( BYTE <S2SV_ModEnd> * ) cb_item <S2SV_ModStart> cb_item -> length ) ; printf ( "lFileHandle<S2SV_blank>=<S2SV_blank>%p\\n" , lFileHandle <S2SV_ModStart> ; closeFile ( & <S2SV_ModStart> ; closeFile ( & |
11,791 | CWE-000 ASTNODE * make_ast_def_var ( char * name , TYPE type ) { ASTNODE * np ; np = make_astnode ( ) ; np -> type = type ; np -> op = DEF_VAL ; np -> sym = make_symbol ( name ) ; np -> left = NULL ; np -> right = NULL ; <S2SV_StartBug> printf ( "symbol<S2SV_blank>=<S2SV_blank>%s" , symbol_description ( np -> sym ) ) ;... | <S2SV_ModStart> = NULL ; <S2SV_ModEnd> return np ; |
11,792 | CWE-000 int git_treebuilder_insert ( const git_tree_entry * * entry_out , git_treebuilder * bld , const char * filename , const git_oid * id , git_filemode_t filemode ) { git_tree_entry * entry ; int error ; git_strmap_iter pos ; assert ( bld && id && filename ) ; if ( ! valid_filemode ( filemode ) ) return tree_error ... | <S2SV_ModStart> tree_error ( "failed<S2SV_blank>to<S2SV_blank>insert<S2SV_blank>entry:<S2SV_blank>invalid<S2SV_blank>name<S2SV_blank>for<S2SV_blank>a<S2SV_blank>tree<S2SV_blank>entry" , filename ) ; if ( git_oid_iszero ( id ) ) return tree_error ( "failed<S2SV_blank>to<S2SV_blank>insert<S2SV_blank>entry:<S2SV_blank>inv... |
11,793 | CWE-000 struct dict_entry * dict_add ( struct lzw_dict * dict , uint8_t * bytes , size_t size ) { assert ( dict ) ; <S2SV_StartBug> if ( ( size_t ) dict -> size >= dict -> capacity ) { <S2SV_EndBug> reset_dict ( dict ) ; } <S2SV_StartBug> dict -> size += 1 ; <S2SV_EndBug> <S2SV_StartBug> struct dict_entry * new_entry =... | <S2SV_ModStart> ) dict -> next_idx <S2SV_ModEnd> >= dict -> <S2SV_ModStart> ) ; } <S2SV_ModEnd> struct dict_entry * <S2SV_ModStart> [ dict -> next_idx <S2SV_ModEnd> ] ; new_entry <S2SV_ModStart> = bytes ; char str [ size + 1 ] ; memcpy ( str , bytes , size ) ; str [ size ] = '\\0' ; printf ( "DEBUG:<S2SV_blank>dict_add... |
11,794 | CWE-000 static int refs_from_alternate_cb ( struct alternate_object_database * e , void * data ) { char * other ; size_t len ; struct remote * remote ; struct transport * transport ; const struct ref * extra ; struct alternate_refs_data * cb = data ; <S2SV_StartBug> other = real_pathdup ( e -> path ) ; <S2SV_EndBug> le... | <S2SV_ModStart> e -> path , 1 |
11,795 | CWE-000 int main ( int argc , const char * argv [ ] ) { op_type type = parse_args ( argc , argv ) ; if ( type == OP_REPL ) gravity_repl ( ) ; mem_init ( ) ; gravity_closure_t * closure = NULL ; gravity_compiler_t * compiler = NULL ; gravity_delegate_t delegate = { . error_callback = report_error , . loadfile_callback =... | <S2SV_ModStart> = mem_alloc ( NULL , |
11,796 | CWE-000 <S2SV_StartBug> void perf_reader_free ( void * ptr ) { <S2SV_EndBug> if ( ptr ) { struct perf_reader * reader = ptr ; <S2SV_StartBug> while ( ! __sync_bool_compare_and_swap ( & reader -> rb_use_state , RB_NOT_USED , RB_USED_IN_MUNMAP ) ) ; <S2SV_EndBug> munmap ( reader -> base , reader -> page_size * ( reader -... | <S2SV_ModStart> void * ptr , bool is_exit <S2SV_ModStart> = ptr ; if ( ! is_exit ) |
11,797 | CWE-000 static void load_extra_pots ( struct db_main * db , void ( * process_file ) ( struct db_main * db , char * name ) ) { struct cfg_list * list ; struct cfg_line * line ; if ( ( list = cfg_get_list ( "List.Extra:" , "Potfiles" ) ) ) if ( ( line = list -> head ) ) do { struct stat s ; char * name = path_expand ( li... | <S2SV_ModStart> char dname [ 2 * |
11,798 | CWE-000 void do_events ( void ) { ALLEGRO_EVENT event ; sockets_update ( ) ; # if defined ( MINISPHERE_SPHERUN ) <S2SV_StartBug> update_debugger ( ) ; <S2SV_EndBug> # endif async_run_jobs ( ASYNC_TICK ) ; update_input ( ) ; audio_update ( ) ; while ( al_get_next_event ( g_events , & event ) ) { switch ( event . type ) ... | <S2SV_ModStart> ( MINISPHERE_SPHERUN ) debugger_update <S2SV_ModEnd> ( ) ; |
11,799 | CWE-000 static const char * parse_escape ( struct dmr_C * C , const char * p , unsigned * val , const char * end , int bits , struct position pos ) { unsigned c = * p ++ ; unsigned d ; if ( c != '\\\\' ) { * val = c ; return p ; } c = * p ++ ; switch ( c ) { case 'a' : c = '\\a' ; break ; case 'b' : c = '\\b' ; break ;... | <S2SV_ModStart> } default : warning ( C , pos , "unknown<S2SV_blank>escape<S2SV_blank>sequence:<S2SV_blank>\'\\\\%c\'" , c ) ; break ; case '\\\\' : case '\\'' : case \'"\' : case '?' : |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.