Unnamed: 0 int64 0 3.91k | source stringlengths 77 51.3k | target stringlengths 52 46.1k |
|---|---|---|
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... | int cipso_v4_sock_getattr ( struct sock * sk , struct netlbl_lsm_secattr * secattr ) { 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... |
1 | CWE-284 int sock_send_all ( int sock_fd , const uint8_t * buf , int len ) { int s = len ; int ret ; while ( s ) { <vul-start> do ret = send ( sock_fd , buf , s , 0 ) ; <vul-end> while ( ret < 0 && errno == EINTR ) ; if ( ret <= 0 ) { BTIF_TRACE_ERROR ( "sock fd:%d send errno:%d, ret:%d" , sock_fd , errno , ret ) ; retu... | int sock_send_all ( int sock_fd , const uint8_t * buf , int len ) { int s = len ; int ret ; while ( s ) { do ret = TEMP_FAILURE_RETRY ( send ( sock_fd , buf , s , 0 ) ) ; while ( ret < 0 && errno == EINTR ) ; if ( ret <= 0 ) { BTIF_TRACE_ERROR ( "sock fd:%d send errno:%d, ret:%d" , sock_fd , errno , ret ) ; return - 1 ... |
2 | CWE-59 void netsnmp_init_mib ( void ) { const char * prefix ; char * env_var , * entry ; PrefixListPtr pp = & mib_prefixes [ 0 ] ; char * st = NULL ; if ( Mib ) return ; netsnmp_init_mib_internals ( ) ; netsnmp_fixup_mib_directory ( ) ; env_var = strdup ( netsnmp_get_mib_directory ( ) ) ; if ( ! env_var ) return ; <vul... | void netsnmp_init_mib ( void ) { const char * prefix ; char * env_var , * entry ; PrefixListPtr pp = & mib_prefixes [ 0 ] ; char * st = NULL ; if ( Mib ) return ; netsnmp_init_mib_internals ( ) ; netsnmp_fixup_mib_directory ( ) ; env_var = strdup ( netsnmp_get_mib_directory ( ) ) ; if ( ! env_var ) return ; DEBUGMSGTL ... |
3 | CWE-119 static int send_results ( struct iperf_test * test ) { int r = 0 ; cJSON * j ; cJSON * j_streams ; struct iperf_stream * sp ; cJSON * j_stream ; int sender_has_retransmits ; iperf_size_t bytes_transferred ; int retransmits ; j = cJSON_CreateObject ( ) ; if ( j == NULL ) { i_errno = IEPACKAGERESULTS ; r = - 1 ; ... | static int send_results ( struct iperf_test * test ) { int r = 0 ; cJSON * j ; cJSON * j_streams ; struct iperf_stream * sp ; cJSON * j_stream ; int sender_has_retransmits ; iperf_size_t bytes_transferred ; int retransmits ; j = cJSON_CreateObject ( ) ; if ( j == NULL ) { i_errno = IEPACKAGERESULTS ; r = - 1 ; } else {... |
4 | CWE-787 if ( PPEEK_IS ( '{' ) && IS_SYNTAX_OP ( syn , ONIG_SYN_OP_ESC_X_BRACE_HEX8 ) ) { PINC ; num = scan_unsigned_hexadecimal_number ( & p , end , 8 , enc ) ; if ( num < 0 ) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE ; if ( ! PEND ) { c2 = PPEEK ; if ( ONIGENC_IS_CODE_XDIGIT ( enc , c2 ) ) return ONIGERR_TOO_LONG_WIDE_CH... | if ( PPEEK_IS ( '{' ) && IS_SYNTAX_OP ( syn , ONIG_SYN_OP_ESC_X_BRACE_HEX8 ) ) { PINC ; num = scan_unsigned_hexadecimal_number ( & p , end , 8 , enc ) ; if ( num < 0 ) return ONIGERR_TOO_BIG_WIDE_CHAR_VALUE ; if ( ! PEND ) { c2 = PPEEK ; if ( ONIGENC_IS_CODE_XDIGIT ( enc , c2 ) ) return ONIGERR_TOO_LONG_WIDE_CHAR_VALUE... |
5 | CWE-19 static int ext4_xattr_block_get ( struct inode * inode , int name_index , const char * name , void * buffer , size_t buffer_size ) { struct buffer_head * bh = NULL ; struct ext4_xattr_entry * entry ; size_t size ; int error ; <vul-start> struct mb_cache * ext4_mb_cache = EXT4_GET_MB_CACHE ( inode ) ; <vul-end> e... | static int ext4_xattr_block_get ( struct inode * inode , int name_index , const char * name , void * buffer , size_t buffer_size ) { struct buffer_head * bh = NULL ; struct ext4_xattr_entry * entry ; size_t size ; int error ; struct mb2_cache * ext4_mb_cache = EXT4_GET_MB_CACHE ( inode ) ; ea_idebug ( inode , "name=%d.... |
6 | CWE-476 jas_image_t * bmp_decode ( jas_stream_t * in , char * optstr ) { jas_image_t * image ; bmp_hdr_t hdr ; bmp_info_t * info ; uint_fast16_t cmptno ; jas_image_cmptparm_t cmptparms [ 3 ] ; jas_image_cmptparm_t * cmptparm ; uint_fast16_t numcmpts ; long n ; <vul-start> <vul-end> if ( optstr ) { jas_eprintf ( "warnin... | jas_image_t * bmp_decode ( jas_stream_t * in , char * optstr ) { jas_image_t * image ; bmp_hdr_t hdr ; bmp_info_t * info ; uint_fast16_t cmptno ; jas_image_cmptparm_t cmptparms [ 3 ] ; jas_image_cmptparm_t * cmptparm ; uint_fast16_t numcmpts ; long n ; image = 0 ; info = 0 ; if ( optstr ) { jas_eprintf ( "warning: igno... |
7 | CWE-125 void skb_complete_tx_timestamp ( struct sk_buff * skb , struct skb_shared_hwtstamps * hwtstamps ) { struct sock * sk = skb -> sk ; if ( ! skb_may_tx_timestamp ( sk , false ) ) return ; if ( likely ( atomic_inc_not_zero ( & sk -> sk_refcnt ) ) ) { * skb_hwtstamps ( skb ) = * hwtstamps ; <vul-start> __skb_complet... | void skb_complete_tx_timestamp ( struct sk_buff * skb , struct skb_shared_hwtstamps * hwtstamps ) { struct sock * sk = skb -> sk ; if ( ! skb_may_tx_timestamp ( sk , false ) ) return ; if ( likely ( atomic_inc_not_zero ( & sk -> sk_refcnt ) ) ) { * skb_hwtstamps ( skb ) = * hwtstamps ; __skb_complete_tx_timestamp ( skb... |
8 | CWE-119 <vul-start> void vp9_first_pass ( VP9_COMP * cpi ) { <vul-end> int mb_row , mb_col ; <vul-start> MACROBLOCK * const x = & cpi -> mb ; <vul-end> VP9_COMMON * const cm = & cpi -> common ; MACROBLOCKD * const xd = & x -> e_mbd ; TileInfo tile ; struct macroblock_plane * const p = x -> plane ; struct macroblockd_pl... | void vp9_first_pass ( VP9_COMP * cpi , const struct lookahead_entry * source ) { int mb_row , mb_col ; MACROBLOCK * const x = & cpi -> td . mb ; VP9_COMMON * const cm = & cpi -> common ; MACROBLOCKD * const xd = & x -> e_mbd ; TileInfo tile ; struct macroblock_plane * const p = x -> plane ; struct macroblockd_plane * c... |
9 | CWE-772 else { quantum = 0 ; length = 0 ; } } if ( image_info -> verbose != MagickFalse ) { if ( use_explicit == MagickFalse ) explicit_vr [ 0 ] = '\\0' ; for ( i = 0 ; dicom_info [ i ] . description != ( char * ) NULL ; i ++ ) if ( ( group == dicom_info [ i ] . group ) && ( element == dicom_info [ i ] . element ) ) br... | else { quantum = 0 ; length = 0 ; } } if ( image_info -> verbose != MagickFalse ) { if ( use_explicit == MagickFalse ) explicit_vr [ 0 ] = '\\0' ; for ( i = 0 ; dicom_info [ i ] . description != ( char * ) NULL ; i ++ ) if ( ( group == dicom_info [ i ] . group ) && ( element == dicom_info [ i ] . element ) ) break ; ( ... |
10 | NVD-CWE-Other OM_uint32 kg_unseal_iov ( OM_uint32 * minor_status , gss_ctx_id_t context_handle , int * conf_state , gss_qop_t * qop_state , gss_iov_buffer_desc * iov , int iov_count , int toktype ) { krb5_gss_ctx_id_rec * ctx ; OM_uint32 code ; ctx = ( krb5_gss_ctx_id_rec * ) context_handle ; <vul-start> if ( ! ctx -> ... | OM_uint32 kg_unseal_iov ( OM_uint32 * minor_status , gss_ctx_id_t context_handle , int * conf_state , gss_qop_t * qop_state , gss_iov_buffer_desc * iov , int iov_count , int toktype ) { krb5_gss_ctx_id_rec * ctx ; OM_uint32 code ; ctx = ( krb5_gss_ctx_id_rec * ) context_handle ; if ( ctx -> terminated || ! ctx -> estab... |
11 | CWE-59 <vul-start> static int fsmVerify ( const char * path , rpmfi fi ) <vul-end> { int rc ; int saveerrno = errno ; struct stat dsb ; mode_t mode = rpmfiFMode ( fi ) ; rc = fsmStat ( path , 1 , & dsb ) ; if ( rc ) return rc ; if ( S_ISREG ( mode ) ) { char * rmpath = rstrscat ( NULL , path , "-RPMDELETE" , NULL ) ; r... | static int fsmVerify ( const char * path , rpmfi fi , const struct stat * fsb ) { int rc ; int saveerrno = errno ; struct stat dsb ; mode_t mode = rpmfiFMode ( fi ) ; rc = fsmStat ( path , 1 , & dsb ) ; if ( rc ) return rc ; if ( S_ISREG ( mode ) ) { char * rmpath = rstrscat ( NULL , path , "-RPMDELETE" , NULL ) ; rc =... |
12 | CWE-362 static int <vul-start> mptctl_eventreport ( unsigned long arg ) <vul-end> { struct mpt_ioctl_eventreport __user * uarg = ( void __user * ) arg ; struct mpt_ioctl_eventreport karg ; <vul-start> MPT_ADAPTER * ioc ; int iocnum ; <vul-end> int numBytes , maxEvents , max ; if ( copy_from_user ( & karg , uarg , sizeo... | static int mptctl_eventreport ( MPT_ADAPTER * ioc , unsigned long arg ) { struct mpt_ioctl_eventreport __user * uarg = ( void __user * ) arg ; struct mpt_ioctl_eventreport karg ; int numBytes , maxEvents , max ; if ( copy_from_user ( & karg , uarg , sizeof ( struct mpt_ioctl_eventreport ) ) ) { printk ( KERN_ERR MYNAM ... |
13 | CWE-787 FLOAT32 * buffer = ptr_hbe_txposer -> synth_buf ; for ( idx = 0 ; idx < num_columns ; idx ++ ) { FLOAT32 loc_qmf_buf [ 64 ] ; FLOAT32 * synth_buf_r = loc_qmf_buf ; FLOAT32 * out_buf = ptr_hbe_txposer -> ptr_input_buf + ( idx + 1 ) * ptr_hbe_txposer -> synth_size ; FLOAT32 * synth_cos_tab = ptr_hbe_txposer -> sy... | FLOAT32 * buffer = ptr_hbe_txposer -> synth_buf ; for ( idx = 0 ; idx < num_columns ; idx ++ ) { FLOAT32 loc_qmf_buf [ 64 ] ; FLOAT32 * synth_buf_r = loc_qmf_buf ; FLOAT32 * out_buf = ptr_hbe_txposer -> ptr_input_buf + ( idx + 1 ) * ptr_hbe_txposer -> synth_size ; FLOAT32 * synth_cos_tab = ptr_hbe_txposer -> synth_cos_... |
14 | CWE-264 rc = segmented_read ( ctxt , ctxt -> src2 . addr . mem , & ctxt -> src2 . val , ctxt -> src2 . bytes ) ; if ( rc != X86EMUL_CONTINUE ) goto done ; } if ( ( ctxt -> d & DstMask ) == ImplicitOps ) goto special_insn ; if ( ( ctxt -> dst . type == OP_MEM ) && ! ( ctxt -> d & Mov ) ) { rc = segmented_read ( ctxt , c... | rc = segmented_read ( ctxt , ctxt -> src2 . addr . mem , & ctxt -> src2 . val , ctxt -> src2 . bytes ) ; if ( rc != X86EMUL_CONTINUE ) goto done ; } if ( ( ctxt -> d & DstMask ) == ImplicitOps ) goto special_insn ; if ( ( ctxt -> dst . type == OP_MEM ) && ! ( ctxt -> d & Mov ) ) { rc = segmented_read ( ctxt , ctxt -> d... |
15 | CWE-119 <vul-start> static void write_intra_mode ( vp9_writer * w , MB_PREDICTION_MODE mode , const vp9_prob * probs ) { <vul-end> vp9_write_token ( w , vp9_intra_mode_tree , probs , & intra_mode_encodings [ mode ] ) ; } | static void write_intra_mode ( vpx_writer * w , PREDICTION_MODE mode , const vpx_prob * probs ) { vp9_write_token ( w , vp9_intra_mode_tree , probs , & intra_mode_encodings [ mode ] ) ; } |
16 | CWE-119 int vp9_get_qindex ( const struct segmentation * seg , int segment_id , int base_qindex ) { <vul-start> if ( vp9_segfeature_active ( seg , segment_id , SEG_LVL_ALT_Q ) ) { const int data = vp9_get_segdata ( seg , segment_id , SEG_LVL_ALT_Q ) ; <vul-end> const int seg_qindex = seg -> abs_delta == SEGMENT_ABSDATA... | int vp9_get_qindex ( const struct segmentation * seg , int segment_id , int base_qindex ) { if ( segfeature_active ( seg , segment_id , SEG_LVL_ALT_Q ) ) { const int data = get_segdata ( seg , segment_id , SEG_LVL_ALT_Q ) ; const int seg_qindex = seg -> abs_delta == SEGMENT_ABSDATA ? data : base_qindex + data ; return ... |
17 | CWE-706 ull = strtoull ( cp , & cp , 10 ) ; if ( ! cp || * cp ++ != ' ' ) SCREWUP ( "mtime.sec not delimited" ) ; if ( TYPE_OVERFLOW ( time_t , ull ) ) setimes = 0 ; mtime . tv_sec = ull ; mtime . tv_usec = strtol ( cp , & cp , 10 ) ; if ( ! cp || * cp ++ != ' ' || mtime . tv_usec < 0 || mtime . tv_usec > 999999 ) SCRE... | ull = strtoull ( cp , & cp , 10 ) ; if ( ! cp || * cp ++ != ' ' ) SCREWUP ( "mtime.sec not delimited" ) ; if ( TYPE_OVERFLOW ( time_t , ull ) ) setimes = 0 ; mtime . tv_sec = ull ; mtime . tv_usec = strtol ( cp , & cp , 10 ) ; if ( ! cp || * cp ++ != ' ' || mtime . tv_usec < 0 || mtime . tv_usec > 999999 ) SCREWUP ( "m... |
18 | CWE-310 json_t * json_object ( void ) { json_object_t * object = jsonp_malloc ( sizeof ( json_object_t ) ) ; if ( ! object ) return NULL ; <vul-start> <vul-end> json_init ( & object -> json , JSON_OBJECT ) ; if ( hashtable_init ( & object -> hashtable ) ) { jsonp_free ( object ) ; return NULL ; } object -> serial = 0 ;... | json_t * json_object ( void ) { json_object_t * object = jsonp_malloc ( sizeof ( json_object_t ) ) ; if ( ! object ) return NULL ; if ( ! hashtable_seed ) { json_object_seed ( 0 ) ; } json_init ( & object -> json , JSON_OBJECT ) ; if ( hashtable_init ( & object -> hashtable ) ) { jsonp_free ( object ) ; return NULL ; }... |
19 | CWE-264 void perf_event_disable ( struct perf_event * event ) { <vul-start> struct perf_event_context * ctx = event -> ctx ; struct task_struct * task = ctx -> task ; if ( ! task ) { cpu_function_call ( event -> cpu , __perf_event_disable , event ) ; return ; } retry : if ( ! task_function_call ( task , __perf_event_di... | void perf_event_disable ( struct perf_event * event ) { struct perf_event_context * ctx ; ctx = perf_event_ctx_lock ( event ) ; _perf_event_disable ( event ) ; perf_event_ctx_unlock ( event , ctx ) ; } |
20 | CWE-416 ExifMnoteDataPentax * n = ( ExifMnoteDataPentax * ) en ; size_t i , tcount , o , datao , base = 0 ; ExifShort c ; if ( ! n || ! buf || ! buf_size ) { exif_log ( en -> log , EXIF_LOG_CODE_CORRUPT_DATA , "ExifMnoteDataPentax" , "Short MakerNote" ) ; return ; } datao = 6 + n -> offset ; if ( CHECKOVERFLOW ( datao ... | ExifMnoteDataPentax * n = ( ExifMnoteDataPentax * ) en ; size_t i , tcount , o , datao , base = 0 ; ExifShort c ; if ( ! n || ! buf || ! buf_size ) { exif_log ( en -> log , EXIF_LOG_CODE_CORRUPT_DATA , "ExifMnoteDataPentax" , "Short MakerNote" ) ; return ; } datao = 6 + n -> offset ; if ( CHECKOVERFLOW ( datao , buf_si... |
21 | CWE-284 int vfs_open ( const struct path * path , struct file * file , const struct cred * cred ) { <vul-start> struct dentry * dentry = path -> dentry ; struct inode * inode = dentry -> d_inode ; file -> f_path = * path ; if ( dentry -> d_flags & DCACHE_OP_SELECT_INODE ) { inode = dentry -> d_op -> d_select_inode ( de... | int vfs_open ( const struct path * path , struct file * file , const struct cred * cred ) { struct inode * inode = vfs_select_inode ( path -> dentry , file -> f_flags ) ; if ( IS_ERR ( inode ) ) return PTR_ERR ( inode ) ; file -> f_path = * path ; return do_dentry_open ( file , inode , NULL , cred ) ; } |
22 | CWE-399 static int do_tkill ( pid_t tgid , pid_t pid , int sig ) { <vul-start> struct siginfo info ; <vul-end> info . si_signo = sig ; info . si_errno = 0 ; info . si_code = SI_TKILL ; info . si_pid = task_tgid_vnr ( current ) ; info . si_uid = from_kuid_munged ( current_user_ns ( ) , current_uid ( ) ) ; return do_send... | static int do_tkill ( pid_t tgid , pid_t pid , int sig ) { struct siginfo info = { } ; info . si_signo = sig ; info . si_errno = 0 ; info . si_code = SI_TKILL ; info . si_pid = task_tgid_vnr ( current ) ; info . si_uid = from_kuid_munged ( current_user_ns ( ) , current_uid ( ) ) ; return do_send_specific ( tgid , pid ,... |
23 | CWE-362 fm_mgr_config_errno_t fm_mgr_config_mgr_connect ( fm_config_conx_hdl * hdl , fm_mgr_type_t mgr ) { char s_path [ 256 ] ; char c_path [ 256 ] ; char * mgr_prefix ; p_hsm_com_client_hdl_t * mgr_hdl ; <vul-start> pid_t pid ; <vul-end> memset ( s_path , 0 , sizeof ( s_path ) ) ; memset ( c_path , 0 , sizeof ( c_pat... | fm_mgr_config_errno_t fm_mgr_config_mgr_connect ( fm_config_conx_hdl * hdl , fm_mgr_type_t mgr ) { char s_path [ 256 ] ; char c_path [ 256 ] ; char * mgr_prefix ; p_hsm_com_client_hdl_t * mgr_hdl ; memset ( s_path , 0 , sizeof ( s_path ) ) ; memset ( c_path , 0 , sizeof ( c_path ) ) ; switch ( mgr ) { case FM_MGR_SM : ... |
24 | NVD-CWE-Other static int ext4_get_block_write ( struct inode * inode , sector_t iblock , struct buffer_head * bh_result , int create ) { <vul-start> handle_t * handle = NULL ; <vul-end> int ret = 0 ; unsigned max_blocks = bh_result -> b_size >> inode -> i_blkbits ; int dio_credits ; <vul-start> <vul-end> ext4_debug ( "... | static int ext4_get_block_write ( struct inode * inode , sector_t iblock , struct buffer_head * bh_result , int create ) { handle_t * handle = ext4_journal_current_handle ( ) ; int ret = 0 ; unsigned max_blocks = bh_result -> b_size >> inode -> i_blkbits ; int dio_credits ; int started = 0 ; ext4_debug ( "ext4_get_bloc... |
25 | CWE-20 int oidc_handle_redirect_uri_request ( request_rec * r , oidc_cfg * c , oidc_session_t * session ) { if ( oidc_proto_is_redirect_authorization_response ( r , c ) ) { return oidc_handle_redirect_authorization_response ( r , c , session ) ; } else if ( oidc_proto_is_post_authorization_response ( r , c ) ) { return... | int oidc_handle_redirect_uri_request ( request_rec * r , oidc_cfg * c , oidc_session_t * session ) { if ( oidc_proto_is_redirect_authorization_response ( r , c ) ) { return oidc_handle_redirect_authorization_response ( r , c , session ) ; } else if ( oidc_proto_is_post_authorization_response ( r , c ) ) { return oidc_h... |
26 | 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... | 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 first_p... |
27 | CWE-476 static int ghash_final ( struct shash_desc * desc , u8 * dst ) { struct ghash_desc_ctx * dctx = shash_desc_ctx ( desc ) ; struct ghash_ctx * ctx = crypto_shash_ctx ( desc -> tfm ) ; u8 * buf = dctx -> buffer ; <vul-start> <vul-end> ghash_flush ( ctx , dctx ) ; memcpy ( dst , buf , GHASH_BLOCK_SIZE ) ; return 0 ... | static int ghash_final ( struct shash_desc * desc , u8 * dst ) { struct ghash_desc_ctx * dctx = shash_desc_ctx ( desc ) ; struct ghash_ctx * ctx = crypto_shash_ctx ( desc -> tfm ) ; u8 * buf = dctx -> buffer ; if ( ! ctx -> gf128 ) return - ENOKEY ; ghash_flush ( ctx , dctx ) ; memcpy ( dst , buf , GHASH_BLOCK_SIZE ) ;... |
28 | CWE-401 goto out_controller_put ; } } controller -> cs_gpios = fsl_lpspi -> chipselect ; controller -> prepare_message = fsl_lpspi_prepare_message ; } controller -> bits_per_word_mask = SPI_BPW_RANGE_MASK ( 8 , 32 ) ; controller -> transfer_one = fsl_lpspi_transfer_one ; controller -> prepare_transfer_hardware = lpspi_... | goto out_controller_put ; } } controller -> cs_gpios = fsl_lpspi -> chipselect ; controller -> prepare_message = fsl_lpspi_prepare_message ; } controller -> bits_per_word_mask = SPI_BPW_RANGE_MASK ( 8 , 32 ) ; controller -> transfer_one = fsl_lpspi_transfer_one ; controller -> prepare_transfer_hardware = lpspi_prepare_... |
29 | CWE-119 vpx_codec_err_t vp9_copy_reference_dec ( VP9Decoder * pbi , VP9_REFFRAME ref_frame_flag , YV12_BUFFER_CONFIG * sd ) { VP9_COMMON * cm = & pbi -> common ; if ( ref_frame_flag == VP9_LAST_FLAG ) { <vul-start> const YV12_BUFFER_CONFIG * const cfg = & cm -> frame_bufs [ cm -> ref_frame_map [ 0 ] ] . buf ; <vul-end>... | vpx_codec_err_t vp9_copy_reference_dec ( VP9Decoder * pbi , VP9_REFFRAME ref_frame_flag , YV12_BUFFER_CONFIG * sd ) { VP9_COMMON * cm = & pbi -> common ; if ( ref_frame_flag == VP9_LAST_FLAG ) { const YV12_BUFFER_CONFIG * const cfg = get_ref_frame ( cm , 0 ) ; if ( cfg == NULL ) { vpx_internal_error ( & cm -> error , V... |
30 | NVD-CWE-noinfo static inline int xfrm_replay_verify_len ( struct xfrm_replay_state_esn * replay_esn , struct nlattr * rp ) { struct xfrm_replay_state_esn * up ; int ulen ; if ( ! replay_esn || ! rp ) return 0 ; up = nla_data ( rp ) ; ulen = xfrm_replay_state_esn_len ( up ) ; if ( nla_len ( rp ) < ulen || xfrm_replay_st... | static inline int xfrm_replay_verify_len ( struct xfrm_replay_state_esn * replay_esn , struct nlattr * rp ) { struct xfrm_replay_state_esn * up ; int ulen ; if ( ! replay_esn || ! rp ) return 0 ; up = nla_data ( rp ) ; ulen = xfrm_replay_state_esn_len ( up ) ; if ( nla_len ( rp ) < ulen || xfrm_replay_state_esn_len ( r... |
31 | CWE-119 static VALUE cState_object_nl_set ( VALUE self , VALUE object_nl ) { unsigned long len ; GET_STATE ( self ) ; Check_Type ( object_nl , T_STRING ) ; len = RSTRING_LEN ( object_nl ) ; if ( len == 0 ) { if ( state -> object_nl ) { ruby_xfree ( state -> object_nl ) ; state -> object_nl = NULL ; } } else { if ( stat... | static VALUE cState_object_nl_set ( VALUE self , VALUE object_nl ) { unsigned long len ; GET_STATE ( self ) ; Check_Type ( object_nl , T_STRING ) ; len = RSTRING_LEN ( object_nl ) ; if ( len == 0 ) { if ( state -> object_nl ) { ruby_xfree ( state -> object_nl ) ; state -> object_nl = NULL ; } } else { if ( state -> obj... |
32 | CWE-476 static VTermState * vterm_state_new ( VTerm * vt ) { VTermState * state = vterm_allocator_malloc ( vt , sizeof ( VTermState ) ) ; <vul-start> <vul-end> state -> vt = vt ; state -> rows = vt -> rows ; state -> cols = vt -> cols ; state -> mouse_col = 0 ; state -> mouse_row = 0 ; state -> mouse_buttons = 0 ; stat... | static VTermState * vterm_state_new ( VTerm * vt ) { VTermState * state = vterm_allocator_malloc ( vt , sizeof ( VTermState ) ) ; if ( state == NULL ) return NULL ; state -> vt = vt ; state -> rows = vt -> rows ; state -> cols = vt -> cols ; state -> mouse_col = 0 ; state -> mouse_row = 0 ; state -> mouse_buttons = 0 ;... |
33 | CWE-125 void CLASS xtrans_interpolate ( int passes ) { int c , d , f , g , h , i , v , ng , row , col , top , left , mrow , mcol ; # ifdef LIBRAW_LIBRARY_BUILD int cstat [ 4 ] = { 0 , 0 , 0 , 0 } ; # endif int val , ndir , pass , hm [ 8 ] , avg [ 4 ] , color [ 3 ] [ 8 ] ; static const short orth [ 12 ] = { 1 , 0 , 0 , ... | void CLASS xtrans_interpolate ( int passes ) { int c , d , f , g , h , i , v , ng , row , col , top , left , mrow , mcol ; # ifdef LIBRAW_LIBRARY_BUILD int cstat [ 4 ] = { 0 , 0 , 0 , 0 } ; # endif int val , ndir , pass , hm [ 8 ] , avg [ 4 ] , color [ 3 ] [ 8 ] ; static const short orth [ 12 ] = { 1 , 0 , 0 , 1 , - 1 ... |
34 | CWE-119 static int psf_close ( SF_PRIVATE * psf ) { uint32_t k ; int error = 0 ; if ( psf -> codec_close ) { error = psf -> codec_close ( psf ) ; psf -> codec_close = NULL ; } ; if ( psf -> container_close ) error = psf -> container_close ( psf ) ; error = psf_fclose ( psf ) ; psf_close_rsrc ( psf ) ; <vul-start> <vul-... | static int psf_close ( SF_PRIVATE * psf ) { uint32_t k ; int error = 0 ; if ( psf -> codec_close ) { error = psf -> codec_close ( psf ) ; psf -> codec_close = NULL ; } ; if ( psf -> container_close ) error = psf -> container_close ( psf ) ; error = psf_fclose ( psf ) ; psf_close_rsrc ( psf ) ; free ( psf -> header . pt... |
35 | CWE-399 static ssize_t fuse_fill_write_pages ( struct fuse_req * req , struct address_space * mapping , struct iov_iter * ii , loff_t pos ) { struct fuse_conn * fc = get_fuse_conn ( mapping -> host ) ; unsigned offset = pos & ( PAGE_CACHE_SIZE - 1 ) ; size_t count = 0 ; int err ; req -> in . argpages = 1 ; req -> page_... | static ssize_t fuse_fill_write_pages ( struct fuse_req * req , struct address_space * mapping , struct iov_iter * ii , loff_t pos ) { struct fuse_conn * fc = get_fuse_conn ( mapping -> host ) ; unsigned offset = pos & ( PAGE_CACHE_SIZE - 1 ) ; size_t count = 0 ; int err ; req -> in . argpages = 1 ; req -> page_descs [ ... |
36 | CWE-125 default : value = 1.0 * viff_colormap [ i ] ; break ; } if ( i < ( ssize_t ) image -> colors ) { image -> colormap [ i ] . red = ScaleCharToQuantum ( ( unsigned char ) value ) ; image -> colormap [ i ] . green = ScaleCharToQuantum ( ( unsigned char ) value ) ; image -> colormap [ i ] . blue = ScaleCharToQuantum... | default : value = 1.0 * viff_colormap [ i ] ; break ; } if ( i < ( ssize_t ) image -> colors ) { image -> colormap [ i ] . red = ScaleCharToQuantum ( ( unsigned char ) value ) ; image -> colormap [ i ] . green = ScaleCharToQuantum ( ( unsigned char ) value ) ; image -> colormap [ i ] . blue = ScaleCharToQuantum ( ( uns... |
37 | CWE-119 static vpx_codec_err_t vp8e_use_reference ( vpx_codec_alg_priv_t * ctx , <vul-start> int ctr_id , <vul-end> va_list args ) { int reference_flag = va_arg ( args , int ) ; vp8_use_as_reference ( ctx -> cpi , reference_flag ) ; return VPX_CODEC_OK ; } | static vpx_codec_err_t vp8e_use_reference ( vpx_codec_alg_priv_t * ctx , va_list args ) { int reference_flag = va_arg ( args , int ) ; vp8_use_as_reference ( ctx -> cpi , reference_flag ) ; return VPX_CODEC_OK ; } |
38 | CWE-358 int udp_recvmsg ( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len ) { struct inet_sock * inet = inet_sk ( sk ) ; DECLARE_SOCKADDR ( struct sockaddr_in * , sin , msg -> msg_name ) ; struct sk_buff * skb ; unsigned int ulen , copied ; int peeked , off = 0 ; int err ;... | int udp_recvmsg ( struct sock * sk , struct msghdr * msg , size_t len , int noblock , int flags , int * addr_len ) { struct inet_sock * inet = inet_sk ( sk ) ; DECLARE_SOCKADDR ( struct sockaddr_in * , sin , msg -> msg_name ) ; struct sk_buff * skb ; unsigned int ulen , copied ; int peeked , off = 0 ; int err ; int is_... |
39 | NVD-CWE-noinfo "Magic Mismatch, valid(0x%x) - read(0x%x)" , F2FS_SUPER_MAGIC , le32_to_cpu ( raw_super -> magic ) ) ; return 1 ; } if ( F2FS_BLKSIZE != PAGE_SIZE ) { f2fs_msg ( sb , KERN_INFO , "Invalid page_cache_size (%lu), supports only 4KB\\n" , PAGE_SIZE ) ; return 1 ; } blocksize = 1 << le32_to_cpu ( raw_super ->... | "Magic Mismatch, valid(0x%x) - read(0x%x)" , F2FS_SUPER_MAGIC , le32_to_cpu ( raw_super -> magic ) ) ; return 1 ; } if ( F2FS_BLKSIZE != PAGE_SIZE ) { f2fs_msg ( sb , KERN_INFO , "Invalid page_cache_size (%lu), supports only 4KB\\n" , PAGE_SIZE ) ; return 1 ; } blocksize = 1 << le32_to_cpu ( raw_super -> log_blocksize ... |
40 | CWE-119 static const ut8 * r_bin_dwarf_parse_comp_unit ( Sdb * s , const ut8 * obuf , RBinDwarfCompUnit * cu , const RBinDwarfDebugAbbrev * da , size_t offset , const ut8 * debug_str , size_t debug_str_len ) { const ut8 * buf = obuf , * buf_end = obuf + ( cu -> hdr . length - 7 ) ; ut64 abbr_code ; size_t i ; if ( cu -... | static const ut8 * r_bin_dwarf_parse_comp_unit ( Sdb * s , const ut8 * obuf , RBinDwarfCompUnit * cu , const RBinDwarfDebugAbbrev * da , size_t offset , const ut8 * debug_str , size_t debug_str_len ) { const ut8 * buf = obuf , * buf_end = obuf + ( cu -> hdr . length - 7 ) ; ut64 abbr_code ; size_t i ; if ( cu -> hdr . ... |
41 | CWE-20 void ftpServerProcessList ( FtpClientConnection * connection , char_t * param ) { error_t error ; uint_t perm ; if ( ! connection -> userLoggedIn ) { osStrcpy ( connection -> response , "530 Not logged in\\r\\n" ) ; return ; } while ( * param == '-' ) { while ( * param != ' ' && * param != '\\0' ) <vul-start> <v... | void ftpServerProcessList ( FtpClientConnection * connection , char_t * param ) { error_t error ; uint_t perm ; if ( ! connection -> userLoggedIn ) { osStrcpy ( connection -> response , "530 Not logged in\\r\\n" ) ; return ; } while ( * param == '-' ) { while ( * param != ' ' && * param != '\\0' ) { param ++ ; } while ... |
42 | CWE-284 btif_dm_ssp_key_notif_evt ( & p_data -> key_notif ) ; break ; case BTA_DM_DEV_UNPAIRED_EVT : bdcpy ( bd_addr . address , p_data -> link_down . bd_addr ) ; btm_set_bond_type_dev ( p_data -> link_down . bd_addr , BOND_TYPE_UNKNOWN ) ; # if ( defined ( BTA_HH_INCLUDED ) && ( BTA_HH_INCLUDED == TRUE ) ) btif_hh_rem... | btif_dm_ssp_key_notif_evt ( & p_data -> key_notif ) ; break ; case BTA_DM_DEV_UNPAIRED_EVT : bdcpy ( bd_addr . address , p_data -> link_down . bd_addr ) ; btm_set_bond_type_dev ( p_data -> link_down . bd_addr , BOND_TYPE_UNKNOWN ) ; # if ( defined ( BTA_HH_INCLUDED ) && ( BTA_HH_INCLUDED == TRUE ) ) btif_hh_remove_devi... |
43 | CWE-264 static FILE * pw_tmpfile ( int lockfd ) { FILE * fd ; char * tmpname = NULL ; <vul-start> char * dir = "/etc" ; if ( ( fd = xfmkstemp ( & tmpname , dir ) ) == NULL ) { <vul-end> ulckpwdf ( ) ; err ( EXIT_FAILURE , _ ( "can\'t open temporary file" ) ) ; } copyfile ( lockfd , fileno ( fd ) ) ; tmp_file = tmpname ... | static FILE * pw_tmpfile ( int lockfd ) { FILE * fd ; char * tmpname = NULL ; if ( ( fd = xfmkstemp ( & tmpname , "/etc" , ".vipw" ) ) == NULL ) { ulckpwdf ( ) ; err ( EXIT_FAILURE , _ ( "can\'t open temporary file" ) ) ; } copyfile ( lockfd , fileno ( fd ) ) ; tmp_file = tmpname ; return fd ; } |
44 | CWE-763 static int spk_ttyio_ldisc_open ( struct tty_struct * tty ) { struct spk_ldisc_data * ldisc_data ; if ( ! tty -> ops -> write ) return - EOPNOTSUPP ; <vul-start> <vul-end> speakup_tty = tty ; ldisc_data = kmalloc ( sizeof ( * ldisc_data ) , GFP_KERNEL ) ; <vul-start> if ( ! ldisc_data ) <vul-end> return - ENOME... | static int spk_ttyio_ldisc_open ( struct tty_struct * tty ) { struct spk_ldisc_data * ldisc_data ; if ( ! tty -> ops -> write ) return - EOPNOTSUPP ; mutex_lock ( & speakup_tty_mutex ) ; if ( speakup_tty ) { mutex_unlock ( & speakup_tty_mutex ) ; return - EBUSY ; } speakup_tty = tty ; ldisc_data = kmalloc ( sizeof ( * ... |
45 | CWE-20 int wait_for_key_construction ( struct key * key , bool intr ) { int ret ; ret = wait_on_bit ( & key -> flags , KEY_FLAG_USER_CONSTRUCT , intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE ) ; if ( ret ) return - ERESTARTSYS ; <vul-start> if ( test_bit ( KEY_FLAG_NEGATIVE , & key -> flags ) ) { smp_rmb ( ) ; retur... | int wait_for_key_construction ( struct key * key , bool intr ) { int ret ; ret = wait_on_bit ( & key -> flags , KEY_FLAG_USER_CONSTRUCT , intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE ) ; if ( ret ) return - ERESTARTSYS ; ret = key_read_state ( key ) ; if ( ret < 0 ) return ret ; return key_validate ( key ) ; } |
46 | CWE-476 jp2_box_t * jp2_box_get ( jas_stream_t * in ) { jp2_box_t * box ; jp2_boxinfo_t * boxinfo ; jas_stream_t * tmpstream ; uint_fast32_t len ; uint_fast64_t extlen ; bool dataflag ; box = 0 ; tmpstream = 0 ; if ( ! ( box = jas_malloc ( sizeof ( jp2_box_t ) ) ) ) { goto error ; } box -> ops = & jp2_boxinfo_unk . ops... | jp2_box_t * jp2_box_get ( jas_stream_t * in ) { jp2_box_t * box ; jp2_boxinfo_t * boxinfo ; jas_stream_t * tmpstream ; uint_fast32_t len ; uint_fast64_t extlen ; bool dataflag ; box = 0 ; tmpstream = 0 ; if ( ! ( box = jas_malloc ( sizeof ( jp2_box_t ) ) ) ) { goto error ; } box -> ops = & jp2_boxinfo_unk . ops ; if ( ... |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 3