Unnamed: 0 int64 0 3.91k | source stringlengths 77 30.3k | target stringlengths 41 19k |
|---|---|---|
0 | CWE-362 int cipso_v4_sock_getattr ( struct sock * sk , struct netlbl_lsm_secattr * secattr ) { <vul-start> struct ip_options * opt ; opt = inet_sk ( sk ) -> opt ; if ( opt == NULL || opt -> cipso == 0 ) return - ENOMSG ; return cipso_v4_getattr ( opt -> __data + opt -> cipso - sizeof ( struct iphdr ) , <vul-end> secatt... | <vul-sep> { <vul-start> struct ip_options_rcu * opt ; int res = - ENOMSG ; rcu_read_lock ( ) ; opt = rcu_dereference ( inet_sk ( sk ) -> inet_opt ) ; if ( opt && opt -> opt . cipso ) res = cipso_v4_getattr ( opt -> opt . __data + opt -> opt . cipso - sizeof ( struct iphdr ) , <vul-end><vul-sep> secattr ) ; <vul-start> ... |
1 | CWE-772 int virtio_gpu_object_create ( struct virtio_gpu_device * vgdev , unsigned long size , bool kernel , bool pinned , struct virtio_gpu_object * * bo_ptr ) { struct virtio_gpu_object * bo ; enum ttm_bo_type type ; size_t acc_size ; int ret ; if ( kernel ) type = ttm_bo_type_kernel ; else type = ttm_bo_type_device ... | <vul-sep> ret = drm_gem_object_init ( vgdev -> ddev , & bo -> gem_base , size ) ; <vul-start> if ( ret != 0 ) { kfree ( bo ) ; <vul-end><vul-sep> return ret ; <vul-start> } <vul-end><vul-sep> |
2 | CWE-273 int unquoted_glob_pattern_p ( string ) register char * string ; { register int c ; char * send ; int open , bsquote ; DECLARE_MBSTATE ; open = bsquote = 0 ; send = string + strlen ( string ) ; while ( c = * string ++ ) { switch ( c ) { case '?' : case '*' : return ( 1 ) ; case '[' : open ++ ; continue ; case ']... | <vul-sep> continue ; <vul-start> case '/' : if ( open ) open = 0 ; <vul-end><vul-sep> bsquote = 1 ; <vul-start> string ++ ; continue ; } else if ( open && * string == '/' ) { <vul-end><vul-sep> |
3 | CWE-352 static void doGet ( HttpRequest req , HttpResponse res ) { set_content_type ( res , "text/html" ) ; if ( ACTION ( HOME ) ) { LOCK ( Run . mutex ) do_home ( res ) ; END_LOCK ; <vul-start> } else if ( ACTION ( RUN ) ) { handle_run ( req , res ) ; <vul-end> } else if ( ACTION ( TEST ) ) { is_monit_running ( res ) ... | <vul-sep> END_LOCK ; <vul-start> } else if ( ACTION ( RUNTIME ) ) { handle_runtime ( req , res ) ; <vul-end><vul-sep> is_monit_running ( res ) ; <vul-start><vul-end><vul-sep> do_getid ( res ) ; <vul-start><vul-end><vul-sep> } else { <vul-start> handle_service ( req , res ) ; <vul-end><vul-sep> |
4 | CWE-254 void test_parser ( void ) { <vul-start> int i , retval ; bzrtpPacket_t * zrtpPacket ; bzrtpContext_t * context87654321 = bzrtp_createBzrtpContext ( 0x87654321 ) ; bzrtpContext_t * context12345678 = bzrtp_createBzrtpContext ( 0x12345678 ) ; memcpy ( context12345678 -> channelContext [ 0 ] -> selfH [ 0 ] , H12345... | <vul-sep> void test_parser ( void ) { <vul-start> test_parser_param ( 0 ) ; <vul-end><vul-sep> |
5 | CWE-552 static ssize_t _hostsock_sendto ( oe_fd_t * sock_ , const void * buf , size_t count , int flags , const struct oe_sockaddr * dest_addr , oe_socklen_t addrlen ) { ssize_t ret = - 1 ; sock_t * sock = _cast_sock ( sock_ ) ; oe_errno = 0 ; <vul-start> if ( ! sock || ( count && ! buf ) ) <vul-end> OE_RAISE_ERRNO ( O... | <vul-sep> oe_errno = 0 ; <vul-start> if ( ! sock || ( count && ! buf ) || count > OE_SSIZE_MAX ) <vul-end><vul-sep> } <vul-start> if ( ret > ( ssize_t ) count ) { ret = - 1 ; OE_RAISE_ERRNO ( OE_EINVAL ) ; } <vul-end><vul-sep> |
6 | NVD-CWE-Other # ifndef DEBUG freopen ( "/tmp/uu-server.log" , "w" , stderr ) ; # endif retval = krb5_init_context ( & context ) ; if ( retval ) { com_err ( argv [ 0 ] , retval , "while initializing krb5" ) ; exit ( 1 ) ; } # ifdef DEBUG { int one = 1 ; int acc ; struct servent * sp ; socklen_t namelen = sizeof ( f_inad... | <vul-sep> retval = krb5_read_message ( context , ( krb5_pointer ) & sock , & pname_data ) ; <vul-start> if ( retval || pname_data . length == 0 || pname_data . data [ pname_data . length - 1 ] != '\\0' ) { <vul-end><vul-sep> |
7 | CWE-125 static UINT parallel_process_irp_create ( PARALLEL_DEVICE * parallel , IRP * irp ) { char * path = NULL ; int status ; <vul-start> <vul-end> UINT32 PathLength ; <vul-start> Stream_Seek ( irp -> input , 28 ) ; <vul-end> Stream_Read_UINT32 ( irp -> input , PathLength ) ; <vul-start> status = ConvertFromUnicode ( ... | <vul-sep> int status ; <vul-start> WCHAR * ptr ; <vul-end><vul-sep> UINT32 PathLength ; <vul-start> if ( ! Stream_SafeSeek ( irp -> input , 28 ) ) return ERROR_INVALID_DATA ; if ( Stream_GetRemainingLength ( irp -> input ) < 4 ) return ERROR_INVALID_DATA ; <vul-end><vul-sep> Stream_Read_UINT32 ( irp -> input , PathLeng... |
8 | CWE-284 { case VFF_MAPTYP_2_BYTE : value = 1.0 * ( ( short * ) viff_colormap ) [ i ] ; break ; case VFF_MAPTYP_4_BYTE : value = 1.0 * ( ( int * ) viff_colormap ) [ i ] ; break ; case VFF_MAPTYP_FLOAT : value = ( ( float * ) viff_colormap ) [ i ] ; break ; case VFF_MAPTYP_DOUBLE : value = ( ( double * ) viff_colormap ) ... | <vul-sep> if ( viff_info . data_storage_type == VFF_TYP_BIT ) <vul-start> { if ( CheckMemoryOverflow ( ( image -> columns + 7UL ) >> 3UL , image -> rows ) != MagickFalse ) ThrowReaderException ( ResourceLimitError , "MemoryAllocationFailed" ) ; <vul-end><vul-sep> max_packets = ( ( image -> columns + 7UL ) >> 3UL ) * im... |
9 | CWE-476 unsigned int dfl ; unsigned int port_no ; bool filtered ; int ret = 1 ; spin_lock_irqsave ( & i8042_lock , flags ) ; str = i8042_read_status ( ) ; if ( unlikely ( ~ str & I8042_STR_OBF ) ) { spin_unlock_irqrestore ( & i8042_lock , flags ) ; if ( irq ) dbg ( "Interrupt %d, without any data\\n" , irq ) ; ret = 0 ... | <vul-sep> spin_unlock_irqrestore ( & i8042_lock , flags ) ; <vul-start> if ( likely ( serio && ! filtered ) ) <vul-end><vul-sep> |
10 | CWE-399 static int hugetlbfs_statfs ( struct dentry * dentry , struct kstatfs * buf ) { struct hugetlbfs_sb_info * sbinfo = HUGETLBFS_SB ( dentry -> d_sb ) ; struct hstate * h = hstate_inode ( dentry -> d_inode ) ; buf -> f_type = HUGETLBFS_MAGIC ; buf -> f_bsize = huge_page_size ( h ) ; if ( sbinfo ) { spin_lock ( & s... | <vul-sep> spin_lock ( & sbinfo -> stat_lock ) ; <vul-start> if ( sbinfo -> spool ) { long free_pages ; spin_lock ( & sbinfo -> spool -> lock ) ; buf -> f_blocks = sbinfo -> spool -> max_hpages ; free_pages = sbinfo -> spool -> max_hpages - sbinfo -> spool -> used_hpages ; buf -> f_bavail = buf -> f_bfree = free_pages ;... |
11 | CWE-200 unsigned paravirt_patch_call ( void * insnbuf , const void * target , u16 tgt_clobbers , unsigned long addr , u16 site_clobbers , unsigned len ) { struct branch * b = insnbuf ; unsigned long delta = ( unsigned long ) target - ( addr + 5 ) ; <vul-start> if ( tgt_clobbers & ~ site_clobbers ) <vul-end> return len ... | <vul-sep> unsigned long delta = ( unsigned long ) target - ( addr + 5 ) ; <vul-start> if ( len < 5 ) { # ifdef CONFIG_RETPOLINE WARN_ONCE ( "Failing to patch indirect CALL in %ps\\n" , ( void * ) addr ) ; # endif <vul-end><vul-sep> return len ; <vul-start> } <vul-end><vul-sep> |
12 | CWE-20 for ( i = 0 ; i < ( ssize_t ) stream_info -> offset_count ; i ++ ) stream_info -> offsets [ i ] += offset ; } read_info = CloneImageInfo ( image_info ) ; SetImageInfoBlob ( read_info , ( void * ) NULL , 0 ) ; images = NewImageList ( ) ; for ( scene = 0 ; scene < ( ssize_t ) number_scenes ; scene ++ ) { char file... | <vul-sep> } <vul-start> if ( fputc ( c , file ) != c ) break ; <vul-end><vul-sep> |
13 | CWE-119 static void y4m_convert_null ( y4m_input * _y4m , unsigned char * _dst , unsigned char * _aux ) { <vul-start> <vul-end> } | <vul-sep> unsigned char * _aux ) { <vul-start> ( void ) _y4m ; ( void ) _dst ; ( void ) _aux ; <vul-end><vul-sep> |
14 | CWE-400 cursor -> hashval ) { context -> dupcnt = 0 ; break ; } } if ( i == ichdr . count ) { trace_xfs_attr_list_notfound ( context ) ; return 0 ; } } else { entry = & entries [ 0 ] ; i = 0 ; } context -> resynch = 0 ; retval = 0 ; for ( ; i < ichdr . count ; entry ++ , i ++ ) { if ( be32_to_cpu ( entry -> hashval ) !... | <vul-sep> retval = xfs_attr_rmtval_get ( & args ) ; <vul-start> if ( ! retval ) <vul-end><vul-sep> |
15 | CWE-190 static void controloptions ( lua_State * L , int opt , const char * * fmt , Header * h ) { switch ( opt ) { case ' ' : return ; case '>' : h -> endian = BIG ; return ; case '<' : h -> endian = LITTLE ; return ; case '!' : { <vul-start> int a = getnum ( L , fmt , MAXALIGN ) ; <vul-end> if ( ! isp2 ( a ) ) luaL_e... | <vul-sep> case '!' : { <vul-start> int a = getnum ( fmt , MAXALIGN ) ; <vul-end><vul-sep> |
16 | CWE-119 break ; case R_BIN_WASM_VALUETYPE_f32 : snprintf ( op -> txt , R_ASM_BUFSIZE , "%s (result f32)" , opdef -> txt ) ; break ; case R_BIN_WASM_VALUETYPE_f64 : snprintf ( op -> txt , R_ASM_BUFSIZE , "%s (result f64)" , opdef -> txt ) ; break ; default : snprintf ( op -> txt , R_ASM_BUFSIZE , "%s (result ?)" , opdef... | <vul-sep> snprintf ( op -> txt , R_ASM_BUFSIZE , "%s %d " , opdef -> txt , count ) ; <vul-start> char * txt = op -> txt ; int txtLen = strlen ( op -> txt ) ; int txtLeft = R_ASM_BUFSIZE - txtLen ; txt += txtLen ; for ( i = 0 ; i < count && txtLen + 10 < R_ASM_BUFSIZE ; i ++ ) { snprintf ( txt , txtLeft , "%d " , table ... |
17 | CWE-476 void dump_isom_sdp ( GF_ISOFile * file , char * inName , Bool is_final_name ) { const char * sdp ; u32 size , i ; FILE * dump ; if ( inName ) { char szBuf [ 1024 ] ; strcpy ( szBuf , inName ) ; if ( ! is_final_name ) { char * ext = strchr ( szBuf , '.' ) ; if ( ext ) ext [ 0 ] = 0 ; strcat ( szBuf , "_sdp.txt" ... | <vul-sep> gf_isom_sdp_get ( file , & sdp , & size ) ; <vul-start> if ( sdp && size ) <vul-end><vul-sep> |
18 | CWE-119 if ( i < 0 ) return ( i ) ; if ( i == 0 ) { SSLerr ( SSL_F_DTLS1_READ_BYTES , SSL_R_SSL_HANDSHAKE_FAILURE ) ; return ( - 1 ) ; } } start : s -> rwstate = SSL_NOTHING ; rr = & ( s -> s3 -> rrec ) ; if ( s -> state == SSL_ST_OK && rr -> length == 0 ) { pitem * item ; item = pqueue_pop ( s -> d1 -> buffered_app_da... | <vul-sep> { <vul-start> if ( dtls1_buffer_record ( s , & ( s -> d1 -> buffered_app_data ) , rr -> seq_num ) < 0 ) { SSLerr ( SSL_F_DTLS1_READ_BYTES , ERR_R_INTERNAL_ERROR ) ; return - 1 ; } <vul-end><vul-sep> |
19 | nan <vul-start> void vp8_decoder_remove_threads ( VP8D_COMP * pbi ) { if ( pbi -> b_multithreaded_rd ) { <vul-end> int i ; pbi -> b_multithreaded_rd = 0 ; <vul-start> for ( i = 0 ; i < pbi -> allocated_decoding_thread_count ; i ++ ) { <vul-end> sem_post ( & pbi -> h_event_start_decoding [ i ] ) ; pthread_join ( pbi -> ... | <vul-sep> <vul-start>void vp8_decoder_remove_threads ( VP8D_COMP * pbi ) { if ( pbi -> b_multithreaded_rd ) { <vul-end><vul-sep> pbi -> b_multithreaded_rd = 0 ; <vul-start> for ( i = 0 ; i < pbi -> allocated_decoding_thread_count ; ++ i ) { <vul-end><vul-sep> } <vul-start> for ( i = 0 ; i < pbi -> allocated_decoding_th... |
20 | CWE-20 <vul-start> void f2fs_wait_discard_bios ( struct f2fs_sb_info * sbi ) <vul-end> { __issue_discard_cmd ( sbi , false ) ; __drop_discard_cmd ( sbi ) ; <vul-start> __wait_discard_cmd ( sbi , false ) ; <vul-end> } | <vul-sep> <vul-start>void f2fs_wait_discard_bios ( struct f2fs_sb_info * sbi , bool umount ) <vul-end><vul-sep> __drop_discard_cmd ( sbi ) ; <vul-start> __wait_discard_cmd ( sbi , ! umount ) ; <vul-end><vul-sep> |
21 | CWE-400 <vul-start> static int match ( Reinst * pc , const char * sp , const char * bol , int flags , Resub * out ) <vul-end> { Resub scratch ; <vul-start> <vul-end> int i ; Rune c ; <vul-start> <vul-end> for ( ; ; ) { switch ( pc -> opcode ) { case I_END : <vul-start> return 1 ; <vul-end> case I_JUMP : pc = pc -> x ; ... | <vul-sep> <vul-start>static int match ( Reinst * pc , const char * sp , const char * bol , int flags , Resub * out , int depth ) <vul-end><vul-sep> Resub scratch ; <vul-start> int result ; <vul-end><vul-sep> Rune c ; <vul-start> if ( depth > MAXREC ) return - 1 ; <vul-end><vul-sep> case I_END : <vul-start> return 0 ; <... |
22 | CWE-119 <vul-start> static void write_ref_frames ( const VP9_COMP * cpi , vp9_writer * w ) { const VP9_COMMON * const cm = & cpi -> common ; const MACROBLOCKD * const xd = & cpi -> mb . e_mbd ; <vul-end> const MB_MODE_INFO * const mbmi = & xd -> mi [ 0 ] -> mbmi ; const int is_compound = has_second_ref ( mbmi ) ; const... | <vul-sep> <vul-start>static void write_ref_frames ( const VP9_COMMON * cm , const MACROBLOCKD * xd , vpx_writer * w ) { <vul-end><vul-sep> const int segment_id = mbmi -> segment_id ; <vul-start> if ( segfeature_active ( & cm -> seg , segment_id , SEG_LVL_REF_FRAME ) ) { <vul-end><vul-sep> assert ( mbmi -> ref_frame [ 0... |
23 | CWE-125 static void nfnetlink_rcv_batch ( struct sk_buff * skb , struct nlmsghdr * nlh , u_int16_t subsys_id ) { struct sk_buff * oskb = skb ; struct net * net = sock_net ( skb -> sk ) ; const struct nfnetlink_subsystem * ss ; const struct nfnl_callback * nc ; static LIST_HEAD ( err_list ) ; u32 status ; int err ; if (... | <vul-sep> err = 0 ; <vul-start> if ( nlh -> nlmsg_len < NLMSG_HDRLEN || skb -> len < nlh -> nlmsg_len || nlmsg_len ( nlh ) < sizeof ( struct nfgenmsg ) ) { nfnl_err_reset ( & err_list ) ; status |= NFNL_BATCH_FAILURE ; goto done ; <vul-end><vul-sep> |
24 | CWE-326 int secure_check ( void * data ) { const at91_secure_header_t * header ; void * file ; <vul-start> <vul-end> if ( secure_decrypt ( data , sizeof ( * header ) , 0 ) ) <vul-start> return - 1 ; <vul-end> header = ( const at91_secure_header_t * ) data ; if ( header -> magic != AT91_SECURE_MAGIC ) <vul-start> return... | <vul-sep> void * file ; <vul-start> int ret = - 1 ; <vul-end><vul-sep> if ( secure_decrypt ( data , sizeof ( * header ) , 0 ) ) <vul-start> goto secure_wipe_keys ; <vul-end><vul-sep> if ( header -> magic != AT91_SECURE_MAGIC ) <vul-start> goto secure_wipe_keys ; <vul-end><vul-sep> file = ( unsigned char * ) data + size... |
25 | CWE-190 int jas_stream_gobble ( jas_stream_t * stream , int n ) { int m ; <vul-start> <vul-end> m = n ; for ( m = n ; m > 0 ; -- m ) { if ( jas_stream_getc ( stream ) == EOF ) { return n - m ; } } return n ; } | <vul-sep> int m ; <vul-start> if ( n < 0 ) { jas_deprecated ( "negative count for jas_stream_gobble" ) ; } <vul-end><vul-sep> |
26 | CWE-476 rdpCredssp * credssp_new ( freerdp * instance , rdpTransport * transport , rdpSettings * settings ) { rdpCredssp * credssp ; credssp = ( rdpCredssp * ) malloc ( sizeof ( rdpCredssp ) ) ; ZeroMemory ( credssp , sizeof ( rdpCredssp ) ) ; if ( credssp != NULL ) { HKEY hKey ; LONG status ; DWORD dwType ; DWORD dwSi... | <vul-sep> ZeroMemory ( & credssp -> authInfo , sizeof ( SecBuffer ) ) ; <vul-start> SecInvalidateHandle ( & credssp -> context ) ; <vul-end><vul-sep> |
27 | CWE-284 bool semaphore_try_wait ( semaphore_t * semaphore ) { assert ( semaphore != NULL ) ; assert ( semaphore -> fd != INVALID_FD ) ; <vul-start> int flags = fcntl ( semaphore -> fd , F_GETFL ) ; <vul-end> if ( flags == - 1 ) { LOG_ERROR ( "%s unable to get flags for semaphore fd: %s" , __func__ , strerror ( errno ) ... | <vul-sep> assert ( semaphore -> fd != INVALID_FD ) ; <vul-start> int flags = TEMP_FAILURE_RETRY ( fcntl ( semaphore -> fd , F_GETFL ) ) ; <vul-end><vul-sep> } <vul-start> if ( TEMP_FAILURE_RETRY ( fcntl ( semaphore -> fd , F_SETFL , flags | O_NONBLOCK ) ) == - 1 ) { <vul-end><vul-sep> return false ; <vul-start> if ( TE... |
28 | CWE-119 <vul-start> void usage_exit ( ) { <vul-end> int i ; fprintf ( stderr , "Usage: %s <options> filename\\n\\n" "Options:\\n" , exec_name ) ; arg_show_usage ( stderr , all_args ) ; # if CONFIG_VP8_DECODER fprintf ( stderr , "\\nVP8 Postprocessing Options:\\n" ) ; arg_show_usage ( stderr , vp8_pp_args ) ; # endif fp... | <vul-sep> <vul-start>void usage_exit ( void ) { <vul-end><vul-sep> fprintf ( stderr , " %-6s - %s\\n" , <vul-start> decoder -> name , vpx_codec_iface_name ( decoder -> codec_interface ( ) ) ) ; <vul-end><vul-sep> |
29 | CWE-787 char * gf_text_get_utf8_line ( char * szLine , u32 lineSize , FILE * txt_in , s32 unicode_type ) { u32 i , j , len ; char * sOK ; char szLineConv [ 1024 ] ; unsigned short * sptr ; memset ( szLine , 0 , sizeof ( char ) * lineSize ) ; sOK = fgets ( szLine , lineSize , txt_in ) ; if ( ! sOK ) return NULL ; if ( u... | <vul-sep> len = ( u32 ) strlen ( szLine ) ; <vul-start> for ( i = 0 ; i < len && j < sizeof ( szLineConv ) - 1 ; i ++ , j ++ ) { <vul-end><vul-sep> if ( ( szLine [ i + 1 ] & 0xc0 ) != 0x80 ) { <vul-start> if ( j + 1 < sizeof ( szLineConv ) - 1 ) { <vul-end><vul-sep> } <vul-start> else break ; } <vul-end><vul-sep> else ... |
30 | CWE-835 static int lldp_private_8021_print ( netdissect_options * ndo , const u_char * tptr , u_int tlv_len ) { int subtype , hexdump = FALSE ; u_int sublen ; u_int tval ; <vul-start> uint8_t i ; <vul-end> if ( tlv_len < 4 ) { return hexdump ; } subtype = * ( tptr + 3 ) ; ND_PRINT ( ( ndo , "\\n\\t %s Subtype (%u)" , ... | <vul-sep> u_int tval ; <vul-start> u_int i ; <vul-end><vul-sep> |
31 | CWE-119 static int test_candidate_kf ( VP8_COMP * cpi , FIRSTPASS_STATS * last_frame , FIRSTPASS_STATS * this_frame , FIRSTPASS_STATS * next_frame ) { int is_viable_kf = 0 ; if ( ( this_frame -> pcnt_second_ref < 0.10 ) && ( next_frame -> pcnt_second_ref < 0.10 ) && ( ( this_frame -> pcnt_inter < 0.05 ) || ( ( ( this_f... | <vul-sep> double next_iiratio ; <vul-start> memcpy ( & local_next_frame , next_frame , sizeof ( * next_frame ) ) ; <vul-end><vul-sep> |
32 | CWE-119 static void write_modes ( VP9_COMP * cpi , <vul-start> const TileInfo * const tile , vp9_writer * w , TOKENEXTRA * * tok , TOKENEXTRA * tok_end ) { <vul-end> int mi_row , mi_col ; <vul-start> <vul-end> for ( mi_row = tile -> mi_row_start ; mi_row < tile -> mi_row_end ; mi_row += MI_BLOCK_SIZE ) { <vul-start> vp... | <vul-sep> static void write_modes ( VP9_COMP * cpi , <vul-start> const TileInfo * const tile , vpx_writer * w , TOKENEXTRA * * tok , const TOKENEXTRA * const tok_end ) { const VP9_COMMON * const cm = & cpi -> common ; MACROBLOCKD * const xd = & cpi -> td . mb . e_mbd ; <vul-end><vul-sep> int mi_row , mi_col ; <vul-star... |
33 | CWE-20 error_t mqttSnClientSubscribe ( MqttSnClientContext * context , const char_t * topicName , MqttSnQosLevel qos ) { error_t error ; systime_t time ; if ( context == NULL || topicName == NULL ) return ERROR_INVALID_PARAMETER ; error = NO_ERROR ; while ( ! error ) { time = osGetSystemTime ( ) ; if ( context -> state... | <vul-sep> { <vul-start> if ( osStrchr ( topicName , '#' ) == NULL && osStrchr ( topicName , '+' ) == NULL ) <vul-end><vul-sep> |
34 | CWE-119 static RD_BOOL mcs_recv_connect_response ( STREAM mcs_data ) { UNUSED ( mcs_data ) ; uint8 result ; <vul-start> int length ; <vul-end> STREAM s ; <vul-start> <vul-end> RD_BOOL is_fastpath ; uint8 fastpath_hdr ; logger ( Protocol , Debug , "%s()" , __func__ ) ; s = iso_recv ( & is_fastpath , & fastpath_hdr ) ; i... | <vul-sep> uint8 result ; <vul-start> uint32 length ; <vul-end><vul-sep> STREAM s ; <vul-start> struct stream packet ; <vul-end><vul-sep> return False ; <vul-start> packet = * s ; <vul-end><vul-sep> in_uint8s ( s , length ) ; <vul-start> if ( ! s_check_rem ( s , length ) ) { rdp_protocol_error ( "mcs_recv_connect_respon... |
35 | CWE-189 Datum txid_current_snapshot ( PG_FUNCTION_ARGS ) { TxidSnapshot * snap ; uint32 nxip , i , size ; TxidEpoch state ; Snapshot cur ; cur = GetActiveSnapshot ( ) ; if ( cur == NULL ) elog ( ERROR , "no active snapshot set" ) ; load_xid_epoch ( & state ) ; <vul-start> <vul-end> nxip = cur -> xcnt ; size = TXID_SNAP... | <vul-sep> load_xid_epoch ( & state ) ; <vul-start> StaticAssertStmt ( MAX_BACKENDS * 2 <= TXID_SNAPSHOT_MAX_NXIP , "possible overflow in txid_current_snapshot()" ) ; <vul-end><vul-sep> |
36 | CWE-119 <vul-start> static double get_prediction_decay_rate ( const VP9_COMMON * cm , <vul-end> const FIRSTPASS_STATS * next_frame ) { <vul-start> const double mb_sr_err_diff = ( next_frame -> sr_coded_error - next_frame -> coded_error ) / cm -> MBs ; const double second_ref_decay = mb_sr_err_diff <= 512.0 ? fclamp ( p... | <vul-sep> <vul-start>static double get_prediction_decay_rate ( const VP9_COMP * cpi , <vul-end><vul-sep> const FIRSTPASS_STATS * next_frame ) { <vul-start> const double sr_decay_rate = get_sr_decay_rate ( cpi , next_frame ) ; const double zero_motion_factor = ( 0.95 * pow ( ( next_frame -> pcnt_inter - next_frame -> pc... |
37 | CWE-190 int bmp_validate ( jas_stream_t * in ) { int n ; int i ; <vul-start> uchar buf [ 2 ] ; <vul-end> assert ( JAS_STREAM_MAXPUTBACK >= 2 ) ; if ( ( n = jas_stream_read ( in , ( char * ) buf , 2 ) ) < 0 ) { return - 1 ; } for ( i = n - 1 ; i >= 0 ; -- i ) { if ( jas_stream_ungetc ( in , buf [ i ] ) == EOF ) { return... | <vul-sep> int i ; <vul-start> jas_uchar buf [ 2 ] ; <vul-end><vul-sep> |
38 | CWE-416 } ep = { 0 } ; ut8 sep [ 2 * sizeof ( ut64 ) ] = { 0 } ; sdb_set ( bin -> kv , sdb_fmt ( 0 , "mach0_cmd_%d.cmd" , i ) , "main" , 0 ) ; if ( ! is_first_thread ) { bprintf ( "Error: LC_MAIN with other threads\\n" ) ; return false ; } if ( off + 8 > bin -> size || off + sizeof ( ep ) > bin -> size ) { bprintf ( "i... | <vul-sep> sdb_set ( bin -> kv , sdb_fmt ( 0 , "mach0_cmd_%d.cmd" , i ) , "dyld_info" , 0 ) ; <vul-start> bin -> dyld_info = calloc ( 1 , sizeof ( struct dyld_info_command ) ) ; if ( bin -> dyld_info ) { <vul-end><vul-sep> bprintf ( "Cannot parse dyldinfo\\n" ) ; <vul-start> R_FREE ( bin -> dyld_info ) ; <vul-end><vul-s... |
39 | CWE-20 static int _snd_timer_stop ( struct snd_timer_instance * timeri , int keep_flag , int event ) { struct snd_timer * timer ; unsigned long flags ; if ( snd_BUG_ON ( ! timeri ) ) return - ENXIO ; if ( timeri -> flags & SNDRV_TIMER_IFLG_SLAVE ) { if ( ! keep_flag ) { spin_lock_irqsave ( & slave_active_lock , flags )... | <vul-sep> timeri -> flags &= ~ SNDRV_TIMER_IFLG_RUNNING ; <vul-start> list_del_init ( & timeri -> ack_list ) ; list_del_init ( & timeri -> active_list ) ; <vul-end><vul-sep> |
40 | CWE-120 static int mwifiex_update_vs_ie ( const u8 * ies , int ies_len , struct mwifiex_ie * * ie_ptr , u16 mask , unsigned int oui , u8 oui_type ) { struct ieee_types_header * vs_ie ; struct mwifiex_ie * ie = * ie_ptr ; const u8 * vendor_ie ; vendor_ie = cfg80211_find_vendor_ie ( oui , oui_type , ies , ies_len ) ; if ... | <vul-sep> vs_ie = ( struct ieee_types_header * ) vendor_ie ; <vul-start> if ( le16_to_cpu ( ie -> ie_length ) + vs_ie -> len + 2 > IEEE_MAX_IE_SIZE ) return - EINVAL ; <vul-end><vul-sep> |
41 | CWE-436 static gssize find_auth_end ( FlatpakProxyClient * client , Buffer * buffer ) { <vul-start> guchar * match ; int i ; if ( client -> auth_end_offset > 0 ) <vul-end> { <vul-start> gsize left = strlen ( AUTH_END_STRING ) - client -> auth_end_offset ; gsize to_match = MIN ( left , buffer -> pos ) ; if ( memcmp ( bu... | <vul-sep> { <vul-start> goffset offset = 0 ; gsize original_size = client -> auth_buffer -> len ; g_byte_array_append ( client -> auth_buffer , buffer -> data , buffer -> pos ) ; while ( TRUE ) <vul-end><vul-sep> { <vul-start> guint8 * line_start = client -> auth_buffer -> data + offset ; gsize remaining_data = client ... |
42 | CWE-399 static void perf_event_comm_output ( struct perf_event * event , struct perf_comm_event * comm_event ) { struct perf_output_handle handle ; struct perf_sample_data sample ; int size = comm_event -> event_id . header . size ; int ret ; perf_event_header__init_id ( & comm_event -> event_id . header , & sample , e... | <vul-sep> ret = perf_output_begin ( & handle , event , <vul-start> comm_event -> event_id . header . size , 0 ) ; <vul-end><vul-sep> |
43 | CWE-119 static vpx_codec_err_t parse_options ( SvcContext * svc_ctx , const char * options ) { char * input_string ; char * option_name ; char * option_value ; char * input_ptr ; <vul-start> int is_keyframe_qaunt_set = 0 ; <vul-end> vpx_codec_err_t res = VPX_CODEC_OK ; <vul-start> <vul-end> if ( options == NULL ) retur... | <vul-sep> char * input_ptr ; <vul-start> SvcInternal_t * const si = get_svc_internal ( svc_ctx ) ; <vul-end><vul-sep> vpx_codec_err_t res = VPX_CODEC_OK ; <vul-start> int i , alt_ref_enabled = 0 ; <vul-end><vul-sep> } <vul-start> if ( strcmp ( "spatial-layers" , option_name ) == 0 ) { svc_ctx -> spatial_layers = atoi (... |
44 | CWE-476 static void i8042_stop ( struct serio * serio ) { struct i8042_port * port = serio -> port_data ; <vul-start> <vul-end> port -> exists = false ; <vul-start> <vul-end> synchronize_irq ( I8042_AUX_IRQ ) ; synchronize_irq ( I8042_KBD_IRQ ) ; <vul-start> port -> serio = NULL ; <vul-end> } | <vul-sep> struct i8042_port * port = serio -> port_data ; <vul-start> spin_lock_irq ( & i8042_lock ) ; <vul-end><vul-sep> port -> exists = false ; <vul-start> port -> serio = NULL ; spin_unlock_irq ( & i8042_lock ) ; <vul-end><vul-sep> synchronize_irq ( I8042_KBD_IRQ ) ; <vul-start><vul-end><vul-sep> |
45 | CWE-190 # endif # if ZEND_DEBUG zend_mm_change_huge_block_size ( heap , ptr , new_size , real_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC ) ; # else zend_mm_change_huge_block_size ( heap , ptr , new_size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC ) ; # endif return ptr ; } } else { # if ZEND_MM_... | <vul-sep> if ( info & ZEND_MM_IS_SRUN ) { <vul-start> int old_bin_num = ZEND_MM_SRUN_BIN_NUM ( info ) ; <vul-end><vul-sep> old_size = bin_data_size [ old_bin_num ] ; <vul-start> if ( size <= ZEND_MM_MAX_SMALL_SIZE ) { int bin_num = ZEND_MM_SMALL_SIZE_TO_BIN ( size ) ; <vul-end><vul-sep> return ptr ; <vul-start> } <vul-... |
46 | CWE-399 int cib_remote_perform_op ( cib_t * cib , const char * op , const char * host , const char * section , xmlNode * data , xmlNode * * output_data , int call_options , const char * name ) { int rc = pcmk_ok ; <vul-start> <vul-end> xmlNode * op_msg = NULL ; xmlNode * op_reply = NULL ; cib_remote_opaque_t * private ... | <vul-sep> int rc = pcmk_ok ; <vul-start> int disconnected = 0 ; int remaining_time = 0 ; time_t start_time ; <vul-end><vul-sep> cib_remote_opaque_t * private = cib -> variant_opaque ; <vul-start><vul-end><vul-sep> crm_trace ( "Sending %s message to CIB service" , op ) ; <vul-start> if ( ! ( call_options & cib_sync_call... |
47 | CWE-200 static void parse_cfg ( int flags , int argc , const char * * argv , cfg_t * cfg ) { <vul-start> <vul-end> int i ; memset ( cfg , 0 , sizeof ( cfg_t ) ) ; cfg -> debug_file = stderr ; for ( i = 0 ; i < argc ; i ++ ) { if ( strncmp ( argv [ i ] , "max_devices=" , 12 ) == 0 ) sscanf ( argv [ i ] , "max_devices=%u... | <vul-sep> static void parse_cfg ( int flags , int argc , const char * * argv , cfg_t * cfg ) { <vul-start> struct stat st ; FILE * file = NULL ; int fd = - 1 ; <vul-end><vul-sep> else { <vul-start> fd = open ( filename , O_WRONLY | O_APPEND | O_CLOEXEC | O_NOFOLLOW | O_NOCTTY ) ; if ( fd >= 0 && ( fstat ( fd , & st ) =... |
48 | CWE-119 <vul-start> static MB_PREDICTION_MODE read_intra_mode_uv ( VP9_COMMON * cm , vp9_reader * r , MB_PREDICTION_MODE y_mode ) { const MB_PREDICTION_MODE uv_mode = read_intra_mode ( r , cm -> fc . uv_mode_prob [ y_mode ] ) ; if ( ! cm -> frame_parallel_decoding_mode ) ++ cm -> counts . uv_mode [ y_mode ] [ uv_mode ]... | <vul-sep> <vul-start>static PREDICTION_MODE read_intra_mode_uv ( VP9_COMMON * cm , MACROBLOCKD * xd , vpx_reader * r , PREDICTION_MODE y_mode ) { const PREDICTION_MODE uv_mode = read_intra_mode ( r , cm -> fc -> uv_mode_prob [ y_mode ] ) ; FRAME_COUNTS * counts = xd -> counts ; if ( counts ) ++ counts -> uv_mode [ y_mo... |
49 | CWE-119 static __u8 * sp_report_fixup ( struct hid_device * hdev , __u8 * rdesc , unsigned int * rsize ) { <vul-start> if ( * rsize >= 107 && rdesc [ 104 ] == 0x26 && rdesc [ 105 ] == 0x80 && <vul-end> rdesc [ 106 ] == 0x03 ) { hid_info ( hdev , "fixing up Sunplus Wireless Desktop report descriptor\\n" ) ; rdesc [ 105 ... | <vul-sep> { <vul-start> if ( * rsize >= 112 && rdesc [ 104 ] == 0x26 && rdesc [ 105 ] == 0x80 && <vul-end><vul-sep> |
50 | CWE-401 struct sk_buff * ack_skb ; struct { struct i2400m_l3l4_hdr hdr ; struct i2400m_tlv_rf_operation sw_rf ; } __packed * cmd ; char strerr [ 32 ] ; d_fnstart ( 4 , dev , "(wimax_dev %p state %d)\\n" , wimax_dev , state ) ; result = - ENOMEM ; cmd = kzalloc ( sizeof ( * cmd ) , GFP_KERNEL ) ; if ( cmd == NULL ) goto... | <vul-sep> error_cmd : <vul-start><vul-end><vul-sep> wimax_dev , state , result ) ; <vul-start> kfree ( cmd ) ; <vul-end><vul-sep> |
51 | CWE-264 static int perf_event_read_group ( struct perf_event * event , u64 read_format , char __user * buf ) { struct perf_event * leader = event -> group_leader , * sub ; <vul-start> int n = 0 , size = 0 , ret = - EFAULT ; <vul-end> struct perf_event_context * ctx = leader -> ctx ; <vul-start> <vul-end> u64 values [ 5... | <vul-sep> struct perf_event * leader = event -> group_leader , * sub ; <vul-start><vul-end><vul-sep> struct perf_event_context * ctx = leader -> ctx ; <vul-start> int n = 0 , size = 0 , ret ; u64 count , enabled , running ; <vul-end><vul-sep> u64 values [ 5 ] ; <vul-start> lockdep_assert_held ( & ctx -> mutex ) ; <vul-... |
52 | CWE-284 bool config_save ( const config_t * config , const char * filename ) { assert ( config != NULL ) ; assert ( filename != NULL ) ; assert ( * filename != '\\0' ) ; <vul-start> char * temp_filename = osi_calloc ( strlen ( filename ) + 5 ) ; if ( ! temp_filename ) { LOG_ERROR ( "%s unable to allocate memory for fil... | <vul-sep> assert ( * filename != '\\0' ) ; <vul-start> int dir_fd = - 1 ; FILE * fp = NULL ; static const char * temp_file_ext = ".new" ; const int filename_len = strlen ( filename ) ; const int temp_filename_len = filename_len + strlen ( temp_file_ext ) + 1 ; char * temp_filename = osi_calloc ( temp_filename_len ) ; s... |
53 | CWE-20 error_t enc28j60UpdateMacAddrFilter ( NetInterface * interface ) { uint_t i ; uint_t k ; uint32_t crc ; uint8_t hashTable [ 8 ] ; MacFilterEntry * entry ; TRACE_DEBUG ( "Updating MAC filter...\\r\\n" ) ; osMemset ( hashTable , 0 , sizeof ( hashTable ) ) ; for ( i = 0 ; i < MAC_ADDR_FILTER_SIZE ; i ++ ) { entry =... | <vul-sep> } <vul-start> enc28j60WriteReg ( interface , ENC28J60_EHT0 , hashTable [ 0 ] ) ; enc28j60WriteReg ( interface , ENC28J60_EHT1 , hashTable [ 1 ] ) ; enc28j60WriteReg ( interface , ENC28J60_EHT2 , hashTable [ 2 ] ) ; enc28j60WriteReg ( interface , ENC28J60_EHT3 , hashTable [ 3 ] ) ; enc28j60WriteReg ( interface... |
54 | CWE-119 <vul-start> static void <vul-end> fpAcc ( TIFF * tif , uint8 * cp0 , tmsize_t cc ) { tmsize_t stride = PredictorState ( tif ) -> stride ; uint32 bps = tif -> tif_dir . td_bitspersample / 8 ; tmsize_t wc = cc / bps ; tmsize_t count = cc ; uint8 * cp = ( uint8 * ) cp0 ; uint8 * tmp = ( uint8 * ) _TIFFmalloc ( cc ... | <vul-sep> <vul-start>static int <vul-end><vul-sep> uint8 * tmp = ( uint8 * ) _TIFFmalloc ( cc ) ; <vul-start> if ( cc % ( bps * stride ) != 0 ) { TIFFErrorExt ( tif -> tif_clientdata , "fpAcc" , "%s" , "cc%(bps*stride))!=0" ) ; return 0 ; } <vul-end><vul-sep> if ( ! tmp ) <vul-start> return 0 ; <vul-end><vul-sep> _TIFF... |
55 | CWE-119 for ( idx = 0 ; idx < ps_dec -> ps_cur_slice -> u1_num_ref_idx_lx_active [ 1 ] ; idx ++ ) { UWORD8 u1_tmp_idx = idx << 1 ; ps_pic = ps_dec -> ps_ref_pic_buf_lx [ 1 ] [ idx ] ; ppv_map_ref_idx_to_poc_lx_t [ u1_tmp_idx ] = ( ps_pic -> pu1_buf1 ) ; ppv_map_ref_idx_to_poc_lx_b [ u1_tmp_idx + 1 ] = ( ps_pic -> pu1_b... | <vul-sep> if ( ! ps_dec -> ps_dpb_cmds -> u1_dpb_commands_read ) <vul-start> { i_temp = ih264d_read_mmco_commands ( ps_dec ) ; if ( i_temp < 0 ) { return ERROR_DBP_MANAGER_T ; } ps_dec -> u4_bitoffset = i_temp ; } <vul-end><vul-sep> |
56 | CWE-295 void log_flush ( LOG_MODE new_mode ) { CRYPTO_THREAD_write_lock ( stunnel_locks [ LOCK_LOG_MODE ] ) ; <vul-start> if ( log_mode != LOG_MODE_CONFIGURED || new_mode != LOG_MODE_ERROR ) <vul-end> log_mode = new_mode ; if ( new_mode != LOG_MODE_BUFFER ) { CRYPTO_THREAD_write_lock ( stunnel_locks [ LOCK_LOG_BUFFER ]... | <vul-sep> CRYPTO_THREAD_write_lock ( stunnel_locks [ LOCK_LOG_MODE ] ) ; <vul-start><vul-end><vul-sep> |
57 | CWE-119 static void tokenadd ( struct jv_parser * p , char c ) { assert ( p -> tokenpos <= p -> tokenlen ) ; <vul-start> if ( p -> tokenpos == p -> tokenlen ) { <vul-end> p -> tokenlen = p -> tokenlen * 2 + 256 ; p -> tokenbuf = jv_mem_realloc ( p -> tokenbuf , p -> tokenlen ) ; } assert ( p -> tokenpos < p -> tokenlen... | <vul-sep> assert ( p -> tokenpos <= p -> tokenlen ) ; <vul-start> if ( p -> tokenpos >= ( p -> tokenlen - 1 ) ) { <vul-end><vul-sep> |
58 | CWE-125 static void ttm_put_pages ( struct page * * pages , unsigned npages , int flags , enum ttm_caching_state cstate ) { struct ttm_page_pool * pool = ttm_get_pool ( flags , false , cstate ) ; # ifdef CONFIG_TRANSPARENT_HUGEPAGE struct ttm_page_pool * huge = ttm_get_pool ( flags , true , cstate ) ; # endif unsigned ... | <vul-sep> for ( j = 1 ; j < HPAGE_PMD_NR ; ++ j ) <vul-start> if ( ++ p != pages [ i + j ] ) <vul-end><vul-sep> for ( j = 1 ; j < HPAGE_PMD_NR ; ++ j ) <vul-start> if ( ++ p != pages [ i + j ] ) <vul-end><vul-sep> |
59 | CWE-200 static int raptor_rdfxml_parse_start ( raptor_parser * rdf_parser ) { raptor_uri * uri = rdf_parser -> base_uri ; raptor_rdfxml_parser * rdf_xml_parser ; rdf_xml_parser = ( raptor_rdfxml_parser * ) rdf_parser -> context ; if ( ! uri ) return 1 ; raptor_sax2_set_option ( rdf_xml_parser -> sax2 , RAPTOR_OPTION_NO... | <vul-sep> RAPTOR_OPTIONS_GET_NUMERIC ( rdf_parser , RAPTOR_OPTION_NO_FILE ) ) ; <vul-start> raptor_sax2_set_option ( rdf_xml_parser -> sax2 , RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES , NULL , RAPTOR_OPTIONS_GET_NUMERIC ( rdf_parser , RAPTOR_OPTION_LOAD_EXTERNAL_ENTITIES ) ) ; <vul-end><vul-sep> |
60 | CWE-401 static ssize_t sof_dfsentry_write ( struct file * file , const char __user * buffer , size_t count , loff_t * ppos ) { # if IS_ENABLED ( CONFIG_SND_SOC_SOF_DEBUG_IPC_FLOOD_TEST ) struct snd_sof_dfsentry * dfse = file -> private_data ; struct snd_sof_dev * sdev = dfse -> sdev ; unsigned long ipc_duration_ms = 0 ... | <vul-sep> if ( strcmp ( dentry -> d_name . name , "ipc_flood_count" ) && <vul-start> strcmp ( dentry -> d_name . name , "ipc_flood_duration_ms" ) ) { ret = - EINVAL ; goto out ; } <vul-end><vul-sep> |
61 | CWE-772 generic_ret * delete_policy_2_svc ( dpol_arg * arg , struct svc_req * rqstp ) { static generic_ret ret ; char * prime_arg ; <vul-start> gss_buffer_desc client_name , service_name ; <vul-end> OM_uint32 minor_stat ; kadm5_server_handle_t handle ; const char * errmsg = NULL ; xdr_free ( xdr_generic_ret , & ret ) ;... | <vul-sep> char * prime_arg ; <vul-start> gss_buffer_desc client_name = GSS_C_EMPTY_BUFFER ; gss_buffer_desc service_name = GSS_C_EMPTY_BUFFER ; <vul-end><vul-sep> } <vul-start> exit_func : <vul-end><vul-sep> gss_release_buffer ( & minor_stat , & service_name ) ; <vul-start><vul-end><vul-sep> |
62 | CWE-59 static int get_default_root ( pool * p , int allow_symlinks , char * * root ) { config_rec * c = NULL ; char * dir = NULL ; int res ; c = find_config ( main_server -> conf , CONF_PARAM , "DefaultRoot" , FALSE ) ; while ( c ) { pr_signals_handle ( ) ; if ( c -> argc < 2 ) { dir = c -> argv [ 0 ] ; break ; } res =... | <vul-sep> char * path , target_path [ PR_TUNABLE_PATH_MAX + 1 ] ; <vul-start><vul-end><vul-sep> } <vul-start> res = is_symlink_path ( p , path , pathlen ) ; <vul-end><vul-sep> if ( res < 0 ) { <vul-start> if ( errno == EPERM ) { pr_log_pri ( PR_LOG_WARNING , "error: DefaultRoot %s is a symlink " "(denied by AllowChroot... |
63 | CWE-125 static wStream * rdg_receive_packet ( rdpRdg * rdg ) { wStream * s ; const size_t header = sizeof ( RdgPacketHeader ) ; size_t packetLength ; assert ( header <= INT_MAX ) ; s = Stream_New ( NULL , 1024 ) ; if ( ! s ) return NULL ; if ( ! rdg_read_all ( rdg -> tlsOut , Stream_Buffer ( s ) , header ) ) { Stream_F... | <vul-sep> Stream_Read_UINT32 ( s , packetLength ) ; <vul-start> if ( ( packetLength > INT_MAX ) || ! Stream_EnsureCapacity ( s , packetLength ) || ( packetLength < header ) ) <vul-end><vul-sep> |
64 | CWE-189 Image * AutoResizeImage ( const Image * image , const char * option , MagickOffsetType * count , ExceptionInfo * exception ) { # define MAX_SIZES 16 char * q ; const char * p ; Image * resized , * images ; register ssize_t i ; size_t sizes [ MAX_SIZES ] = { 256 , 192 , 128 , 96 , 64 , 48 , 40 , 32 , 24 , 16 } ;... | <vul-sep> size = ( size_t ) strtol ( p , & q , 10 ) ; <vul-start> if ( ( p == q ) || ( size < 16 ) || ( size > 256 ) ) <vul-end><vul-sep> |
65 | NVD-CWE-Other bool_t xdr_krb5_tl_data ( XDR * xdrs , krb5_tl_data * * tl_data_head ) { krb5_tl_data * tl , * tl2 ; bool_t more ; unsigned int len ; switch ( xdrs -> x_op ) { case XDR_FREE : tl = tl2 = * tl_data_head ; while ( tl ) { tl2 = tl -> tl_data_next ; free ( tl -> tl_data_contents ) ; free ( tl ) ; tl = tl2 ; }... | <vul-sep> } <vul-start> * tl_data_head = NULL ; <vul-end><vul-sep> |
66 | CWE-264 static int futex_requeue ( u32 __user * uaddr1 , unsigned int flags , u32 __user * uaddr2 , int nr_wake , int nr_requeue , u32 * cmpval , int requeue_pi ) { union futex_key key1 = FUTEX_KEY_INIT , key2 = FUTEX_KEY_INIT ; int drop_count = 0 , task_count = 0 , ret ; struct futex_pi_state * pi_state = NULL ; struc... | <vul-sep> if ( requeue_pi ) { <vul-start> if ( uaddr1 == uaddr2 ) return - EINVAL ; <vul-end><vul-sep> goto out_put_key1 ; <vul-start> if ( requeue_pi && match_futex ( & key1 , & key2 ) ) { ret = - EINVAL ; goto out_put_keys ; } <vul-end><vul-sep> |
67 | CWE-119 int vp8_decode_frame ( VP8D_COMP * pbi ) { vp8_reader * const bc = & pbi -> mbc [ 8 ] ; VP8_COMMON * const pc = & pbi -> common ; MACROBLOCKD * const xd = & pbi -> mb ; const unsigned char * data = pbi -> fragments . ptrs [ 0 ] ; const unsigned char * data_end = data + pbi -> fragments . sizes [ 0 ] ; ptrdiff_t... | <vul-sep> { <vul-start> int n = ( int ) MIN ( sizeof ( clear_buffer ) , data_end - data ) ; <vul-end><vul-sep> data += 7 ; <vul-start> } else { memcpy ( & xd -> pre , yv12_fb_new , sizeof ( YV12_BUFFER_CONFIG ) ) ; memcpy ( & xd -> dst , yv12_fb_new , sizeof ( YV12_BUFFER_CONFIG ) ) ; <vul-end><vul-sep> xd -> mb_segeme... |
68 | CWE-20 if ( copy_from_user ( & cpuid , cpuid_arg , sizeof cpuid ) ) goto out ; r = kvm_vcpu_ioctl_set_cpuid2 ( vcpu , & cpuid , cpuid_arg -> entries ) ; break ; } case KVM_GET_CPUID2 : { struct kvm_cpuid2 __user * cpuid_arg = argp ; struct kvm_cpuid2 cpuid ; r = - EFAULT ; if ( copy_from_user ( & cpuid , cpuid_arg , si... | <vul-sep> goto out ; <vul-start> r = kvm_lapic_set_vapic_addr ( vcpu , va . vapic_addr ) ; <vul-end><vul-sep> |
69 | CWE-476 const char * zSavedAuthContext = pParse -> zAuthContext ; Select * pParent ; Select * pSub ; Select * pSub1 ; SrcList * pSrc ; SrcList * pSubSrc ; int iParent ; int iNewParent = - 1 ; int isLeftJoin = 0 ; int i ; Expr * pWhere ; struct SrcList_item * pSubitem ; sqlite3 * db = pParse -> db ; assert ( p != 0 ) ; ... | <vul-sep> isLeftJoin = 1 ; <vul-start> if ( pSubSrc -> nSrc > 1 || isAgg || IsVirtual ( pSubSrc -> a [ 0 ] . pTab ) || ( p -> selFlags & SF_Distinct ) != 0 ) { <vul-end><vul-sep> |
70 | CWE-119 static void down2_symeven ( const uint8_t * const input , int length , uint8_t * output ) { <vul-start> static const int16_t * filter = vp9_down2_symeven_half_filter ; <vul-end> const int filter_len_half = sizeof ( vp9_down2_symeven_half_filter ) / 2 ; int i , j ; uint8_t * optr = output ; int l1 = filter_len_h... | <vul-sep> uint8_t * output ) { <vul-start> const int16_t * filter = vp9_down2_symeven_half_filter ; <vul-end><vul-sep> |
71 | CWE-264 void vlan_setup ( struct net_device * dev ) { ether_setup ( dev ) ; dev -> priv_flags |= IFF_802_1Q_VLAN ; <vul-start> dev -> priv_flags &= ~ IFF_XMIT_DST_RELEASE ; <vul-end> dev -> tx_queue_len = 0 ; dev -> netdev_ops = & vlan_netdev_ops ; dev -> destructor = free_netdev ; dev -> ethtool_ops = & vlan_ethtool_o... | <vul-sep> dev -> priv_flags |= IFF_802_1Q_VLAN ; <vul-start> dev -> priv_flags &= ~ ( IFF_XMIT_DST_RELEASE | IFF_TX_SKB_SHARING ) ; <vul-end><vul-sep> |
72 | CWE-20 error_t webSocketParseHeaderField ( WebSocket * webSocket , char_t * line ) { char_t * separator ; char_t * name ; char_t * value ; WebSocketHandshakeContext * handshakeContext ; handshakeContext = & webSocket -> handshakeContext ; TRACE_DEBUG ( "%s" , line ) ; <vul-start> separator = strchr ( line , ':' ) ; <vu... | <vul-sep> TRACE_DEBUG ( "%s" , line ) ; <vul-start> separator = osStrchr ( line , ':' ) ; <vul-end><vul-sep> |
73 | CWE-362 int inet_sk_rebuild_header ( struct sock * sk ) { struct inet_sock * inet = inet_sk ( sk ) ; struct rtable * rt = ( struct rtable * ) __sk_dst_check ( sk , 0 ) ; __be32 daddr ; <vul-start> <vul-end> int err ; if ( rt ) return 0 ; <vul-start> <vul-end> daddr = inet -> inet_daddr ; <vul-start> if ( inet -> opt &&... | <vul-sep> __be32 daddr ; <vul-start> struct ip_options_rcu * inet_opt ; <vul-end><vul-sep> return 0 ; <vul-start> rcu_read_lock ( ) ; inet_opt = rcu_dereference ( inet -> inet_opt ) ; <vul-end><vul-sep> daddr = inet -> inet_daddr ; <vul-start> if ( inet_opt && inet_opt -> opt . srr ) daddr = inet_opt -> opt . faddr ; r... |
74 | CWE-119 void vp9_rc_compute_frame_size_bounds ( const VP9_COMP * cpi , <vul-start> int this_frame_target , <vul-end> int * frame_under_shoot_limit , int * frame_over_shoot_limit ) { <vul-start> if ( cpi -> oxcf . end_usage == USAGE_CONSTANT_QUALITY ) { <vul-end> * frame_under_shoot_limit = 0 ; * frame_over_shoot_limit ... | <vul-sep> void vp9_rc_compute_frame_size_bounds ( const VP9_COMP * cpi , <vul-start> int frame_target , <vul-end><vul-sep> int * frame_over_shoot_limit ) { <vul-start> if ( cpi -> oxcf . rc_mode == VPX_Q ) { <vul-end><vul-sep> } else { <vul-start> const int tolerance = ( cpi -> sf . recode_tolerance * frame_target ) / ... |
75 | CWE-362 # endif if ( skb -> protocol == htons ( ETH_P_IP ) ) { newsk = tcp_v4_syn_recv_sock ( sk , skb , req , dst ) ; if ( newsk == NULL ) return NULL ; newtcp6sk = ( struct tcp6_sock * ) newsk ; inet_sk ( newsk ) -> pinet6 = & newtcp6sk -> inet6 ; newinet = inet_sk ( newsk ) ; newnp = inet6_sk ( newsk ) ; newtp = tcp... | <vul-sep> newsk -> sk_bound_dev_if = treq -> iif ; <vul-start> newinet -> inet_opt = NULL ; <vul-end><vul-sep> |
76 | CWE-682 static int find_low_bit ( unsigned int x ) { int i ; for ( i = 0 ; i <= 31 ; i ++ ) { <vul-start> if ( x & ( 1 << i ) ) return i ; <vul-end> } return 0 ; } | <vul-sep> for ( i = 0 ; i <= 31 ; i ++ ) { <vul-start> if ( x & ( 1U << ( unsigned int ) i ) ) return i ; <vul-end><vul-sep> |
77 | CWE-787 int TIFFFlushData1 ( TIFF * tif ) { if ( tif -> tif_rawcc > 0 && tif -> tif_flags & TIFF_BUF4WRITE ) { if ( ! isFillOrder ( tif , tif -> tif_dir . td_fillorder ) && ( tif -> tif_flags & TIFF_NOBITREV ) == 0 ) TIFFReverseBits ( ( uint8 * ) tif -> tif_rawdata , tif -> tif_rawcc ) ; if ( ! TIFFAppendToStrip ( tif ... | <vul-sep> tif -> tif_rawdata , tif -> tif_rawcc ) ) <vul-start> { tif -> tif_rawcc = 0 ; tif -> tif_rawcp = tif -> tif_rawdata ; <vul-end><vul-sep> return ( 0 ) ; <vul-start> } <vul-end><vul-sep> |
78 | CWE-119 void imap_quote_string ( char * dest , size_t dlen , const char * src , bool quote_backtick ) { const char * quote = "`\\"\\\\" ; if ( ! quote_backtick ) quote ++ ; char * pt = dest ; const char * s = src ; * pt ++ = \'"\' ; <vul-start> dlen -= 2 ; <vul-end> for ( ; * s && dlen ; s ++ ) { if ( strchr ( quote , ... | <vul-sep> * pt ++ = \'"\' ; <vul-start> dlen -= 3 ; <vul-end><vul-sep> |
79 | CWE-20 void init_util ( void ) { filegen_register ( statsdir , "peerstats" , & peerstats ) ; filegen_register ( statsdir , "loopstats" , & loopstats ) ; filegen_register ( statsdir , "clockstats" , & clockstats ) ; filegen_register ( statsdir , "rawstats" , & rawstats ) ; filegen_register ( statsdir , "sysstats" , & sy... | <vul-sep> filegen_register ( statsdir , "protostats" , & protostats ) ; <vul-start><vul-end><vul-sep> filegen_register ( statsdir , "cryptostats" , & cryptostats ) ; <vul-start><vul-end><vul-sep> filegen_register ( statsdir , "timingstats" , & timingstats ) ; <vul-start><vul-end><vul-sep> |
80 | CWE-119 static int catc_probe ( struct usb_interface * intf , const struct usb_device_id * id ) { struct device * dev = & intf -> dev ; struct usb_device * usbdev = interface_to_usbdev ( intf ) ; struct net_device * netdev ; struct catc * catc ; u8 broadcast [ ETH_ALEN ] ; <vul-start> int i , pktsz , ret ; <vul-end> if... | <vul-sep> u8 broadcast [ ETH_ALEN ] ; <vul-start> int pktsz , ret ; <vul-end><vul-sep> if ( ! catc -> is_f5u011 ) { <vul-start> u32 * buf ; int i ; <vul-end><vul-sep> dev_dbg ( dev , "Checking memory size\\n" ) ; <vul-start> buf = kmalloc ( 4 , GFP_KERNEL ) ; if ( ! buf ) { ret = - ENOMEM ; goto fail_free ; } * buf = 0... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 6