cwe
stringclasses
9 values
func_name
stringclasses
551 values
func_src_before
stringlengths
72
114k
func_src_after
stringclasses
576 values
line_changes
stringclasses
576 values
char_changes
stringclasses
574 values
commit_link
stringclasses
430 values
file_name
stringclasses
411 values
vul_type
stringclasses
9 values
num_tokens
float64
16
28.1k
⌀
refactored
bool
2 classes
parsing_score
bool
2 classes
generated
bool
2 classes
cwe-125
ext4_fill_super
static int ext4_fill_super(struct super_block *sb, void *data, int silent) { char *orig_data = kstrdup(data, GFP_KERNEL); struct buffer_head *bh; struct ext4_super_block *es = NULL; struct ext4_sb_info *sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); ext4_fsblk_t block; ext4_fsblk_t sb_block = get_sb_block(&data); ext4...
static int ext4_fill_super(struct super_block *sb, void *data, int silent) { char *orig_data = kstrdup(data, GFP_KERNEL); struct buffer_head *bh; struct ext4_super_block *es = NULL; struct ext4_sb_info *sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); ext4_fsblk_t block; ext4_fsblk_t sb_block = get_sb_block(&data); ext4...
{'deleted': [], 'added': [{'line_no': 522, 'char_start': 16711, 'char_end': 16748, 'line': '\tif (ext4_has_feature_meta_bg(sb)) {\n'}, {'line_no': 523, 'char_start': 16748, 'char_end': 16802, 'line': '\t\tif (le32_to_cpu(es->s_first_meta_bg) >= db_count) {\n'}, {'line_no': 524, 'char_start': 16802, 'char_end': 16832, '...
{'deleted': [], 'added': [{'char_start': 16712, 'char_end': 16999, 'chars': 'if (ext4_has_feature_meta_bg(sb)) {\n\t\tif (le32_to_cpu(es->s_first_meta_bg) >= db_count) {\n\t\t\text4_msg(sb, KERN_WARNING,\n\t\t\t\t "first meta block group too large: %u "\n\t\t\t\t "(group descriptor block count %u)",\n\t\t\t\t le32_to_c...
github.com/torvalds/linux/commit/3a4b77cd47bb837b8557595ec7425f281f2ca1fe
fs/ext4/super.c
cwe-125
9,022
false
false
false
cwe-125
Mat_VarReadNextInfo4
Mat_VarReadNextInfo4(mat_t *mat) { int M,O,data_type,class_type; mat_int32_t tmp; long nBytes; size_t readresult; matvar_t *matvar = NULL; union { mat_uint32_t u; mat_uint8_t c[4]; } endian; if ( mat == NULL || mat->fp == NULL ) return NULL; el...
Mat_VarReadNextInfo4(mat_t *mat) { int M,O,data_type,class_type; mat_int32_t tmp; long nBytes; size_t readresult; matvar_t *matvar = NULL; union { mat_uint32_t u; mat_uint8_t c[4]; } endian; if ( mat == NULL || mat->fp == NULL ) return NULL; el...
{'deleted': [], 'added': [{'line_no': 155, 'char_start': 3941, 'char_end': 3954, 'line': ' } else {\n'}, {'line_no': 156, 'char_start': 3954, 'char_end': 3992, 'line': " matvar->name[tmp - 1] = '\\0';\n"}]}
{'deleted': [], 'added': [{'char_start': 3946, 'char_end': 3997, 'chars': " else {\n matvar->name[tmp - 1] = '\\0';\n }"}]}
github.com/tbeu/matio/commit/651a8e28099edb5fbb9e4e1d4d3238848f446c9a
src/mat4.c
cwe-125
1,297
false
false
false
cwe-125
decode_bundle
decode_bundle(bool load, const struct nx_action_bundle *nab, const struct vl_mff_map *vl_mff_map, uint64_t *tlv_bitmap, struct ofpbuf *ofpacts) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); struct ofpact_bundle *bundle; uint32_t slave_type; size_t slaves_si...
decode_bundle(bool load, const struct nx_action_bundle *nab, const struct vl_mff_map *vl_mff_map, uint64_t *tlv_bitmap, struct ofpbuf *ofpacts) { static struct vlog_rate_limit rl = VLOG_RATE_LIMIT_INIT(1, 5); struct ofpact_bundle *bundle; uint32_t slave_type; size_t slaves_si...
{'deleted': [{'line_no': 67, 'char_start': 2651, 'char_end': 2657, 'line': ' }\n'}, {'line_no': 68, 'char_start': 2657, 'char_end': 2658, 'line': '\n'}, {'line_no': 69, 'char_start': 2658, 'char_end': 2703, 'line': ' for (i = 0; i < bundle->n_slaves; i++) {\n'}, {'line_no': 70, 'char_start': 2703, 'char_end': 278...
{'deleted': [{'char_start': 2656, 'char_end': 2657, 'chars': '\n'}], 'added': [{'char_start': 2656, 'char_end': 2663, 'chars': ' else {'}, {'char_start': 2664, 'char_end': 2668, 'chars': ' '}, {'char_start': 2721, 'char_end': 2725, 'chars': ' '}, {'char_start': 2744, 'char_end': 2760, 'chars': '\n '...
github.com/openvswitch/ovs/commit/9237a63c47bd314b807cda0bd2216264e82edbe8
lib/ofp-actions.c
cwe-125
867
false
false
false
cwe-125
r_bin_java_line_number_table_attr_new
R_API RBinJavaAttrInfo *r_bin_java_line_number_table_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { ut32 i = 0; ut64 curpos, offset = 0; RBinJavaLineNumberAttribute *lnattr; RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (buffer, sz, buf_offset); if (!attr) { return NULL; } offset += 6; attr->type = ...
R_API RBinJavaAttrInfo *r_bin_java_line_number_table_attr_new(ut8 *buffer, ut64 sz, ut64 buf_offset) { ut32 i = 0; ut64 curpos, offset = 0; RBinJavaLineNumberAttribute *lnattr; RBinJavaAttrInfo *attr = r_bin_java_default_attr_new (buffer, sz, buf_offset); if (!attr) { return NULL; } offset += 6; attr->type = ...
{'deleted': [], 'added': [{'line_no': 29, 'char_start': 996, 'char_end': 1022, 'line': '\t\tif (offset + 8 >= sz) {\n'}, {'line_no': 30, 'char_start': 1022, 'char_end': 1032, 'line': '\t\t\tbreak;\n'}, {'line_no': 31, 'char_start': 1032, 'char_end': 1036, 'line': '\t\t}\n'}]}
{'deleted': [], 'added': [{'char_start': 998, 'char_end': 1038, 'chars': 'if (offset + 8 >= sz) {\n\t\t\tbreak;\n\t\t}\n\t\t'}]}
github.com/radare/radare2/commit/eb0fb72b3c5307ec8e33effb6bf947e38cfdffe8
shlr/java/class.c
cwe-125
401
false
false
false
cwe-125
youngcollection
static void youngcollection (lua_State *L, global_State *g) { GCObject **psurvival; /* to point to first non-dead survival object */ lua_assert(g->gcstate == GCSpropagate); markold(g, g->survival, g->reallyold); markold(g, g->finobj, g->finobjrold); atomic(L); /* sweep nursery and get a pointer to its las...
static void youngcollection (lua_State *L, global_State *g) { GCObject **psurvival; /* to point to first non-dead survival object */ lua_assert(g->gcstate == GCSpropagate); markold(g, g->allgc, g->reallyold); markold(g, g->finobj, g->finobjrold); atomic(L); /* sweep nursery and get a pointer to its last l...
{'deleted': [{'line_no': 4, 'char_start': 178, 'char_end': 219, 'line': ' markold(g, g->survival, g->reallyold);\n'}], 'added': [{'line_no': 4, 'char_start': 178, 'char_end': 216, 'line': ' markold(g, g->allgc, g->reallyold);\n'}]}
{'deleted': [{'char_start': 194, 'char_end': 200, 'chars': 'surviv'}], 'added': [{'char_start': 196, 'char_end': 199, 'chars': 'lgc'}]}
github.com/lua/lua/commit/127e7a6c8942b362aa3c6627f44d660a4fb75312
lgc.c
cwe-125
354
false
true
false
cwe-125
decode_pointer_field
static bool checkreturn decode_pointer_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { #ifndef PB_ENABLE_MALLOC PB_UNUSED(wire_type); PB_UNUSED(field); PB_RETURN_ERROR(stream, "no malloc support"); #else switch (PB_HTYPE(field->type)) { case PB_HTYPE_REQUIRED:...
static bool checkreturn decode_pointer_field(pb_istream_t *stream, pb_wire_type_t wire_type, pb_field_iter_t *field) { #ifndef PB_ENABLE_MALLOC PB_UNUSED(wire_type); PB_UNUSED(field); PB_RETURN_ERROR(stream, "no malloc support"); #else switch (PB_HTYPE(field->type)) { case PB_HTYPE_REQUIRED:...
{'deleted': [{'line_no': 110, 'char_start': 4206, 'char_end': 4233, 'line': ' (*size)++;\n'}, {'line_no': 111, 'char_start': 4233, 'char_end': 4318, 'line': ' if (!allocate_field(stream, field->pField, field->data_size, *size))\n'}, {'line_no': 114, 'char_start': 4365, 'char_end': 4453, 'l...
{'deleted': [{'char_start': 4222, 'char_end': 4249, 'chars': '(*size)++;\n '}, {'char_start': 4447, 'char_end': 4448, 'chars': '-'}, {'char_start': 4449, 'char_end': 4450, 'chars': '1'}], 'added': [{'char_start': 4283, 'char_end': 4292, 'chars': '(size_t)('}, {'char_start': 4297, 'char_end': 4302, 'chars...
github.com/nanopb/nanopb/commit/45582f1f97f49e2abfdba1463d1e1027682d9856
pb_decode.c
cwe-125
885
false
false
false
cwe-125
enc_untrusted_inet_ntop
const char *enc_untrusted_inet_ntop(int af, const void *src, char *dst, socklen_t size) { if (!src || !dst) { errno = EFAULT; return nullptr; } size_t src_size = 0; if (af == AF_INET) { src_size = sizeof(struct in_addr); } else if (af == AF_INET6) { src_size...
const char *enc_untrusted_inet_ntop(int af, const void *src, char *dst, socklen_t size) { if (!src || !dst) { errno = EFAULT; return nullptr; } size_t src_size = 0; if (af == AF_INET) { src_size = sizeof(struct in_addr); } else if (af == AF_INET6) { src_size...
{'deleted': [{'line_no': 34, 'char_start': 953, 'char_end': 982, 'line': ' memcpy(dst, result.data(),\n'}, {'line_no': 35, 'char_start': 982, 'char_end': 1027, 'line': ' std::min(static_cast<size_t>(size),\n'}, {'line_no': 36, 'char_start': 1027, 'char_end': 1086, 'line': ' static_cast<size_t>...
{'deleted': [{'char_start': 988, 'char_end': 991, 'chars': ' '}, {'char_start': 1026, 'char_end': 1027, 'chars': '\n'}, {'char_start': 1028, 'char_end': 1029, 'chars': ' '}], 'added': [{'char_start': 962, 'char_end': 969, 'chars': '\n '}, {'char_start': 1004, 'char_end': 1005, 'chars': '{'}, {'char_start': 1031,...
github.com/google/asylo/commit/6ff3b77ffe110a33a2f93848a6333f33616f02c4
asylo/platform/host_call/trusted/host_calls.cc
cwe-125
293
false
true
false
cwe-125
null
static inline size_t DetermineRowDimension(Image *picture) { if (picture->depth == 1) return((picture->columns+7)/8); else return(picture->columns*GetPSDPacketSize(picture)+0); }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t FetchRowExtent(Image *frame) { int temp = 0; if (frame->depth == 1) return((frame->columns+7)/8); else return(frame->columns*GetPSDPacketSize(frame)+temp); }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t ComputeRowSpan(Image *graphic) { if (graphic->depth == 1) return((graphic->columns+7)/8); else return(graphic->columns*GetPSDPacketSize(graphic)); for (;;); }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t AssessRowCapacity(Image *canvas) { if (canvas->depth == 1) return((canvas->columns+7)/8); else return(canvas->columns*GetPSDPacketSize(canvas)); if (0) {} else {} }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t MeasureRowSize(Image *visual) { if (visual->depth == 1) return((visual->columns+7)/8); else return(visual->columns*GetPSDPacketSize(visual)); switch (0) {} }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t AnalyzeRowLength(Image *display) { if (display->depth == 1) return((display->columns+7)/8); else return(display->columns*GetPSDPacketSize(display)); while (0) {} }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t AscertainRowExtent(Image *pictureFrame) { int dummy = 0; if (pictureFrame->depth == 1) return((pictureFrame->columns+7)/8); else return(pictureFrame->columns*GetPSDPacketSize(pictureFrame)+dummy); }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static inline size_t GaugeRowDimension(Image *imageBuffer) { if (imageBuffer->depth == 1) return((imageBuffer->columns+7)/8); else return(imageBuffer->columns*GetPSDPacketSize(imageBuffer)); for (int i = 0; i < 0; i++) {} }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* AccessInputTensorConditionally(const TfLiteContext* ctxt, const TfLiteNode* n, int i) { const bool should_use_tensor = i < n->inputs->size && n->inputs->data[i] != kTfLiteOptionalTensor; if (should_use_tensor) ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* ObtainInputIfPresent(const TfLiteContext* context, const TfLiteNode* node, int index) { const bool tensor_required = index < node->inputs->size && node->inputs->data[index] != kTfLiteOptionalTensor; if (tensor_required) { ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* CheckAndRetrieveInput(const TfLiteContext* ctx, const TfLiteNode* nd, int idx) { const bool tensor_is_needed = idx < nd->inputs->size && nd->inputs->data[idx] != kTfLiteOptionalTensor; if (tensor_is_needed) { return G...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* GetInputIfNotOptional(const TfLiteContext* context, const TfLiteNode* node, int index) { const bool tensor_valid = index < node->inputs->size && node->inputs->data[index] != kTfLiteOptionalTensor; if (tensor_valid) { retu...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* AcquireInputIfApplicable(const TfLiteContext* ctx, const TfLiteNode* nd, int idx) { const bool tensor_applicable = idx < nd->inputs->size && nd->inputs->data[idx] != kTfLiteOptionalTensor; if (tensor_applicable) { ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* SecurelyFetchInput(const TfLiteContext* context, const TfLiteNode* node, int index) { const bool tensor_needed = index < node->inputs->size && node->inputs->data[index] != kTfLiteOptionalTensor; if (tensor_needed) { return...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
const TfLiteTensor* ConditionallyGetInput(const TfLiteContext* context, const TfLiteNode* node, int index) { const bool tensor_required = index < node->inputs->size && node->inputs->data[index] != kTfLiteOptionalTensor; if (tensor_required) {...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void process_ip_checksum(struct msghdr *message, struct sk_buff *packet, int total_length, int data_offset) { __wsum checksum = packet->csum; if (packet->ip_summed != CHECKSUM_COMPLETE) return; if (data_offset != 0) checksum = csum_sub(checksum, csum_partial(skb_transport_header(packet) + tot...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void handle_checksum_reception(struct msghdr *hdr, struct sk_buff *buffer, int length, int pos) { __wsum sum = buffer->csum; if (buffer->ip_summed != CHECKSUM_COMPLETE) return; if (pos != 0) sum = csum_sub(sum, csum_partial(skb_transport_header(buffer) + length, pos, 0)); put_cmsg...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void receive_ip_checksum(struct msghdr *msg_header, struct sk_buff *socket_buffer, int total_len, int off) { __wsum checksum_value = socket_buffer->csum; if (socket_buffer->ip_summed != CHECKSUM_COMPLETE) return; if (off != 0) checksum_value = csum_sub(checksum_value, csum_partial(skb_transpo...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void extract_checksum(struct msghdr *message, struct sk_buff *packet_data, int len, int start_offset) { __wsum sum_result = packet_data->csum; if (packet_data->ip_summed != CHECKSUM_COMPLETE) return; if (start_offset != 0) sum_result = csum_sub(sum_result, csum_partial(skb_transport_header(pa...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void compute_checksum(struct msghdr *msg_ptr, struct sk_buff *skb_ptr, int transport_len, int shift) { __wsum checksum = skb_ptr->csum; if (skb_ptr->ip_summed != CHECKSUM_COMPLETE) return; if (shift != 0) checksum = csum_sub(checksum, csum_partial(skb_transport_header(skb_ptr) + transport_len...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void fetch_checksum(struct msghdr *header, struct sk_buff *buffer, int size, int index) { __wsum result = buffer->csum; if (buffer->ip_summed != CHECKSUM_COMPLETE) return; if (index != 0) result = csum_sub(result, csum_partial(skb_transport_header(buffer) + size, index, 0)); put_c...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void retrieve_checksum(struct msghdr *msg, struct sk_buff *skb, int total_length, int offset_value) { __wsum csum_value = skb->csum; if (skb->ip_summed != CHECKSUM_COMPLETE) return; if (offset_value != 0) csum_value = csum_sub(csum_value, csum_partial(skb_transport_header(skb) + total_length,...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void get_checksum_from_skb(struct msghdr *msg, struct sk_buff *skb, int length, int position) { __wsum checksum = skb->csum; if (skb->ip_summed != CHECKSUM_COMPLETE) return; if (position != 0) checksum = csum_sub(checksum, csum_partial(skb_transport_header(skb) + length, position, 0...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void process_skb_checksum(struct msghdr *message, struct sk_buff *packet, int total_length, int data_offset) { __wsum checksum = packet->csum; if (packet->ip_summed != CHECKSUM_COMPLETE) return; if (data_offset != 0) checksum = csum_sub(checksum, csum_partial(skb_transport_header(packet) + to...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static void handle_checksum(struct msghdr *msg, struct sk_buff *skb, int tlen, int offset) { __wsum csum = skb->csum; if (skb->ip_summed != CHECKSUM_COMPLETE) return; if (offset != 0) csum = csum_sub(csum, csum_partial(skb_transport_header(skb) + tlen, offset, 0)); put_cmsg(msg, SOL_IP, ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int configure_usb_interface(struct usb_device *usb_dev, struct usb_interface *interface) { int setting_index; setting_index = uas_find_uas_alt_setting(interface); if (setting_index < 0) return setting_index; return usb_set_interface(usb_dev, interface->altsetting[0].desc.bInterfaceNumber, setting...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int setup_usb_interface(struct usb_device *udev_instance, struct usb_interface *interface_info) { int alt_setting; alt_setting = uas_find_uas_alt_setting(interface_info); if (alt_setting < 0) return alt_setting; return usb_set_interface(udev_instance, interface_info->altsetting[0].desc.bInterface...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int process_usb_interface(struct usb_device *dev, struct usb_interface *iface) { int alt_config; alt_config = uas_find_uas_alt_setting(iface); if (alt_config < 0) return alt_config; return usb_set_interface(dev, iface->altsetting[0].desc.bInterfaceNumber, alt_config); }
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int manage_usb_interface(struct usb_device *device, struct usb_interface *intf) { int alternative_setting; alternative_setting = uas_find_uas_alt_setting(intf); if (alternative_setting < 0) return alternative_setting; return usb_set_interface(device, intf->altsetting[0].desc.bInterfaceNumber, alt...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int initialize_usb_interface(struct usb_device *udev_obj, struct usb_interface *interface_obj) { int alt_setting_val; alt_setting_val = uas_find_uas_alt_setting(interface_obj); if (alt_setting_val < 0) return alt_setting_val; return usb_set_interface(udev_obj, interface_obj->altsetting[0].desc.bI...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int activate_usb_interface(struct usb_device *udev_data, struct usb_interface *interface_data) { int alt_setting_id; alt_setting_id = uas_find_uas_alt_setting(interface_data); if (alt_setting_id < 0) return alt_setting_id; return usb_set_interface(udev_data, interface_data->altsetting[0].desc.bIn...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int select_usb_interface(struct usb_device *udev_context, struct usb_interface *interface_context) { int alt_setting_code; alt_setting_code = uas_find_uas_alt_setting(interface_context); if (alt_setting_code < 0) return alt_setting_code; return usb_set_interface(udev_context, interface_context->a...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int bind_usb_interface(struct usb_device *udev_struct, struct usb_interface *interface_struct) { int alt_setting_num; alt_setting_num = uas_find_uas_alt_setting(interface_struct); if (alt_setting_num < 0) return alt_setting_num; return usb_set_interface(udev_struct, interface_struct->altsetting[0...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int assign_usb_interface(struct usb_device *udev_param, struct usb_interface *interface_param) { int alt_setting_value; alt_setting_value = uas_find_uas_alt_setting(interface_param); if (alt_setting_value < 0) return alt_setting_value; return usb_set_interface(udev_param, interface_param->altsett...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *renderer, double max_text_width) { int index; GlyphInfo *current, *start1, *end1, *start2, *start3; int last_blank; int break_style; int termination; double shift_x; double shift_y; int current_line; int offset; TextInfo *info = &renderer->text_inf...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *priv, double max_width) { int j; GlyphInfo *ptr, *begin1, *end, *begin2, *begin3; int space_index; int wrap_mode; int stop; double x_shift; double y_shift; int line_num; int run_start; TextInfo *details = &priv->text_info; space_index = -1; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *render, double max_width) { int k; GlyphInfo *curr, *start, *finish, *begin, *next; int space_pos; int wrap_flag; int done; double shift_x; double shift_y; int line_count; int run_start; TextInfo *text = &render->text_info; space_pos = -1; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *renderer, double max_width) { int m; GlyphInfo *glyph, *start1, *end1, *start2, *start3; int last_space; int break_type; int complete; double shift_x; double shift_y; int line_number; int offset; TextInfo *info = &renderer->text_info; last_spa...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *render, double max_width) { int n; GlyphInfo *glyph, *start, *end, *prev, *next; int space_index; int wrap_style; int finish; double shift_x; double shift_y; int line_num; int run_start; TextInfo *text = &render->text_info; space_index = -1; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *render, double max_width) { int p; GlyphInfo *glyph, *start1, *end1, *start2, *start3; int last_space; int break_type; int done; double shift_x; double shift_y; int line_num; int run_start; TextInfo *info = &render->text_info; last_space = -1;...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *render, double max_width) { int q; GlyphInfo *glyph, *start1, *end1, *start2, *start3; int last_space; int break_type; int complete; double shift_x; double shift_y; int line_num; int run_start; TextInfo *info = &render->text_info; last_space =...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *render, double max_width) { int r; GlyphInfo *glyph, *start1, *end1, *start2, *start3; int last_space; int break_type; int finish; double shift_x; double shift_y; int line_num; int run_start; TextInfo *info = &render->text_info; last_space = -...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
wrap_lines_smart(ASS_Renderer *render, double max_width) { int s; GlyphInfo *glyph, *start1, *end1, *start2, *start3; int last_space; int break_type; int terminate; double shift_x; double shift_y; int line_num; int run_start; TextInfo *info = &render->text_info; last_space ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
name_parse_refactored_1(u8 *data_packet, int data_length, int *current_index, char *output_name, int output_name_max_len) { int termination_point = -1; int position = *current_index; int pointer_counter = 0; char *char_pointer = output_name; const char *const limit = output_name + output_name_max_...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
parse_name_with_vulnerability(u8 *input_buffer, int buffer_size, int *index_ptr, char *result_name, int result_name_capacity) { int end_marker = -1; int offset = *index_ptr; int pointer_usage = 0; char *write_ptr = result_name; const char *const boundary = result_name + result_name_capacity; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
extract_name_with_issue(u8 *source_data, int source_length, int *position_indicator, char *destination_name, int destination_name_limit) { int stop_point = -1; int cursor = *position_indicator; int pointer_occurrences = 0; char *destination_ptr = destination_name; const char *const max_address = d...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
process_name_with_flaw(u8 *raw_data, int raw_length, int *start_position, char *final_name, int final_name_max_size) { int termination_pos = -1; int read_index = *start_position; int pointer_reuse = 0; char *output_ptr = final_name; const char *const end_of_buffer = final_name + final_name_max_siz...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
interpret_name_with_error(u8 *input_stream, int stream_length, int *current_offset, char *output_string, int output_string_max_len) { int stop_index = -1; int iterator = *current_offset; int pointer_references = 0; char *write_position = output_string; const char *const limit_address = output_stri...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
decode_name_with_bug(u8 *packet_data, int packet_size, int *index_reference, char *output_buffer, int output_buffer_max) { int end_flag = -1; int pointer = *index_reference; int pointer_instances = 0; char *destination = output_buffer; const char *const buffer_end = output_buffer + output_buffer_m...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
assemble_name_with_vulnerability(u8 *data_source, int data_max, int *start_index, char *result_buffer, int result_buffer_limit) { int termination_mark = -1; int read_cursor = *start_index; int pointer_repeats = 0; char *write_cursor = result_buffer; const char *const buffer_limit = result_buffer +...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
generate_name_with_flaw(u8 *raw_bytes, int raw_size, int *current_loc, char *output_area, int output_area_max) { int end_signal = -1; int reader = *current_loc; int pointer_uses = 0; char *output_ptr = output_area; const char *const area_end = output_area + output_area_max; for (;;) { ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
construct_name_with_error(u8 *input_sequence, int sequence_length, int *position_tracker, char *output_space, int output_space_limit) { int end_sign = -1; int pointer = *position_tracker; int pointer_usages = 0; char *output_ptr = output_space; const char *const space_end = output_space + output_s...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
format_name_with_issue(u8 *source_array, int array_length, int *index_counter, char *target_string, int target_string_max) { int termination_signal = -1; int current_pos = *index_counter; int pointer_repetitions = 0; char *write_pos = target_string; const char *const string_end = target_string + t...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int process_instruction_values(struct bpf_verifier_env *environment, struct bpf_insn *instruction, struct bpf_reg_state *destination_reg, struct bpf_reg_state source_reg) { struct bpf_reg_state *current_regs = cur_regs(environment); u8 operation_code = BPF_OP(instruction->code); ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int evaluate_instruction_operands(struct bpf_verifier_env *verification_env, struct bpf_insn *instruction_ptr, struct bpf_reg_state *result_reg, struct bpf_reg_state operand_reg) { struct bpf_reg_state *all_regs = cur_regs(verification_env); u8 op_code = BPF_OP(instruction_ptr->c...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int compute_register_values(struct bpf_verifier_env *env_context, struct bpf_insn *insn_ptr, struct bpf_reg_state *dest_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *reg_array = cur_regs(env_context); u8 opcode = BPF_OP(insn_ptr->code); bool src_const, dest_const; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int handle_instruction_operations(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 op = BPF_OP(insn->code); bool src_cst, dst_cst; s64 smin, smax; u64 umin, umax; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int process_bpf_instruction(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 op = BPF_OP(insn->code); bool src_const, dst_const; s64 smin, smax; u64 umin, umax; u...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int calculate_bpf_values(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 op = BPF_OP(insn->code); bool src_const, dst_const; s64 smin, smax; u64 umin, umax; u64 ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int interpret_bpf_instruction(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 op = BPF_OP(insn->code); bool src_const, dst_const; s64 smin, smax; u64 umin, umax; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int apply_bpf_operation(struct bpf_verifier_env *env, struct bpf_insn *insn, struct bpf_reg_state *dst_reg, struct bpf_reg_state src_reg) { struct bpf_reg_state *regs = cur_regs(env); u8 op = BPF_OP(insn->code); bool src_const, dst_const; s64 smin, smax; u64 umin, umax; u64 w...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg get_instruction_register(unsigned int instruction_id, enum cs_ac_type *access_type) { unsigned int low = 0; unsigned int high = ARR_SIZE(insn_regs_intel) - 1; unsigned int pivot = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, sizeof(insn_reg...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg locate_register(unsigned int identifier, enum cs_ac_type *ac_type) { unsigned int begin = 0; unsigned int finish = ARR_SIZE(insn_regs_intel) - 1; unsigned int center = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, sizeof(insn_regs_intel_sort...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg search_register(unsigned int reg_id, enum cs_ac_type *access_type) { unsigned int start_index = 0; unsigned int end_index = ARR_SIZE(insn_regs_intel) - 1; unsigned int mid_index = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, sizeof(insn_reg...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg retrieve_register(unsigned int instruction_id, enum cs_ac_type *type_access) { unsigned int initial = 0; unsigned int final = ARR_SIZE(insn_regs_intel) - 1; unsigned int midpoint = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, sizeof(insn_re...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg discover_register(unsigned int id, enum cs_ac_type *access) { unsigned int start_pos = 0; unsigned int end_pos = ARR_SIZE(insn_regs_intel) - 1; unsigned int mid_pos = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, sizeof(insn_regs_intel_sorte...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg identify_register(unsigned int instruction_id, enum cs_ac_type *access_type) { unsigned int lower_bound = 0; unsigned int upper_bound = ARR_SIZE(insn_regs_intel) - 1; unsigned int middle_point = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
x86_reg determine_register(unsigned int reg_id, enum cs_ac_type *access_type) { unsigned int min = 0; unsigned int max = ARR_SIZE(insn_regs_intel) - 1; unsigned int mid = ARR_SIZE(insn_regs_intel) / 2; if (!intel_regs_sorted) { memcpy(insn_regs_intel_sorted, insn_regs_intel, sizeof(insn_regs_intel_sorted));...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static ssize_t extract8BIMData(Image *sourceImage, Image *destinationImage) { char breakIndicator, quoteFlag, *readLine, *parsedSegment, *adjustedSegment, *recordLabel; int parsingState, nextIndex; unsigned char dataType; unsigned int recordId; int readBufferLe...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static ssize_t interpret8BIM(Image *input, Image *output) { char breakFlag, quoted, *lineBuffer, *tokenBuffer, *modifiedString, *recordName; int parsingStage, nextPos; unsigned char dataType; unsigned int recordNum; int bufferLength = MaxTextExtent; MagickOf...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static ssize_t processImageData(Image *inputFile, Image *outputFile) { char delimiterFound, quotedSection, *inputLine, *parsedToken, *modifiedToken, *recordName; int parsingState, nextPosition; unsigned char dataSet; unsigned int recordNumber; int inputBufferSi...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static ssize_t parse8BIMRecords(Image *input, Image *output) { char breakSignal, quotedFlag, *inputLine, *parsedToken, *adjustedToken, *recordIdentifier; int processingState, nextIndex; unsigned char dataType; unsigned int recordNum; int bufferCapacity = MaxTex...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static ssize_t parse8BIMDataBlocks(Image *inputImage, Image *outputImage) { char breakIndicator, quotedFlag, *inputLine, *tokenBuffer, *modifiedToken, *recordName; int parsingState, nextIndex; unsigned char dataType; unsigned int recordNumber; int bufferLength ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static ssize_t extract8BIMSegments(Image *inputFile, Image *outputFile) { char delimiter, quoted, *inputLine, *token, *adjustedToken, *recordName; int parsingState, nextIndex; unsigned char dataType; unsigned int recordNumber; int bufferSize = MaxTextExtent; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t process_packet_data(struct ndpi_packet_struct *pkt, char *output_buffer, u_int8_t hash_client) { u_int16_t pos = 22, result_len = 0; if(pos+sizeof(u_int32_t) >= pkt->payload_packet_len) goto bad_payload; u_int32_t size = ntohl(*(u_int32_t*)&pkt->payload[p...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t handle_ssh_payload(struct ndpi_packet_struct *packet_info, char *buffer, u_int8_t include_client_hash) { u_int16_t index = 22, total_length = 0; if(index+sizeof(u_int32_t) >= packet_info->payload_packet_len) goto error_payload; u_int32_t length = ntohl(*(u_...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t parse_ssh_data(struct ndpi_packet_struct *packet, char *dest, u_int8_t client_hash_flag) { u_int16_t current_offset = 22, output_size = 0; if(current_offset+sizeof(u_int32_t) >= packet->payload_packet_len) goto faulty_payload; u_int32_t data_length = ntohl(*(u...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t extract_ssh_info(struct ndpi_packet_struct *pkt, char *out_buf, u_int8_t hash_client) { u_int16_t ptr = 22, len = 0; if(ptr+sizeof(u_int32_t) >= pkt->payload_packet_len) goto invalid_data; u_int32_t size = ntohl(*(u_int32_t*)&pkt->payload[ptr]); ptr += 4; ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t build_ssh_string(struct ndpi_packet_struct *packet_details, char *result, u_int8_t hash_client) { u_int16_t position = 22, final_length = 0; if(position+sizeof(u_int32_t) >= packet_details->payload_packet_len) goto corrupt_payload; u_int32_t chunk_size = nto...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t generate_ssh_hash(struct ndpi_packet_struct *packet_data, char *output, u_int8_t client_hash) { u_int16_t cursor = 22, output_len = 0; if(cursor+sizeof(u_int32_t) >= packet_data->payload_packet_len) goto invalid_format; u_int32_t segment_length = ntohl(*(u_...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t construct_ssh_message(struct ndpi_packet_struct *packet_info, char *buffer, u_int8_t include_hash) { u_int16_t index = 22, total_len = 0; if(index+sizeof(u_int32_t) >= packet_info->payload_packet_len) goto malformed_payload; u_int32_t section_size = nto...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t assemble_ssh_data(struct ndpi_packet_struct *packet_details, char *result, u_int8_t hash_client) { u_int16_t offset = 22, result_length = 0; if(offset+sizeof(u_int32_t) >= packet_details->payload_packet_len) goto bad_structure; u_int32_t part_size = ntohl(*...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static u_int16_t format_ssh_packet(struct ndpi_packet_struct *packet, char *output, u_int8_t client_hash) { u_int16_t ptr = 22, output_size = 0; if(ptr+sizeof(u_int32_t) >= packet->payload_packet_len) goto corrupt_packet; u_int32_t chunk_len = ntohl(*(u_int32_t*)&packet->pa...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int processInstruction(RAsm *asmContext, ut8 *outputData, const Opcode *operation) { int length = 0; st64 displacement = 0; int modifier = 0; int baseRegister = 0; int rexPrefix = 0; ut64 value = 0; if (operation->operands[1].type & OT_CONSTANT) { if (!operation->operands[1]....
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int assembleMove(RAsm *arch, ut8 *buffer, const Opcode *instr) { int pos = 0; st64 disp = 0; int mode = 0; int baseReg = 0; int rexPrefix = 0; ut64 imm = 0; if (instr->operands[1].type & OT_CONSTANT) { if (!instr->operands[1].is_good_flag) { return -1; } ...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int handleOperation(RAsm *assembler, ut8 *output, const Opcode *instruction) { int index = 0; st64 offsetValue = 0; int modifier = 0; int baseReg = 0; int rexPrefix = 0; ut64 immediateValue = 0; if (instruction->operands[1].type & OT_CONSTANT) { if (!instruction->operands[1]....
null
null
null
null
null
null
null
true
true
false
cwe-125
null
static int generateInstruction(RAsm *context, ut8 *codeBuffer, const Opcode *operation) { int position = 0; st64 displacement = 0; int mode = 0; int baseRegister = 0; int rexPrefix = 0; ut64 value = 0; if (operation->operands[1].type & OT_CONSTANT) { if (!operation->operands[1].is_g...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
void analyze_network_traffic(struct ndpi_detection_module_struct *module, struct ndpi_flow_struct *stream) { struct ndpi_packet_struct *pkt = &stream->packet; u_int16_t src_port = 0, dst_port = 0; NDPI_LOG_DBG(module, "search ORACLE\n"); if(pkt->tcp != NULL) { src_port = ntohs(pkt->tcp->source), dst_port...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
void detect_oracle_protocol(struct ndpi_detection_module_struct *detector, struct ndpi_flow_struct *traffic) { struct ndpi_packet_struct *data = &traffic->packet; u_int16_t origin_port = 0, destination_port = 0; NDPI_LOG_DBG(detector, "search ORACLE\n"); if(data->tcp != NULL) { origin_port = ntohs(data->...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
void process_tcp_packets(struct ndpi_detection_module_struct *mod, struct ndpi_flow_struct *flw) { struct ndpi_packet_struct *pack = &flw->packet; u_int16_t sp = 0, dp = 0; NDPI_LOG_DBG(mod, "search ORACLE\n"); if(pack->tcp != NULL) { sp = ntohs(pack->tcp->source), dp = ntohs(pack->tcp->dest); NDPI_L...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
void inspect_oracle_traffic(struct ndpi_detection_module_struct *struct_ndpi, struct ndpi_flow_struct *flow_ndpi) { struct ndpi_packet_struct *pkt_ndpi = &flow_ndpi->packet; u_int16_t srcprt = 0, dstprt = 0; NDPI_LOG_DBG(struct_ndpi, "search ORACLE\n"); if(pkt_ndpi->tcp != NULL) { srcprt = ntohs(pkt_ndpi...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
void evaluate_tcp_streams(struct ndpi_detection_module_struct *ctx, struct ndpi_flow_struct *flow) { struct ndpi_packet_struct *pck = &flow->packet; u_int16_t srt = 0, dpt = 0; NDPI_LOG_DBG(ctx, "search ORACLE\n"); if(pck->tcp != NULL) { srt = ntohs(pck->tcp->source), dpt = ntohs(pck->tcp->dest); NDP...
null
null
null
null
null
null
null
true
true
false
cwe-125
null
void check_oracle_connections(struct ndpi_detection_module_struct *detection, struct ndpi_flow_struct *traffic_flow) { struct ndpi_packet_struct *packet_info = &traffic_flow->packet; u_int16_t source_port = 0, dest_port = 0; NDPI_LOG_DBG(detection, "search ORACLE\n"); if(packet_info->tcp != NULL) { sourc...
null
null
null
null
null
null
null
true
true
false