Unnamed: 0 int64 0 3.91k | source stringlengths 77 51.3k | target stringlengths 9 28.3k |
|---|---|---|
0 | CWE-362 static struct rds_connection * __rds_conn_create ( struct net * net , __be32 laddr , __be32 faddr , struct rds_transport * trans , gfp_t gfp , int is_outgoing ) { struct rds_connection * conn , * parent = NULL ; struct hlist_head * head = rds_conn_bucket ( laddr , faddr ) ; struct rds_transport * loop_trans ; u... | <vul-sep> |
1 | CWE-189 STATIC struct posix_acl * xfs_acl_from_disk ( struct xfs_acl * aclp ) { struct posix_acl_entry * acl_e ; struct posix_acl * acl ; struct xfs_acl_entry * ace ; int count , i ; count = be32_to_cpu ( aclp -> acl_cnt ) ; <vul-start> <vul-end> acl = posix_acl_alloc ( count , GFP_KERNEL ) ; if ( ! acl ) return ERR_PT... | <vul-sep> count = be32_to_cpu ( aclp -> acl_cnt ) ; <vul-start> if ( count > XFS_ACL_MAX_ENTRIES ) return ERR_PTR ( - EFSCORRUPTED ) ; <vul-end> acl = posix_acl_alloc ( count , GFP_KERNEL ) ; <vul-sep> |
2 | CWE-119 static void rd_auto_partition_range ( VP9_COMP * cpi , const TileInfo * const tile , <vul-start> <vul-end> int mi_row , int mi_col , BLOCK_SIZE * min_block_size , BLOCK_SIZE * max_block_size ) { VP9_COMMON * const cm = & cpi -> common ; <vul-start> MACROBLOCKD * const xd = & cpi -> mb . e_mbd ; MODE_INFO * * mi... | <vul-sep> static void rd_auto_partition_range ( VP9_COMP * cpi , const TileInfo * const tile , <vul-start> MACROBLOCKD * const xd , <vul-end> int mi_row , int mi_col , <vul-sep> VP9_COMMON * const cm = & cpi -> common ; <vul-start> MODE_INFO * * mi = xd -> mi ; const int left_in_image = xd -> left_available && mi [ - 1... |
3 | CWE-125 BOOL nego_read_request ( rdpNego * nego , wStream * s ) { BYTE li ; BYTE type ; UINT16 length ; if ( ! tpkt_read_header ( s , & length ) ) return FALSE ; if ( ! tpdu_read_connection_request ( s , & li , length ) ) return FALSE ; if ( li != Stream_GetRemainingLength ( s ) + 6 ) { WLog_ERR ( TAG , "Incorrect TPDU... | <vul-sep> } <vul-start> if ( ! nego_process_negotiation_request ( nego , s ) ) return FALSE ; <vul-end> } <vul-sep> |
4 | CWE-200 static void pipe_advance ( struct iov_iter * i , size_t size ) { struct pipe_inode_info * pipe = i -> pipe ; <vul-start> struct pipe_buffer * buf ; int idx = i -> idx ; size_t off = i -> iov_offset , orig_sz ; <vul-end> if ( unlikely ( i -> count < size ) ) size = i -> count ; <vul-start> orig_sz = size ; <vul-... | <vul-sep> if ( size ) { <vul-start> struct pipe_buffer * buf ; size_t off = i -> iov_offset , left = size ; int idx = i -> idx ; <vul-end> if ( off ) <vul-sep> <vul-end> if ( off ) <vul-start> left += off - pipe -> bufs [ idx ] . offset ; <vul-end> while ( 1 ) { <vul-sep> buf = & pipe -> bufs [ idx ] ; <vul-start> if (... |
5 | CWE-119 void edge_sparse_csr_reader_double ( const char * i_csr_file_in , unsigned int * * o_row_idx , unsigned int * * o_column_idx , double * * o_values , unsigned int * o_row_count , unsigned int * o_column_count , unsigned int * o_element_count ) { FILE * l_csr_file_handle ; const unsigned int l_line_length = 512 ;... | <vul-sep> if ( l_header_read == 0 ) { <vul-start> if ( 3 == sscanf ( l_line , "%u %u %u" , o_row_count , o_column_count , o_element_count ) && 0 != * o_row_count && 0 != * o_column_count && 0 != * o_element_count ) { <vul-end> * o_column_idx = ( unsigned int * ) malloc ( sizeof ( unsigned int ) * ( * o_element_count ) ... |
6 | CWE-399 -static int __perf_event_overflow ( struct perf_event * event , int nmi , +static int __perf_event_overflow ( struct perf_event * event , int throttle , struct perf_sample_data * data , struct pt_regs * regs ) { int events = atomic_read ( & event -> event_limit ) ; struct hw_perf_event * hwc = & event -> hw ; i... | <vul-sep> if ( event -> overflow_handler ) <vul-start> event -> overflow_handler ( event , data , regs ) ; <vul-end> else <vul-sep> <vul-end> else <vul-start> perf_event_output ( event , data , regs ) ; <vul-end> if ( event -> fasync && event -> pending_kill ) { <vul-sep> |
7 | CWE-119 SNDFILE * sf_open_fd ( int fd , int mode , SF_INFO * sfinfo , int close_desc ) { SF_PRIVATE * psf ; if ( ( SF_CONTAINER ( sfinfo -> format ) ) == SF_FORMAT_SD2 ) { sf_errno = SFE_SD2_FD_DISALLOWED ; return NULL ; } ; <vul-start> if ( ( psf = calloc ( 1 , sizeof ( SF_PRIVATE ) ) ) == NULL ) <vul-end> { sf_errno ... | <vul-sep> } ; <vul-start> if ( ( psf = psf_allocate ( ) ) == NULL ) <vul-end> { sf_errno = SFE_MALLOC_FAILED ; <vul-sep> |
8 | CWE-119 static int filter_frame ( AVFilterLink * inlink , AVFrame * frame ) { AVFilterContext * ctx = inlink -> dst ; const AVPixFmtDescriptor * desc = av_pix_fmt_desc_get ( inlink -> format ) ; uint32_t plane_checksum [ 4 ] = { 0 } , checksum = 0 ; int i , plane , vsub = desc -> log2_chroma_h ; <vul-start> for ( plane... | <vul-sep> int i , plane , vsub = desc -> log2_chroma_h ; <vul-start> for ( plane = 0 ; plane < 4 && frame -> data [ plane ] && frame -> linesize [ plane ] ; plane ++ ) { <vul-end> int64_t linesize = av_image_get_linesize ( frame -> format , frame -> width , plane ) ; <vul-sep> checksum , plane_checksum [ 0 ] ) ; <vul-s... |
9 | CWE-119 u4_pos = pu1_scan [ u4_numCoeffs ++ & 63 ] ; pu1_pos [ * pi4_num_coeffs ] = u4_pos ; pi2_outAddr [ * pi4_num_coeffs ] = u4_level ; ( * pi4_num_coeffs ) ++ ; } else if ( u2_mpeg2 == 1 ) { u4_sym_len = 6 ; FLUSH_BITS ( u4_offset , u4_buf , u4_buf_nxt , u4_sym_len , pu4_buf_aligned ) IBITS_GET ( u4_buf , u4_buf_nx... | <vul-sep> u4_nz_rows |= 1 << ( u4_pos >> 0x3 ) ; <vul-start> if ( u4_numCoeffs > 64 ) { return IMPEG2D_MB_TEX_DECODE_ERR ; } <vul-end> } <vul-sep> return IMPEG2D_MB_TEX_DECODE_ERR ; <vul-start> } <vul-end> } <vul-sep> |
10 | CWE-19 STATIC int xfs_attr_calc_size ( struct xfs_inode * ip , int namelen , int valuelen , int * local ) { struct xfs_mount * mp = ip -> i_mount ; int size ; int nblks ; size = xfs_attr_leaf_newentsize ( namelen , valuelen , mp -> m_sb . sb_blocksize , local ) ; nblks = XFS_DAENTER_SPACE_RES ( mp , XFS_ATTR_FORK ) ; i... | <vul-sep> } else { <vul-start> uint dblocks = xfs_attr3_rmt_blocks ( mp , valuelen ) ; <vul-end> nblks += dblocks ; <vul-sep> |
11 | NVD-CWE-noinfo static int list_fields ( MYSQL * mysql , const char * db , const char * table , const char * wild ) { <vul-start> char query [ 1024 ] , * end ; <vul-end> MYSQL_RES * result ; MYSQL_ROW row ; ulong UNINIT_VAR ( rows ) ; if ( mysql_select_db ( mysql , db ) ) { fprintf ( stderr , "%s: Cannot connect to db: ... | <vul-sep> { <vul-start> char query [ NAME_LEN + 100 ] ; int len ; <vul-end> MYSQL_RES * result ; <vul-sep> { <vul-start> my_snprintf ( query , sizeof ( query ) , "select count(*) from `%s`" , table ) ; <vul-end> if ( mysql_query ( mysql , query ) || ! ( result = mysql_store_result ( mysql ) ) ) <vul-sep> } <vul-start> ... |
12 | CWE-119 int process ( register int code , unsigned char * * fill ) { int incode ; static unsigned char firstchar ; if ( code == clear ) { codesize = datasize + 1 ; codemask = ( 1 << codesize ) - 1 ; avail = clear + 2 ; oldcode = - 1 ; return 1 ; } if ( oldcode == - 1 ) { <vul-start> <vul-end> * ( * fill ) ++ = suffix [... | <vul-sep> if ( oldcode == - 1 ) { <vul-start> if ( code >= clear ) { fprintf ( stderr , "bad input: code=%d is larger than clear=%d\\n" , code , clear ) ; return 0 ; } <vul-end> * ( * fill ) ++ = suffix [ code ] ; <vul-sep> |
13 | CWE-19 int xfs_attr_rmtval_get ( struct xfs_da_args * args ) { struct xfs_bmbt_irec map [ ATTR_RMTVALUE_MAPSIZE ] ; struct xfs_mount * mp = args -> dp -> i_mount ; struct xfs_buf * bp ; xfs_dablk_t lblkno = args -> rmtblkno ; __uint8_t * dst = args -> value ; <vul-start> int valuelen = args -> valuelen ; <vul-end> int ... | <vul-sep> __uint8_t * dst = args -> value ; <vul-start> int valuelen ; <vul-end> int nmap ; <vul-sep> ASSERT ( ! ( args -> flags & ATTR_KERNOVAL ) ) ; <vul-start> ASSERT ( args -> rmtvaluelen == args -> valuelen ) ; valuelen = args -> rmtvaluelen ; <vul-end> while ( valuelen > 0 ) { <vul-sep> |
14 | CWE-125 static BOOL update_read_icon_info ( wStream * s , ICON_INFO * iconInfo ) { BYTE * newBitMask ; if ( Stream_GetRemainingLength ( s ) < 8 ) return FALSE ; Stream_Read_UINT16 ( s , iconInfo -> cacheEntry ) ; Stream_Read_UINT8 ( s , iconInfo -> cacheId ) ; Stream_Read_UINT8 ( s , iconInfo -> bpp ) ; if ( ( iconInfo... | <vul-sep> iconInfo -> bitsMask = newBitMask ; <vul-start> if ( Stream_GetRemainingLength ( s ) < iconInfo -> cbBitsMask ) return FALSE ; <vul-end> Stream_Read ( s , iconInfo -> bitsMask , iconInfo -> cbBitsMask ) ; <vul-sep> if ( iconInfo -> colorTable ) <vul-start> { if ( Stream_GetRemainingLength ( s ) < iconInfo -> ... |
15 | CWE-415 static int sg_common_write ( Sg_fd * sfp , Sg_request * srp , unsigned char * cmnd , int timeout , int blocking ) { int k , at_head ; Sg_device * sdp = sfp -> parentdp ; sg_io_hdr_t * hp = & srp -> header ; srp -> data . cmd_opcode = cmnd [ 0 ] ; hp -> status = 0 ; hp -> masked_status = 0 ; hp -> msg_status = 0... | <vul-sep> if ( atomic_read ( & sdp -> detaching ) ) { <vul-start> if ( srp -> bio ) { if ( srp -> rq -> cmd != srp -> rq -> __cmd ) kfree ( srp -> rq -> cmd ) ; <vul-end> blk_end_request_all ( srp -> rq , - EIO ) ; <vul-sep> <vul-end> blk_end_request_all ( srp -> rq , - EIO ) ; <vul-start> srp -> rq = NULL ; } <vul-end... |
16 | CWE-400 static void umount_tree ( struct mount * mnt , enum umount_tree_flags how ) { LIST_HEAD ( tmp_list ) ; struct mount * p ; if ( how & UMOUNT_PROPAGATE ) propagate_mount_unlock ( mnt ) ; for ( p = mnt ; p ; p = next_mnt ( p , mnt ) ) { p -> mnt . mnt_flags |= MNT_UMOUNT ; list_move ( & p -> mnt_list , & tmp_list ... | <vul-sep> while ( ! list_empty ( & tmp_list ) ) { <vul-start> struct mnt_namespace * ns ; <vul-end> bool disconnect ; <vul-sep> list_del_init ( & p -> mnt_list ) ; <vul-start> ns = p -> mnt_ns ; if ( ns ) { ns -> mounts -- ; __touch_mnt_namespace ( ns ) ; } <vul-end> p -> mnt_ns = NULL ; <vul-sep> |
17 | CWE-399 int do_fpu_inst ( unsigned short inst , struct pt_regs * regs ) { struct task_struct * tsk = current ; struct sh_fpu_soft_struct * fpu = & ( tsk -> thread . xstate -> softfpu ) ; <vul-start> perf_sw_event ( PERF_COUNT_SW_EMULATION_FAULTS , 1 , 0 , regs , 0 ) ; <vul-end> if ( ! ( task_thread_info ( tsk ) -> stat... | <vul-sep> struct sh_fpu_soft_struct * fpu = & ( tsk -> thread . xstate -> softfpu ) ; <vul-start> perf_sw_event ( PERF_COUNT_SW_EMULATION_FAULTS , 1 , regs , 0 ) ; <vul-end> if ( ! ( task_thread_info ( tsk ) -> status & TS_USEDFPU ) ) { <vul-sep> |
18 | CWE-125 void pgm_print ( netdissect_options * ndo , register const u_char * bp , register u_int length , register const u_char * bp2 ) { register const struct pgm_header * pgm ; register const struct ip * ip ; register char ch ; uint16_t sport , dport ; u_int nla_afnum ; char nla_buf [ INET6_ADDRSTRLEN ] ; register con... | <vul-sep> ipaddr_string ( ndo , & ip -> ip_dst ) ) ) ; <vul-start> } return ; <vul-end> } <vul-sep> |
19 | 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_... | <vul-sep> dev_err ( fsl_lpspi -> dev , "failed to enable clock\\n" ) ; <vul-start> goto out_controller_put ; <vul-end> } <vul-sep> |
20 | CWE-119 static int picolcd_raw_event ( struct hid_device * hdev , struct hid_report * report , u8 * raw_data , int size ) { struct picolcd_data * data = hid_get_drvdata ( hdev ) ; unsigned long flags ; int ret = 0 ; if ( ! data ) return 1 ; <vul-start> <vul-end> if ( report -> id == REPORT_KEY_STATE ) { if ( data -> in... | <vul-sep> return 1 ; <vul-start> if ( size > 64 ) { hid_warn ( hdev , "invalid size value (%d) for picolcd raw event\\n" , size ) ; return 0 ; } <vul-end> if ( report -> id == REPORT_KEY_STATE ) { <vul-sep> |
21 | CWE-20 static int unix_dgram_recvmsg ( struct kiocb * iocb , struct socket * sock , struct msghdr * msg , size_t size , int flags ) { struct sock_iocb * siocb = kiocb_to_siocb ( iocb ) ; struct scm_cookie tmp_scm ; struct sock * sk = sock -> sk ; struct unix_sock * u = unix_sk ( sk ) ; int noblock = flags & MSG_DONTWAI... | <vul-sep> |
22 | NVD-CWE-Other int propagate_mnt ( struct mount * dest_mnt , struct mountpoint * dest_mp , struct mount * source_mnt , struct hlist_head * tree_list ) { struct mount * m , * n ; int ret = 0 ; user_ns = current -> nsproxy -> mnt_ns -> user_ns ; last_dest = dest_mnt ; <vul-start> <vul-end> last_source = source_mnt ; mp = ... | <vul-sep> last_dest = dest_mnt ; <vul-start> first_source = source_mnt ; <vul-end> last_source = source_mnt ; <vul-sep> |
23 | CWE-119 int psf_binheader_readf ( SF_PRIVATE * psf , char const * format , ... ) { va_list argptr ; sf_count_t * countptr , countdata ; unsigned char * ucptr , sixteen_bytes [ 16 ] ; unsigned int * intptr , intdata ; unsigned short * shortptr ; char * charptr ; float * floatptr ; double * doubleptr ; char c ; <vul-star... | <vul-sep> char c ; <vul-start> int byte_count = 0 , count = 0 ; <vul-end> if ( ! format ) <vul-sep> while ( ( c = * format ++ ) ) <vul-start> { if ( psf -> header . indx + 16 >= psf -> header . len && psf_bump_header_allocation ( psf , 16 ) ) return count ; switch ( c ) <vul-end> { case 'e' : <vul-sep> intptr = va_arg ... |
24 | CWE-20 -int parse_rock_ridge_inode ( struct iso_directory_record * de , struct inode * inode ) +int parse_rock_ridge_inode ( struct iso_directory_record * de , struct inode * inode , <vul-start> <vul-end> { <vul-start> int result = parse_rock_ridge_inode_internal ( de , inode , 0 ) ; <vul-end> if ( ( ISOFS_SB ( inode -... | <vul-sep> +int parse_rock_ridge_inode ( struct iso_directory_record * de , struct inode * inode , <vul-start> int relocated ) <vul-end> { <vul-sep> <vul-end> { <vul-start> int flags = relocated ? RR_RELOC_DE : 0 ; int result = parse_rock_ridge_inode_internal ( de , inode , flags ) ; <vul-end> if ( ( ISOFS_SB ( inode ->... |
25 | CWE-787 static OPJ_BOOL opj_j2k_write_sod ( opj_j2k_t * p_j2k , opj_tcd_t * p_tile_coder , OPJ_BYTE * p_data , OPJ_UINT32 * p_data_written , OPJ_UINT32 p_total_data_size , const opj_stream_private_t * p_stream , opj_event_mgr_t * p_manager ) { opj_codestream_info_t * l_cstr_info = 00 ; OPJ_UINT32 l_remaining_data ; ass... | <vul-sep> OPJ_UNUSED ( p_stream ) ; <vul-start> if ( p_total_data_size < 4 ) { opj_event_msg ( p_manager , EVT_ERROR , "Not enough bytes in output buffer to write SOD marker\\n" ) ; return OPJ_FALSE ; } <vul-end> opj_write_bytes ( p_data , J2K_MS_SOD , <vul-sep> |
26 | CWE-119 -static void duplicate_mode_info_in_sb ( VP9_COMMON * const cm , <vul-start> MACROBLOCKD * const xd , int mi_row , int mi_col , <vul-end>+static void duplicate_mode_info_in_sb ( VP9_COMMON * cm , MACROBLOCKD * xd , <vul-start> <vul-end> BLOCK_SIZE bsize ) { const int block_width = num_8x8_blocks_wide_lookup [ b... | <vul-sep> +static void duplicate_mode_info_in_sb ( VP9_COMMON * cm , MACROBLOCKD * xd , <vul-start> int mi_row , int mi_col , <vul-end> BLOCK_SIZE bsize ) { <vul-sep> |
27 | CWE-415 static bool disconnect_cb ( struct io * io , void * user_data ) { struct bt_att_chan * chan = user_data ; struct bt_att * att = chan -> att ; int err ; socklen_t len ; len = sizeof ( err ) ; if ( getsockopt ( chan -> fd , SOL_SOCKET , SO_ERROR , & err , & len ) < 0 ) { util_debug ( chan -> att -> debug_callback... | <vul-sep> bt_att_ref ( att ) ; <vul-start> att -> in_disc = true ; queue_remove_all ( att -> req_queue , NULL , NULL , disc_att_send_op ) ; queue_remove_all ( att -> ind_queue , NULL , NULL , disc_att_send_op ) ; queue_remove_all ( att -> write_queue , NULL , NULL , disc_att_send_op ) ; att -> in_disc = false ; <vul-en... |
28 | NVD-CWE-noinfo -static int can_open_delegated ( struct nfs_delegation * delegation , mode_t open_flags ) +static int can_open_delegated ( struct nfs_delegation * delegation , fmode_t fmode ) { <vul-start> if ( ( delegation -> type & open_flags ) != open_flags ) <vul-end> return 0 ; if ( test_bit ( NFS_DELEGATION_NEED_R... | <vul-sep> { <vul-start> if ( ( delegation -> type & fmode ) != fmode ) <vul-end> return 0 ; <vul-sep> |
29 | CWE-125 if ( dp != NULL && parseattrstat ( ndo , dp , ! ndo -> ndo_qflag , v3 ) != 0 ) return ; break ; case NFSPROC_SETATTR : if ( ! ( dp = parserep ( ndo , rp , length ) ) ) return ; if ( v3 ) { if ( parsewccres ( ndo , dp , ndo -> ndo_vflag ) ) return ; } else { if ( parseattrstat ( ndo , dp , ! ndo -> ndo_qflag , 0... | <vul-sep> break ; <vul-start> if ( ! er ) { ND_TCHECK ( dp [ 0 ] ) ; <vul-end> ND_PRINT ( ( ndo , " c %04x" , EXTRACT_32BITS ( & dp [ 0 ] ) ) ) ; <vul-sep> <vul-end> ND_PRINT ( ( ndo , " c %04x" , EXTRACT_32BITS ( & dp [ 0 ] ) ) ) ; <vul-start> } <vul-end> return ; <vul-sep> |
30 | CWE-119 static int futex_wait ( u32 __user * uaddr , int fshared , u32 val , ktime_t * abs_time , u32 bitset , int clockrt ) { struct hrtimer_sleeper timeout , * to = NULL ; struct restart_block * restart ; struct futex_hash_bucket * hb ; struct futex_q q ; int ret ; if ( ! bitset ) return - EINVAL ; q . pi_state = NUL... | <vul-sep> if ( ! unqueue_me ( & q ) ) <vul-start> goto out ; <vul-end> ret = - ETIMEDOUT ; <vul-sep> if ( to && ! to -> task ) <vul-start> goto out ; if ( ! signal_pending ( current ) ) <vul-end> goto retry ; <vul-sep> if ( ! abs_time ) <vul-start> goto out ; <vul-end> restart = & current_thread_info ( ) -> restart_blo... |
31 | CWE-416 case '-' : if ( esil ) { sdb_reset ( esil -> stats ) ; } break ; } break ; case 'f' : { RListIter * iter ; RAnalBlock * bb ; RAnalFunction * fcn = r_anal_get_fcn_in ( core -> anal , core -> offset , R_ANAL_FCN_TYPE_FCN | R_ANAL_FCN_TYPE_SYM ) ; if ( fcn ) { r_list_foreach ( fcn -> bbs , iter , bb ) { ut64 pc = ... | <vul-sep> RAnalEsil * esil = r_anal_esil_new ( stacksize , iotrap , addrsize ) ; <vul-start> if ( ! esil ) { <vul-end> return ; <vul-sep> <vul-end> return ; <vul-start> } <vul-end> r_anal_esil_to_reil_setup ( esil , core -> anal , romem , stats ) ; <vul-sep> |
32 | CWE-401 static struct prog_entry * predicate_parse ( const char * str , int nr_parens , int nr_preds , parse_pred_fn parse_pred , void * data , struct filter_parse_error * pe ) { struct prog_entry * prog_stack ; struct prog_entry * prog ; const char * ptr = str ; char * inverts = NULL ; int * op_stack ; int * top ; int... | <vul-sep> case '(' : <vul-start> if ( top - op_stack > nr_parens ) { ret = - EINVAL ; goto out_free ; } <vul-end> * ( ++ top ) = invert ; <vul-sep> |
33 | CWE-125 static UINT printer_process_irp_write ( PRINTER_DEVICE * printer_dev , IRP * irp ) { UINT32 Length ; UINT64 Offset ; rdpPrintJob * printjob = NULL ; UINT error = CHANNEL_RC_OK ; <vul-start> <vul-end> Stream_Read_UINT32 ( irp -> input , Length ) ; Stream_Read_UINT64 ( irp -> input , Offset ) ; Stream_Seek ( irp ... | <vul-sep> UINT error = CHANNEL_RC_OK ; <vul-start> void * ptr ; if ( Stream_GetRemainingLength ( irp -> input ) < 32 ) return ERROR_INVALID_DATA ; <vul-end> Stream_Read_UINT32 ( irp -> input , Length ) ; <vul-sep> Stream_Seek ( irp -> input , 20 ) ; <vul-start> ptr = Stream_Pointer ( irp -> input ) ; if ( ! Stream_Safe... |
34 | CWE-200 int vmw_gb_surface_define_ioctl ( struct drm_device * dev , void * data , struct drm_file * file_priv ) { struct vmw_private * dev_priv = vmw_priv ( dev ) ; struct vmw_user_surface * user_srf ; struct vmw_surface * srf ; struct vmw_resource * res ; struct vmw_resource * tmp ; union drm_vmw_gb_surface_create_arg... | <vul-sep> uint32_t size ; <vul-start> uint32_t backup_handle = 0 ; <vul-end> if ( req -> multisample_count != 0 ) <vul-sep> & user_srf -> backup_base ) ; <vul-start> if ( ret == 0 ) { if ( res -> backup -> base . num_pages * PAGE_SIZE < <vul-end> res -> backup_size ) { <vul-sep> goto out_unlock ; <vul-start> } else { b... |
35 | CWE-119 unsigned char * pixels ; assert ( image_info != ( const ImageInfo * ) NULL ) ; assert ( image_info -> signature == MagickSignature ) ; if ( image_info -> debug != MagickFalse ) ( void ) LogMagickEvent ( TraceEvent , GetMagickModule ( ) , "%s" , image_info -> filename ) ; assert ( exception != ( ExceptionInfo * ... | <vul-sep> break ; <vul-start> status = SetImageExtent ( image , image -> columns , image -> rows ) ; if ( status == MagickFalse ) { InheritException ( exception , & image -> exception ) ; return ( DestroyImageList ( image ) ) ; } <vul-end> SetImageColorspace ( image , GRAYColorspace ) ; <vul-sep> |
36 | CWE-119 return - ENOBUFS ; np -> cork . opt -> srcrt = ip6_rthdr_dup ( opt -> srcrt , sk -> sk_allocation ) ; if ( opt -> srcrt && ! np -> cork . opt -> srcrt ) return - ENOBUFS ; } dst_hold ( & rt -> dst ) ; cork -> dst = & rt -> dst ; inet -> cork . fl . u . ip6 = * fl6 ; np -> cork . hop_limit = hlimit ; np -> cork ... | <vul-sep> sock_tx_timestamp ( sk , & tx_flags ) ; <vul-start> if ( ( length > mtu ) && dontfrag && ( sk -> sk_protocol == IPPROTO_UDP || sk -> sk_protocol == IPPROTO_RAW ) ) { <vul-end> ipv6_local_rxpmtu ( sk , fl6 , mtu - exthdrlen ) ; <vul-sep> } <vul-start> skb = skb_peek_tail ( & sk -> sk_write_queue ) ; cork -> le... |
37 | CWE-119 -static void inc_mvs ( const MB_MODE_INFO * mbmi , const int_mv mvs [ 2 ] , +static void inc_mvs ( const MB_MODE_INFO * mbmi , const MB_MODE_INFO_EXT * mbmi_ext , <vul-start> <vul-end> nmv_context_counts * counts ) { int i ; for ( i = 0 ; i < 1 + has_second_ref ( mbmi ) ; ++ i ) { <vul-start> const MV * ref = &... | <vul-sep> +static void inc_mvs ( const MB_MODE_INFO * mbmi , const MB_MODE_INFO_EXT * mbmi_ext , <vul-start> const int_mv mvs [ 2 ] , <vul-end> nmv_context_counts * counts ) { <vul-sep> for ( i = 0 ; i < 1 + has_second_ref ( mbmi ) ; ++ i ) { <vul-start> const MV * ref = & mbmi_ext -> ref_mvs [ mbmi -> ref_frame [ i ] ... |
38 | CWE-400 static int usb_enumerate_device_otg ( struct usb_device * udev ) { int err = 0 ; # ifdef CONFIG_USB_OTG if ( ! udev -> bus -> is_b_host && udev -> config && udev -> parent == udev -> bus -> root_hub ) { struct usb_otg_descriptor * desc = NULL ; struct usb_bus * bus = udev -> bus ; unsigned port1 = udev -> portn... | <vul-sep> le16_to_cpu ( udev -> config [ 0 ] . desc . wTotalLength ) , <vul-start> USB_DT_OTG , ( void * * ) & desc , sizeof ( * desc ) ) ; <vul-end> if ( err || ! ( desc -> bmAttributes & USB_OTG_HNP ) ) <vul-sep> |
39 | CWE-189 static inline void x86_assign_hw_event ( struct perf_event * event , struct cpu_hw_events * cpuc , int i ) { struct hw_perf_event * hwc = & event -> hw ; hwc -> idx = cpuc -> assign [ i ] ; hwc -> last_cpu = smp_processor_id ( ) ; hwc -> last_tag = ++ cpuc -> tags [ i ] ; if ( hwc -> idx == X86_PMC_IDX_FIXED_BT... | <vul-sep> hwc -> config_base = MSR_ARCH_PERFMON_FIXED_CTR_CTRL ; <vul-start> hwc -> event_base = MSR_ARCH_PERFMON_FIXED_CTR0 + ( hwc -> idx - X86_PMC_IDX_FIXED ) ; <vul-end> } else { <vul-sep> |
40 | CWE-264 int lxc_attach ( const char * name , const char * lxcpath , lxc_attach_exec_t exec_function , void * exec_payload , lxc_attach_options_t * options , pid_t * attached_process ) { int ret , status ; pid_t init_pid , pid , attached_pid , expected ; struct lxc_proc_context_info * init_ctx ; char * cwd ; char * new_... | <vul-sep> if ( pid ) { <vul-start> int procfd = - 1 ; <vul-end> pid_t to_cleanup_pid = pid ; <vul-sep> if ( ! cgroup_attach ( name , lxcpath , pid ) ) <vul-start> goto cleanup_error ; } procfd = open ( "/proc" , O_DIRECTORY | O_RDONLY | O_CLOEXEC ) ; if ( procfd < 0 ) { SYSERROR ( "Unable to open /proc." ) ; <vul-end> ... |
41 | CWE-190 static int b_unpack ( lua_State * L ) { Header h ; const char * fmt = luaL_checkstring ( L , 1 ) ; size_t ld ; const char * data = luaL_checklstring ( L , 2 , & ld ) ; <vul-start> size_t pos = luaL_optinteger ( L , 3 , 1 ) - 1 ; <vul-end> int n = 0 ; defaultoptions ( & h ) ; while ( * fmt ) { int opt = * fmt ++... | <vul-sep> const char * data = luaL_checklstring ( L , 2 , & ld ) ; <vul-start> size_t pos = luaL_optinteger ( L , 3 , 1 ) ; luaL_argcheck ( L , pos > 0 , 3 , "offset must be 1 or greater" ) ; pos -- ; <vul-end> int n = 0 ; <vul-sep> pos += gettoalign ( pos , & h , opt , size ) ; <vul-start> luaL_argcheck ( L , size <= ... |
42 | NVD-CWE-Other static int acm_probe ( struct usb_interface * intf , const struct usb_device_id * id ) { struct usb_cdc_union_desc * union_header = NULL ; struct usb_cdc_country_functional_desc * cfd = NULL ; unsigned char * buffer = intf -> altsetting -> extra ; int buflen = intf -> altsetting -> extralen ; struct usb_i... | <vul-sep> control_interface = usb_ifnum_to_if ( usb_dev , 0 ) ; <vul-start> if ( ! data_interface || ! control_interface ) return - ENODEV ; <vul-end> goto skip_normal_probe ; <vul-sep> |
43 | NVD-CWE-Other PyObject * error ; switch ( type ) { case 1 : { double d ; if ( max < 8 ) { goto invalid ; } memcpy ( & d , buffer + * position , 8 ) ; value = PyFloat_FromDouble ( d ) ; if ( ! value ) { return NULL ; } * position += 8 ; break ; } case 2 : case 14 : { int value_length = ( ( int * ) ( buffer + * position ... | <vul-sep> PyDict_DelItemString ( value , "$ref" ) ; <vul-start> if ( id == NULL ) { id = Py_None ; Py_INCREF ( id ) ; } else { <vul-end> Py_INCREF ( id ) ; <vul-sep> PyDict_DelItemString ( value , "$id" ) ; <vul-start> } <vul-end> if ( database == NULL ) { <vul-sep> |
44 | CWE-119 static ssize_t macvtap_get_user ( struct macvtap_queue * q , struct msghdr * m , const struct iovec * iv , unsigned long total_len , size_t count , int noblock ) { struct sk_buff * skb ; struct macvlan_dev * vlan ; unsigned long len = total_len ; int err ; struct virtio_net_hdr vnet_hdr = { 0 } ; int vnet_hdr_l... | <vul-sep> int vnet_hdr_len = 0 ; <vul-start> int copylen = 0 ; <vul-end> bool zerocopy = false ; <vul-sep> goto err ; <vul-start> err = - EMSGSIZE ; if ( unlikely ( count > UIO_MAXIOV ) ) goto err ; <vul-end> if ( m && m -> msg_control && sock_flag ( & q -> sk , SOCK_ZEROCOPY ) ) <vul-sep> if ( zerocopy ) { <vul-start>... |
45 | CWE-476 static int hls_slice_header ( HEVCContext * s ) { GetBitContext * gb = & s -> HEVClc -> gb ; SliceHeader * sh = & s -> sh ; int i , ret ; sh -> first_slice_in_pic_flag = get_bits1 ( gb ) ; <vul-start> <vul-end> if ( ( IS_IDR ( s ) || IS_BLA ( s ) ) && sh -> first_slice_in_pic_flag ) { s -> seq_decode = ( s -> s... | <vul-sep> sh -> first_slice_in_pic_flag = get_bits1 ( gb ) ; <vul-start> if ( s -> ref && sh -> first_slice_in_pic_flag ) { av_log ( s -> avctx , AV_LOG_ERROR , "Two slices reporting being the first in the same frame.\\n" ) ; return 1 ; } <vul-end> if ( ( IS_IDR ( s ) || IS_BLA ( s ) ) && sh -> first_slice_in_pic_flag ... |
46 | CWE-18 static krb5_error_code <vul-start> iakerb_alloc_context ( iakerb_ctx_id_t * pctx ) <vul-end> { iakerb_ctx_id_t ctx ; krb5_error_code code ; * pctx = NULL ; ctx = k5alloc ( sizeof ( * ctx ) , & code ) ; if ( ctx == NULL ) goto cleanup ; ctx -> defcred = GSS_C_NO_CREDENTIAL ; ctx -> magic = KG_IAKERB_CONTEXT ; ctx... | <vul-sep> static krb5_error_code <vul-start> iakerb_alloc_context ( iakerb_ctx_id_t * pctx , int initiate ) <vul-end> { <vul-sep> ctx -> count = 0 ; <vul-start> ctx -> initiate = initiate ; ctx -> established = 0 ; <vul-end> code = krb5_gss_init_context ( & ctx -> k5c ) ; <vul-sep> |
47 | CWE-119 int dbd_bind_ph ( SV * sth , imp_sth_t * imp_sth , SV * param , SV * value , IV sql_type , SV * attribs , int is_inout , IV maxlen ) { dTHX ; int rc ; int param_num = SvIV ( param ) ; int idx = param_num - 1 ; <vul-start> char err_msg [ 64 ] ; <vul-end> D_imp_xxh ( sth ) ; # if MYSQL_VERSION_ID >= SERVER_PREPAR... | <vul-sep> int idx = param_num - 1 ; <vul-start> char * err_msg ; <vul-end> D_imp_xxh ( sth ) ; <vul-sep> { <vul-start> err_msg = SvPVX ( sv_2mortal ( newSVpvf ( <vul-end> "Binding non-numeric field %d, value %s as a numeric!" , <vul-sep> <vul-end> "Binding non-numeric field %d, value %s as a numeric!" , <vul-start> par... |
48 | CWE-119 static vpx_codec_err_t vp8_get_frame_corrupted ( vpx_codec_alg_priv_t * ctx , <vul-start> int ctrl_id , <vul-end> va_list args ) { int * corrupted = va_arg ( args , int * ) ; VP8D_COMP * pbi = ( VP8D_COMP * ) ctx -> yv12_frame_buffers . pbi [ 0 ] ; if ( corrupted && pbi ) { <vul-start> * corrupted = pbi -> comm... | <vul-sep> { <vul-start> const YV12_BUFFER_CONFIG * const frame = pbi -> common . frame_to_show ; if ( frame == NULL ) return VPX_CODEC_ERROR ; * corrupted = frame -> corrupted ; <vul-end> return VPX_CODEC_OK ; <vul-sep> |
49 | CWE-119 vcnt ++ ; if ( cpi -> lf_ref_frame [ mb_offset - 1 ] != INTRA_FRAME ) { near_mvs [ vcnt ] . as_int = cpi -> lfmv [ mb_offset - 1 ] . as_int ; mv_bias ( cpi -> lf_ref_frame_sign_bias [ mb_offset - 1 ] , refframe , & near_mvs [ vcnt ] , ref_frame_sign_bias ) ; near_ref [ vcnt ] = cpi -> lf_ref_frame [ mb_offset -... | <vul-sep> |
50 | CWE-264 static struct dentry * aio_mount ( struct file_system_type * fs_type , int flags , const char * dev_name , void * data ) { static const struct dentry_operations ops = { . d_dname = simple_dname , } ; <vul-start> return mount_pseudo ( fs_type , "aio:" , NULL , & ops , AIO_RING_MAGIC ) ; <vul-end> } | <vul-sep> } ; <vul-start> struct dentry * root = mount_pseudo ( fs_type , "aio:" , NULL , & ops , AIO_RING_MAGIC ) ; if ( ! IS_ERR ( root ) ) root -> d_sb -> s_iflags |= SB_I_NOEXEC ; return root ; <vul-end> } <vul-sep> |
51 | CWE-352 -void set_header ( HttpResponse res , const char * name , const char * value ) { +void set_header ( HttpResponse res , const char * name , const char * value , ... ) { HttpHeader h = NULL ; ASSERT ( res ) ; ASSERT ( name ) ; NEW ( h ) ; h -> name = Str_dup ( name ) ; <vul-start> h -> value = Str_dup ( value ) ;... | <vul-sep> h -> name = Str_dup ( name ) ; <vul-start> va_list ap ; va_start ( ap , value ) ; h -> value = Str_vcat ( value , ap ) ; va_end ( ap ) ; <vul-end> if ( res -> headers ) { <vul-sep> |
52 | CWE-189 TSQuery parse_tsquery ( char * buf , PushFunction pushval , Datum opaque , bool isplain ) { struct TSQueryParserStateData state ; int i ; TSQuery query ; int commonlen ; QueryItem * ptr ; ListCell * cell ; state . buffer = buf ; state . buf = buf ; state . state = ( isplain ) ? WAITSINGLEOPERAND : WAITFIRSTOPER... | <vul-sep> } <vul-start> if ( TSQUERY_TOO_BIG ( list_length ( state . polstr ) , state . sumlen ) ) ereport ( ERROR , ( errcode ( ERRCODE_PROGRAM_LIMIT_EXCEEDED ) , errmsg ( "tsquery is too large" ) ) ) ; <vul-end> commonlen = COMPUTESIZE ( list_length ( state . polstr ) , state . sumlen ) ; <vul-sep> |
53 | CWE-119 -static LAYER_CONTEXT * get_layer_context ( SVC * svc ) { <vul-start> return svc -> number_temporal_layers > 1 ? & svc -> layer_context [ svc -> temporal_layer_id ] : & svc -> layer_context [ svc -> spatial_layer_id ] ; <vul-end>+static LAYER_CONTEXT * get_layer_context ( VP9_COMP * const cpi ) { <vul-start> <v... | <vul-sep> +static LAYER_CONTEXT * get_layer_context ( VP9_COMP * const cpi ) { <vul-start> if ( is_one_pass_cbr_svc ( cpi ) ) return & cpi -> svc . layer_context [ cpi -> svc . spatial_layer_id * cpi -> svc . number_temporal_layers + cpi -> svc . temporal_layer_id ] ; else return ( cpi -> svc . number_temporal_layers >... |
54 | CWE-476 static void ov511_mode_init_regs ( struct sd * sd ) { struct gspca_dev * gspca_dev = ( struct gspca_dev * ) sd ; int hsegs , vsegs , packet_size , fps , needed ; int interlaced = 0 ; struct usb_host_interface * alt ; struct usb_interface * intf ; intf = usb_ifnum_to_if ( sd -> gspca_dev . dev , sd -> gspca_dev ... | <vul-sep> sd -> gspca_dev . usb_err = - EIO ; <vul-start> return ; } if ( alt -> desc . bNumEndpoints < 1 ) { sd -> gspca_dev . usb_err = - ENODEV ; <vul-end> return ; <vul-sep> |
55 | CWE-190 jas_matrix_t * jas_matrix_create ( int numrows , int numcols ) { jas_matrix_t * matrix ; int i ; <vul-start> <vul-end> if ( numrows < 0 || numcols < 0 ) { <vul-start> return 0 ; <vul-end> } if ( ! ( matrix = jas_malloc ( sizeof ( jas_matrix_t ) ) ) ) { <vul-start> return 0 ; <vul-end> } matrix -> flags_ = 0 ; m... | <vul-sep> int i ; <vul-start> size_t size ; matrix = 0 ; <vul-end> if ( numrows < 0 || numcols < 0 ) { <vul-sep> <vul-end> if ( numrows < 0 || numcols < 0 ) { <vul-start> goto error ; <vul-end> } <vul-sep> if ( ! ( matrix = jas_malloc ( sizeof ( jas_matrix_t ) ) ) ) { <vul-start> goto error ; <vul-end> } <vul-sep> matr... |
56 | CWE-125 static int ng_pkt ( git_pkt * * out , const char * line , size_t len ) { git_pkt_ng * pkt ; const char * ptr ; size_t alloclen ; pkt = git__malloc ( sizeof ( * pkt ) ) ; GITERR_CHECK_ALLOC ( pkt ) ; pkt -> ref = NULL ; pkt -> type = GIT_PKT_NG ; <vul-start> <vul-end> line += 3 ; <vul-start> if ( ! ( ptr = strch... | <vul-sep> pkt -> type = GIT_PKT_NG ; <vul-start> if ( len < 3 ) goto out_err ; <vul-end> line += 3 ; <vul-sep> <vul-end> line += 3 ; <vul-start> len -= 3 ; if ( ! ( ptr = memchr ( line , ' ' , len ) ) ) <vul-end> goto out_err ; <vul-sep> pkt -> ref [ len ] = '\\0' ; <vul-start> if ( len < 1 ) goto out_err ; <vul-end> l... |
57 | CWE-134 rrd_set_error ( "invalid y-grid format" ) ; return ; } break ; case 1007 : im -> draw_3d_border = atoi ( optarg ) ; break ; case 1008 : if ( sscanf ( optarg , "%[-0-9.e+]:%[-0-9.e+]" , double_str , double_str2 ) != 2 ) { if ( rrd_strtodbl ( double_str , 0 , & ( im -> grid_dash_on ) , NULL ) != 2 || rrd_strtodbl... | <vul-sep> case 1004 : <vul-start> if ( bad_format_axis ( optarg ) ) { <vul-end> return ; <vul-sep> case 1012 : <vul-start> if ( bad_format_axis ( optarg ) ) { <vul-end> return ; <vul-sep> |
58 | 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> STREAM s ; <vul-sep> <vul-end> STREAM s ; <vul-start> struct stream packet ; <vul-end> RD_BOOL is_fastpath ; <vul-sep> return False ; <vul-start> packet = * s ; <vul-end> ber_parse_header ( s , MCS_CONNECT_RESPONSE , & length ) ; <vul-sep> in_uint8s ( s , l... |
59 | CWE-476 } YY_BREAK case 12 : YY_RULE_SETUP # line 227 "re_lexer.l" { return _DIGIT_ ; } YY_BREAK case 13 : YY_RULE_SETUP # line 232 "re_lexer.l" { return _NON_DIGIT_ ; } YY_BREAK case 14 : YY_RULE_SETUP # line 237 "re_lexer.l" { return _WORD_BOUNDARY_ ; } YY_BREAK case 15 : YY_RULE_SETUP # line 241 "re_lexer.l" { retur... | <vul-sep> { <vul-start> yyerror ( yyscanner , lex_env , "illegal escape sequence" ) ; <vul-end> yyterminate ( ) ; <vul-sep> { <vul-start> yyerror ( yyscanner , lex_env , "illegal escape sequence" ) ; <vul-end> yyterminate ( ) ; <vul-sep> { <vul-start> yyerror ( yyscanner , lex_env , "illegal escape sequence" ) ; <vul-e... |
60 | CWE-119 -void vp9_write_prob_diff_update ( vp9_writer * w , vp9_prob newp , vp9_prob oldp ) { +void vp9_write_prob_diff_update ( vpx_writer * w , vpx_prob newp , vpx_prob oldp ) { const int delp = remap_prob ( newp , oldp ) ; encode_term_subexp ( w , delp ) ; } | <vul-sep> |
61 | CWE-295 static int ssl_verify_cert ( struct tunnel * tunnel ) { int ret = - 1 ; int cert_valid = 0 ; unsigned char digest [ SHA256LEN ] ; unsigned int len ; struct x509_digest * elem ; char digest_str [ SHA256STRLEN ] , * subject , * issuer ; char * line ; int i ; X509_NAME * subj ; SSL_set_verify ( tunnel -> ssl_handl... | <vul-sep> # else <vul-start> if ( validate_hostname ( tunnel -> config -> gateway_host , cert ) == MatchFound ) <vul-end> cert_valid = 1 ; <vul-sep> |
62 | CWE-362 static int snd_timer_user_release ( struct inode * inode , struct file * file ) { struct snd_timer_user * tu ; if ( file -> private_data ) { tu = file -> private_data ; file -> private_data = NULL ; <vul-start> <vul-end> if ( tu -> timeri ) snd_timer_close ( tu -> timeri ) ; <vul-start> <vul-end> kfree ( tu -> ... | <vul-sep> file -> private_data = NULL ; <vul-start> mutex_lock ( & tu -> ioctl_lock ) ; <vul-end> if ( tu -> timeri ) <vul-sep> snd_timer_close ( tu -> timeri ) ; <vul-start> mutex_unlock ( & tu -> ioctl_lock ) ; <vul-end> kfree ( tu -> queue ) ; <vul-sep> |
63 | CWE-416 static OPJ_BOOL opj_j2k_write_mco ( opj_j2k_t * p_j2k , struct opj_stream_private * p_stream , struct opj_event_mgr * p_manager ) { OPJ_BYTE * l_current_data = 00 ; OPJ_UINT32 l_mco_size ; opj_tcp_t * l_tcp = 00 ; opj_simple_mcc_decorrelation_data_t * l_mcc_record ; OPJ_UINT32 i ; assert ( p_j2k != 00 ) ; asser... | <vul-sep> } <vul-start> l_current_data = p_j2k -> m_specific_param . m_encoder . m_header_tile_data ; <vul-end> opj_write_bytes ( l_current_data , J2K_MS_MCO , 2 ) ; <vul-sep> |
64 | CWE-190 -static int getnum ( lua_State * L , const char * * fmt , int df ) { +static int getnum ( const char * * fmt , int df ) { if ( ! isdigit ( * * fmt ) ) return df ; else { int a = 0 ; do { <vul-start> if ( a > ( INT_MAX / 10 ) || a * 10 > ( INT_MAX - ( * * fmt - '0' ) ) ) luaL_error ( L , "integral size overflow"... | <vul-sep> |
65 | CWE-119 void ssh_kex2 ( char * host , struct sockaddr * hostaddr , u_short port ) { char * myproposal [ PROPOSAL_MAX ] = { KEX_CLIENT } ; char * s ; struct kex * kex ; int r ; xxx_host = host ; xxx_hostaddr = hostaddr ; if ( ( s = kex_names_cat ( options . kex_algorithms , "ext-info-c" ) ) == NULL ) fatal ( "%s: kex_na... | <vul-sep> myproposal [ PROPOSAL_COMP_ALGS_STOC ] = options . compression ? <vul-start> "zlib@openssh.com,none" : "none,zlib@openssh.com" ; <vul-end> myproposal [ PROPOSAL_MAC_ALGS_CTOS ] = <vul-sep> |
66 | 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 ; } | <vul-sep> |
67 | CWE-787 opj_image_t * pgxtoimage ( const char * filename , opj_cparameters_t * parameters ) { FILE * f = NULL ; int w , h , prec ; int i , numcomps , max ; OPJ_COLOR_SPACE color_space ; opj_image_cmptparm_t cmptparm ; opj_image_t * image = NULL ; int adjustS , ushift , dshift , force8 ; char endian1 , endian2 , sign ; ... | <vul-sep> fseek ( f , 0 , SEEK_SET ) ; <vul-start> if ( fscanf ( f , "PG%31[ \\t]%c%c%31[ \\t+-]%d%31[ \\t]%d%31[ \\t]%d" , temp , & endian1 , <vul-end> & endian2 , signtmp , & prec , temp , & w , temp , & h ) != 9 ) { <vul-sep> |
68 | NVD-CWE-noinfo static void SaltTextAway ( XtermWidget xw , int which , CELL * cellc , CELL * cell ) { TScreen * screen = TScreenOf ( xw ) ; SelectedCells * scp ; int i ; int eol ; int need = 0 ; <vul-start> <vul-end> Char * line ; Char * lp ; CELL first = * cellc ; CELL last = * cell ; if ( which < 0 || which >= MAX_SE... | <vul-sep> int need = 0 ; <vul-start> size_t have = 0 ; <vul-end> Char * line ; <vul-sep> if_OPT_WIDE_CHARS ( screen , { <vul-start> if ( need > 0 ) { if ( screen -> max_combining > 0 ) need += screen -> max_combining ; need *= 6 ; } <vul-end> } ) ; <vul-sep> * lp = '\\0' ; <vul-start> have = ( size_t ) ( lp - line ) ; ... |
69 | CWE-59 static gchar * read_file ( gchar * filepath ) { FILE * f ; size_t length ; gchar * ret = NULL ; <vul-start> f = fopen ( filepath , "rb" ) ; <vul-end> if ( f ) { fseek ( f , 0 , SEEK_END ) ; length = ( size_t ) ftell ( f ) ; fseek ( f , 0 , SEEK_SET ) ; ret = MALLOC ( length + 1 ) ; if ( ret ) { if ( fread ( ret ... | <vul-sep> gchar * ret = NULL ; <vul-start> f = fopen ( filepath , "r" ) ; <vul-end> if ( f ) { <vul-sep> |
70 | CWE-310 int DSA_verify ( int type , const unsigned char * dgst , int dgst_len , const unsigned char * sigbuf , int siglen , DSA * dsa ) { DSA_SIG * s ; <vul-start> <vul-end> int ret = - 1 ; s = DSA_SIG_new ( ) ; if ( s == NULL ) return ( ret ) ; <vul-start> if ( d2i_DSA_SIG ( & s , & sigbuf , siglen ) == NULL ) goto er... | <vul-sep> DSA_SIG * s ; <vul-start> const unsigned char * p = sigbuf ; unsigned char * der = NULL ; int derlen = - 1 ; <vul-end> int ret = - 1 ; <vul-sep> if ( s == NULL ) return ( ret ) ; <vul-start> if ( d2i_DSA_SIG ( & s , & p , siglen ) == NULL ) goto err ; derlen = i2d_DSA_SIG ( s , & der ) ; if ( derlen != siglen... |
71 | CWE-295 -int bind_ports ( void ) { +NOEXPORT int bind_ports ( void ) { SERVICE_OPTIONS * opt ; int listening_section ; # ifdef USE_LIBWRAP libwrap_init ( ) ; # endif s_poll_init ( fds , 1 ) ; for ( opt = service_options . next ; opt ; opt = opt -> next ) { unsigned i ; for ( i = 0 ; i < opt -> local_addr . num ; ++ i )... | <vul-sep> |
72 | CWE-310 int btrfs_add_link ( struct btrfs_trans_handle * trans , struct inode * parent_inode , struct inode * inode , const char * name , int name_len , int add_backref , u64 index ) { int ret = 0 ; struct btrfs_key key ; struct btrfs_root * root = BTRFS_I ( parent_inode ) -> root ; u64 ino = btrfs_ino ( inode ) ; u64 ... | <vul-sep> btrfs_inode_type ( inode ) , index ) ; <vul-start> if ( ret == - EEXIST || ret == - EOVERFLOW ) <vul-end> goto fail_dir_item ; <vul-sep> |
73 | CWE-125 if ( ! r_str_ncasecmp ( str + pos , "ptr" , 3 ) ) { continue ; } else if ( ! r_str_ncasecmp ( str + pos , "byte" , 4 ) ) { op -> type |= OT_MEMORY | OT_BYTE ; op -> dest_size = OT_BYTE ; explicit_size = true ; } else if ( ! r_str_ncasecmp ( str + pos , "word" , 4 ) ) { op -> type |= OT_MEMORY | OT_WORD ; op -> ... | <vul-sep> if ( reg != X86R_UNDEFINED ) { <vul-start> if ( reg_index < 2 ) { <vul-end> op -> regs [ reg_index ] = reg ; <vul-sep> op -> scale [ reg_index ] = temp ; <vul-start> } <vul-end> ++ reg_index ; <vul-sep> op -> offset += temp ; <vul-start> if ( reg_index < 2 ) { <vul-end> op -> regs [ reg_index ] = X86R_UNDEFIN... |
74 | CWE-362 static int <vul-start> mptctl_readtest ( unsigned long arg ) <vul-end> { struct mpt_ioctl_test __user * uarg = ( void __user * ) arg ; struct mpt_ioctl_test karg ; <vul-start> MPT_ADAPTER * ioc ; int iocnum ; <vul-end> if ( copy_from_user ( & karg , uarg , sizeof ( struct mpt_ioctl_test ) ) ) { printk ( KERN_ER... | <vul-sep> static int <vul-start> mptctl_readtest ( MPT_ADAPTER * ioc , unsigned long arg ) <vul-end> { <vul-sep> |
75 | CWE-119 void WT_NoiseGenerator ( S_WT_VOICE * pWTVoice , S_WT_INT_FRAME * pWTIntFrame ) { EAS_PCM * pOutputBuffer ; EAS_I32 phaseInc ; EAS_I32 tmp0 ; EAS_I32 tmp1 ; EAS_I32 nInterpolatedSample ; EAS_I32 numSamples ; numSamples = pWTIntFrame -> numSamples ; <vul-start> <vul-end> pOutputBuffer = pWTIntFrame -> pAudioBuff... | <vul-sep> numSamples = pWTIntFrame -> numSamples ; <vul-start> if ( numSamples <= 0 ) { ALOGE ( "b/26366256" ) ; return ; } <vul-end> pOutputBuffer = pWTIntFrame -> pAudioBuffer ; <vul-sep> |
76 | CWE-617 void pci_lintr_assert ( struct pci_vdev * dev ) { <vul-start> assert ( dev -> lintr . pin > 0 ) ; <vul-end> pthread_mutex_lock ( & dev -> lintr . lock ) ; if ( dev -> lintr . state == IDLE ) { if ( pci_lintr_permitted ( dev ) ) { dev -> lintr . state = ASSERTED ; pci_irq_assert ( dev ) ; } else dev -> lintr . s... | <vul-sep> { <vul-start> if ( dev -> lintr . pin <= 0 ) { pr_warn ( "%s: Invalid intr pin on dev [%s]\\n" , __func__ , dev -> name ) ; return ; } <vul-end> pthread_mutex_lock ( & dev -> lintr . lock ) ; <vul-sep> |
77 | CWE-787 MYSOFA_EXPORT struct MYSOFA_HRTF * mysofa_load ( const char * filename , int * err ) { struct READER reader ; struct MYSOFA_HRTF * hrtf = NULL ; if ( filename == NULL ) filename = CMAKE_INSTALL_PREFIX "/share/libmysofa/default.sofa" ; if ( strcmp ( filename , "-" ) ) reader . fhd = fopen ( filename , "rb" ) ; e... | <vul-sep> reader . all = NULL ; <vul-start> reader . recursive_counter = 0 ; <vul-end> * err = superblockRead ( & reader , & reader . superblock ) ; <vul-sep> |
78 | CWE-20 static int proc_sys_readdir ( struct file * file , struct dir_context * ctx ) { struct ctl_table_header * head = grab_header ( file_inode ( file ) ) ; struct ctl_table_header * h = NULL ; struct ctl_table * entry ; struct ctl_dir * ctl_dir ; unsigned long pos ; if ( IS_ERR ( head ) ) return PTR_ERR ( head ) ; ct... | <vul-sep> if ( ! dir_emit_dots ( file , ctx ) ) <vul-start> goto out ; <vul-end> pos = 2 ; <vul-sep> } <vul-start> out : <vul-end> sysctl_head_finish ( head ) ; <vul-sep> |
79 | CWE-20 static MagickBooleanType ConcatenateImages ( int argc , char * * argv , ExceptionInfo * exception ) { FILE * input , * output ; <vul-start> <vul-end> int c ; register ssize_t i ; if ( ExpandFilenames ( & argc , & argv ) == MagickFalse ) ThrowFileException ( exception , ResourceLimitError , "MemoryAllocationFaile... | <vul-sep> * output ; <vul-start> MagickBooleanType status ; <vul-end> int <vul-sep> output = fopen_utf8 ( argv [ argc - 1 ] , "wb" ) ; <vul-start> if ( output == ( FILE * ) NULL ) { ThrowFileException ( exception , FileOpenError , "UnableToOpenFile" , argv [ argc - 1 ] ) ; <vul-end> return ( MagickFalse ) ; <vul-sep> }... |
80 | CWE-416 void usb_sg_cancel ( struct usb_sg_request * io ) { unsigned long flags ; int i , retval ; spin_lock_irqsave ( & io -> lock , flags ) ; <vul-start> if ( io -> status ) { <vul-end> spin_unlock_irqrestore ( & io -> lock , flags ) ; return ; } io -> status = - ECONNRESET ; <vul-start> <vul-end> spin_unlock_irqrest... | <vul-sep> spin_lock_irqsave ( & io -> lock , flags ) ; <vul-start> if ( io -> status || io -> count == 0 ) { <vul-end> spin_unlock_irqrestore ( & io -> lock , flags ) ; <vul-sep> io -> status = - ECONNRESET ; <vul-start> io -> count ++ ; <vul-end> spin_unlock_irqrestore ( & io -> lock , flags ) ; <vul-sep> } <vul-start... |
81 | CWE-125 const uint8_t * dst , * snpa , * neta ; u_int dstl , snpal , netal ; ND_TCHECK ( * pptr ) ; if ( li < 1 ) { ND_PRINT ( ( ndo , ", bad redirect/li" ) ) ; return ; } dstl = * pptr ; pptr ++ ; li -- ; ND_TCHECK2 ( * pptr , dstl ) ; if ( li < dstl ) { ND_PRINT ( ( ndo , ", bad redirect/li" ) ) ; return ; } dst = pp... | <vul-sep> li -= netal ; <vul-start> if ( snpal == 6 ) ND_PRINT ( ( ndo , "\\n\\t SNPA (length: %u): %s" , snpal , etheraddr_string ( ndo , snpa ) ) ) ; <vul-end> else <vul-sep> <vul-end> else <vul-start> ND_PRINT ( ( ndo , "\\n\\t SNPA (length: %u): %s" , snpal , linkaddr_string ( ndo , snpa , LINKADDR_OTHER , snpal ... |
82 | CWE-476 static int resize ( int new_rows , int new_cols , VTermPos * delta , void * user ) { VTermScreen * screen = user ; int is_altscreen = ( screen -> buffers [ 1 ] && screen -> buffer == screen -> buffers [ 1 ] ) ; int old_rows = screen -> rows ; int old_cols = screen -> cols ; int first_blank_row ; if ( ! is_altsc... | <vul-sep> |
83 | 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... | <vul-sep> int base_qindex ) { <vul-start> if ( segfeature_active ( seg , segment_id , SEG_LVL_ALT_Q ) ) { const int data = get_segdata ( seg , segment_id , SEG_LVL_ALT_Q ) ; <vul-end> const int seg_qindex = seg -> abs_delta == SEGMENT_ABSDATA ? <vul-sep> |
84 | CWE-20 if ( settings . verbose > 1 ) { fprintf ( stderr , "%d: Realign input buffer\\n" , c -> sfd ) ; } } # endif protocol_binary_request_header * req ; req = ( protocol_binary_request_header * ) c -> rcurr ; if ( settings . verbose > 1 ) { int ii ; fprintf ( stderr , "<%d Read binary protocol data:" , c -> sfd ) ; fo... | <vul-sep> el = memchr ( c -> rcurr , '\\n' , c -> rbytes ) ; <vul-start> if ( ! el ) { if ( c -> rbytes > 1024 ) { char * ptr = c -> rcurr ; while ( * ptr == ' ' ) { ++ ptr ; } if ( strcmp ( ptr , "get " ) && strcmp ( ptr , "gets " ) ) { conn_set_state ( c , conn_closing ) ; return 1 ; } } <vul-end> return 0 ; <vul-sep... |
85 | CWE-125 static void <vul-start> l2tp_msgtype_print ( netdissect_options * ndo , const u_char * dat ) <vul-end> { const uint16_t * ptr = ( const uint16_t * ) dat ; <vul-start> <vul-end> ND_PRINT ( ( ndo , "%s" , tok2str ( l2tp_msgtype2str , "MSGTYPE-#%u" , EXTRACT_16BITS ( ptr ) ) ) ) ; } | <vul-sep> static void <vul-start> l2tp_msgtype_print ( netdissect_options * ndo , const u_char * dat , u_int length ) <vul-end> { <vul-sep> const uint16_t * ptr = ( const uint16_t * ) dat ; <vul-start> if ( length < 2 ) { ND_PRINT ( ( ndo , "AVP too short" ) ) ; return ; } <vul-end> ND_PRINT ( ( ndo , "%s" , tok2str ( ... |
86 | CWE-119 static int key_notify_sa_flush ( const struct km_event * c ) { struct sk_buff * skb ; struct sadb_msg * hdr ; skb = alloc_skb ( sizeof ( struct sadb_msg ) + 16 , GFP_ATOMIC ) ; if ( ! skb ) return - ENOBUFS ; hdr = ( struct sadb_msg * ) skb_put ( skb , sizeof ( struct sadb_msg ) ) ; hdr -> sadb_msg_satype = pfk... | <vul-sep> hdr -> sadb_msg_len = ( sizeof ( struct sadb_msg ) / sizeof ( uint64_t ) ) ; <vul-start> hdr -> sadb_msg_reserved = 0 ; <vul-end> pfkey_broadcast ( skb , GFP_ATOMIC , BROADCAST_ALL , NULL , c -> net ) ; <vul-sep> |
87 | CWE-119 -static int tile_worker_hook ( void * arg1 , void * arg2 ) { <vul-start> TileWorkerData * const tile_data = ( TileWorkerData * ) arg1 ; const TileInfo * const tile = ( TileInfo * ) arg2 ; <vul-end>+static int tile_worker_hook ( TileWorkerData * const tile_data , <vul-start> <vul-end> int mi_row , mi_col ; <vul-... | <vul-sep> +static int tile_worker_hook ( TileWorkerData * const tile_data , <vul-start> const TileInfo * const tile ) { <vul-end> int mi_row , mi_col ; <vul-sep> <vul-end> int mi_row , mi_col ; <vul-start> if ( setjmp ( tile_data -> error_info . jmp ) ) { tile_data -> error_info . setjmp = 0 ; tile_data -> xd . corrupt... |
88 | CWE-125 authrealmlen = authinfolen - 20 ; if ( authrealmlen > 0 ) { ND_PRINT ( ( ndo , ", realm: " ) ) ; } for ( i = 0 ; i < authrealmlen ; i ++ , tp ++ ) ND_PRINT ( ( ndo , "%02x" , * tp ) ) ; ND_PRINT ( ( ndo , ", key ID: %08x" , EXTRACT_32BITS ( tp ) ) ) ; tp += 4 ; ND_PRINT ( ( ndo , ", HMAC-MD5:" ) ) ; for ( i = 0... | <vul-sep> case DH6OPT_RECONF_MSG : <vul-start> if ( optlen != 1 ) { ND_PRINT ( ( ndo , " ?)" ) ) ; break ; } <vul-end> tp = ( const u_char * ) ( dh6o + 1 ) ; <vul-sep> |
89 | CWE-119 static int set_register ( pegasus_t * pegasus , __u16 indx , __u8 data ) { <vul-start> <vul-end> int ret ; <vul-start> <vul-end> ret = usb_control_msg ( pegasus -> usb , usb_sndctrlpipe ( pegasus -> usb , 0 ) , PEGASUS_REQ_SET_REG , PEGASUS_REQT_WRITE , data , <vul-start> indx , & data , 1 , 1000 ) ; <vul-end> ... | <vul-sep> { <vul-start> u8 * buf ; <vul-end> int ret ; <vul-sep> <vul-end> int ret ; <vul-start> buf = kmemdup ( & data , 1 , GFP_NOIO ) ; if ( ! buf ) return - ENOMEM ; <vul-end> ret = usb_control_msg ( pegasus -> usb , usb_sndctrlpipe ( pegasus -> usb , 0 ) , <vul-sep> PEGASUS_REQ_SET_REG , PEGASUS_REQT_WRITE , data ... |
90 | CWE-90 kadm5_ret_t kadm5_create_principal_3 ( void * server_handle , kadm5_principal_ent_t entry , long mask , int n_ks_tuple , krb5_key_salt_tuple * ks_tuple , char * password ) { krb5_db_entry * kdb ; osa_princ_ent_rec adb ; kadm5_policy_ent_rec polent ; krb5_boolean have_polent = FALSE ; krb5_timestamp now ; krb5_tl... | <vul-sep> return KADM5_BAD_MASK ; <vul-start> if ( mask & KADM5_TL_DATA ) { for ( tl_data_tail = entry -> tl_data ; tl_data_tail != NULL ; tl_data_tail = tl_data_tail -> tl_data_next ) { if ( tl_data_tail -> tl_data_type < 256 ) return KADM5_BAD_TL_TYPE ; } } <vul-end> ret = kdb_get_entry ( handle , entry -> principal ... |
91 | CWE-416 buf_copy_options ( wp -> w_buffer , BCO_ENTER | BCO_NOHELP ) ; if ( ! curwin_invalid ) { prevwin = curwin ; curwin -> w_redr_status = TRUE ; } curwin = wp ; curbuf = wp -> w_buffer ; check_cursor ( ) ; if ( ! virtual_active ( ) ) curwin -> w_cursor . coladd = 0 ; changed_line_abv_curs ( ) ; if ( curwin -> w_loc... | <vul-sep> # ifdef FEAT_TERMINAL <vul-start> if ( bt_terminal ( curwin -> w_buffer ) ) <vul-end> redraw_mode = TRUE ; <vul-sep> |
92 | CWE-787 static int tcos_decipher ( sc_card_t * card , const u8 * crgram , size_t crgram_len , u8 * out , size_t outlen ) { sc_context_t * ctx ; sc_apdu_t apdu ; u8 rbuf [ SC_MAX_APDU_BUFFER_SIZE ] ; u8 sbuf [ SC_MAX_APDU_BUFFER_SIZE ] ; tcos_data * data ; int tcos3 , r ; assert ( card != NULL && crgram != NULL && out !... | <vul-sep> sbuf [ 0 ] = tcos3 ? 0x00 : ( ( data -> pad_flags & SC_ALGORITHM_RSA_PAD_PKCS1 ) ? 0x81 : 0x02 ) ; <vul-start> if ( sizeof sbuf - 1 < crgram_len ) return SC_ERROR_INVALID_ARGUMENTS ; <vul-end> memcpy ( sbuf + 1 , crgram , crgram_len ) ; <vul-sep> |
93 | CWE-125 static expr_ty ast_for_trailer ( struct compiling * c , const node * n , expr_ty left_expr ) { REQ ( n , trailer ) ; if ( TYPE ( CHILD ( n , 0 ) ) == LPAR ) { if ( NCH ( n ) == 2 ) return Call ( left_expr , NULL , NULL , LINENO ( n ) , n -> n_col_offset , c -> c_arena ) ; else <vul-start> return ast_for_call ( ... | <vul-sep> else <vul-start> return ast_for_call ( c , CHILD ( n , 1 ) , left_expr , true ) ; <vul-end> } <vul-sep> |
94 | CWE-119 static bool check_underflow ( const struct ipt_entry * e ) { const struct xt_entry_target * t ; unsigned int verdict ; <vul-start> if ( ! unconditional ( & e -> ip ) ) <vul-end> return false ; t = ipt_get_target_c ( e ) ; if ( strcmp ( t -> u . user . name , XT_STANDARD_TARGET ) != 0 ) return false ; verdict = ... | <vul-sep> unsigned int verdict ; <vul-start> if ( ! unconditional ( e ) ) <vul-end> return false ; <vul-sep> |
95 | CWE-20 static int caif_stream_recvmsg ( struct kiocb * iocb , struct socket * sock , struct msghdr * msg , size_t size , int flags ) { struct sock * sk = sock -> sk ; int copied = 0 ; int target ; int err = 0 ; long timeo ; err = - EOPNOTSUPP ; if ( flags & MSG_OOB ) goto out ; <vul-start> msg -> msg_namelen = 0 ; <vul... | <vul-sep> |
End of preview. Expand in Data Studio
No dataset card yet
- Downloads last month
- 5