idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
500
static bool decode_dirsync_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB cookie; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_dirsync_control *ldc; if (!data) return false; if (!asn1_load(data, in)) { return false; } ldc = talloc(mem_ctx, struct ldb_dir...
DoS
0
static bool decode_dirsync_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB cookie; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_dirsync_control *ldc; if (!data) return false; if (!asn1_load(data, in)) { return false; } ldc = talloc(mem_ctx, struct ldb_dir...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
501
static bool decode_extended_dn_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data; struct ldb_extended_dn_control *ledc; /* The content of this control is optional */ if (in.length == 0) { *out = NULL; return true; } data = asn1_init(mem_ctx); if (!data) ...
DoS
0
static bool decode_extended_dn_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data; struct ldb_extended_dn_control *ledc; /* The content of this control is optional */ if (in.length == 0) { *out = NULL; return true; } data = asn1_init(mem_ctx); if (!data) ...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
502
static bool decode_flag_request(void *mem_ctx, DATA_BLOB in, void *_out) { if (in.length != 0) { return false; } return true; }
DoS
0
static bool decode_flag_request(void *mem_ctx, DATA_BLOB in, void *_out) { if (in.length != 0) { return false; } return true; }
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
503
static bool decode_sd_flags_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_sd_flags_control *lsdfc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lsdfc = talloc(mem_ctx, struct ldb_sd_flags_control...
DoS
0
static bool decode_sd_flags_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_sd_flags_control *lsdfc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lsdfc = talloc(mem_ctx, struct ldb_sd_flags_control...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
504
static bool decode_search_options_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_search_options_control *lsoc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lsoc = talloc(mem_ctx, struct ldb_search...
DoS
0
static bool decode_search_options_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_search_options_control *lsoc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lsoc = talloc(mem_ctx, struct ldb_search...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
505
static bool decode_server_sort_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB attr; DATA_BLOB rule; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_server_sort_control **lssc; int num; if (!data) return false; if (!asn1_load(data, in)) { return false; } i...
DoS
0
static bool decode_server_sort_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB attr; DATA_BLOB rule; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_server_sort_control **lssc; int num; if (!data) return false; if (!asn1_load(data, in)) { return false; } i...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
506
static bool decode_server_sort_response(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB attr; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_sort_resp_control *lsrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lsrc = talloc(mem_ctx, struct ...
DoS
0
static bool decode_server_sort_response(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB attr; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_sort_resp_control *lsrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lsrc = talloc(mem_ctx, struct ...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
507
static bool decode_vlv_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB assertion_value, context_id; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_vlv_req_control *lvrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lvrc = talloc(mem_...
DoS
0
static bool decode_vlv_request(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB assertion_value, context_id; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_vlv_req_control *lvrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lvrc = talloc(mem_...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
508
static bool decode_vlv_response(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB context_id; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_vlv_resp_control *lvrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lvrc = talloc(mem_ctx, struct ldb...
DoS
0
static bool decode_vlv_response(void *mem_ctx, DATA_BLOB in, void *_out) { void **out = (void **)_out; DATA_BLOB context_id; struct asn1_data *data = asn1_init(mem_ctx); struct ldb_vlv_resp_control *lvrc; if (!data) return false; if (!asn1_load(data, in)) { return false; } lvrc = talloc(mem_ctx, struct ldb...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
509
static bool encode_asq_control(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_asq_control *lac = talloc_get_type(in, struct ldb_asq_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (lac->request) { if (!...
DoS
0
static bool encode_asq_control(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_asq_control *lac = talloc_get_type(in, struct ldb_asq_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (lac->request) { if (!...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
510
static bool encode_extended_dn_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_extended_dn_control *ledc = talloc_get_type(in, struct ldb_extended_dn_control); struct asn1_data *data; if (!in) { *out = data_blob(NULL, 0); return true; } data = asn1_init(mem_ctx); if (!data) return false; if...
DoS
0
static bool encode_extended_dn_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_extended_dn_control *ledc = talloc_get_type(in, struct ldb_extended_dn_control); struct asn1_data *data; if (!in) { *out = data_blob(NULL, 0); return true; } data = asn1_init(mem_ctx); if (!data) return false; if...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
511
static bool encode_flag_request(void *mem_ctx, void *in, DATA_BLOB *out) { if (in) { return false; } *out = data_blob(NULL, 0); return true; }
DoS
0
static bool encode_flag_request(void *mem_ctx, void *in, DATA_BLOB *out) { if (in) { return false; } *out = data_blob(NULL, 0); return true; }
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
512
static bool encode_paged_results_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_paged_control *lprc = talloc_get_type(in, struct ldb_paged_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_wri...
DoS
0
static bool encode_paged_results_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_paged_control *lprc = talloc_get_type(in, struct ldb_paged_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_wri...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
513
static bool encode_sd_flags_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_sd_flags_control *lsdfc = talloc_get_type(in, struct ldb_sd_flags_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_w...
DoS
0
static bool encode_sd_flags_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_sd_flags_control *lsdfc = talloc_get_type(in, struct ldb_sd_flags_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_w...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
514
static bool encode_search_options_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_search_options_control *lsoc = talloc_get_type(in, struct ldb_search_options_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false;...
DoS
0
static bool encode_search_options_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_search_options_control *lsoc = talloc_get_type(in, struct ldb_search_options_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false;...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
515
static bool encode_server_sort_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_server_sort_control **lssc = talloc_get_type(in, struct ldb_server_sort_control *); struct asn1_data *data = asn1_init(mem_ctx); int num; if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return fa...
DoS
0
static bool encode_server_sort_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_server_sort_control **lssc = talloc_get_type(in, struct ldb_server_sort_control *); struct asn1_data *data = asn1_init(mem_ctx); int num; if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return fa...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
516
static bool encode_verify_name_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_verify_name_control *lvnc = talloc_get_type(in, struct ldb_verify_name_control); struct asn1_data *data = asn1_init(mem_ctx); DATA_BLOB gc_utf16; if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { r...
DoS
0
static bool encode_verify_name_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_verify_name_control *lvnc = talloc_get_type(in, struct ldb_verify_name_control); struct asn1_data *data = asn1_init(mem_ctx); DATA_BLOB gc_utf16; if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { r...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
517
static bool encode_vlv_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_vlv_req_control *lvrc = talloc_get_type(in, struct ldb_vlv_req_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_write_Int...
DoS
0
static bool encode_vlv_request(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_vlv_req_control *lvrc = talloc_get_type(in, struct ldb_vlv_req_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_write_Int...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
518
static bool encode_vlv_response(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_vlv_resp_control *lvrc = talloc_get_type(in, struct ldb_vlv_resp_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_write_...
DoS
0
static bool encode_vlv_response(void *mem_ctx, void *in, DATA_BLOB *out) { struct ldb_vlv_resp_control *lvrc = talloc_get_type(in, struct ldb_vlv_resp_control); struct asn1_data *data = asn1_init(mem_ctx); if (!data) return false; if (!asn1_push_tag(data, ASN1_SEQUENCE(0))) { return false; } if (!asn1_write_...
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
519
const struct ldap_control_handler *samba_ldap_control_handlers(void) { return ldap_known_controls; }
DoS
0
const struct ldap_control_handler *samba_ldap_control_handlers(void) { return ldap_known_controls; }
@@ -1187,10 +1187,10 @@ static bool decode_openldap_dereference(void *mem_ctx, DATA_BLOB in, void *_out) if (!asn1_start_tag(data, ASN1_CONTEXT(0))) { return false; } - - ldap_decode_attribs_bare...
CWE-399
null
null
520
check_data_region (struct tar_sparse_file *file, size_t i) { off_t size_left; if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) return false; rdsize); return false; }
DoS
0
check_data_region (struct tar_sparse_file *file, size_t i) { off_t size_left; if (!lseek_or_error (file, file->stat_info->sparse_map[i].offset)) return false; rdsize); return false; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
521
lseek_or_error (struct tar_sparse_file *file, off_t offset) { if (file->seekable ? lseek (file->fd, offset, SEEK_SET) < 0 : ! dump_zeros (file, offset)) { seek_diag_details (file->stat_info->orig_file_name, offset); return false; } return true; }
DoS
0
lseek_or_error (struct tar_sparse_file *file, off_t offset) { if (file->seekable ? lseek (file->fd, offset, SEEK_SET) < 0 : ! dump_zeros (file, offset)) { seek_diag_details (file->stat_info->orig_file_name, offset); return false; } return true; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
522
sparse_extract_file (int fd, struct tar_stat_info *st, off_t *size) { bool rc = true; struct tar_sparse_file file; size_t i; if (!tar_sparse_init (&file)) return dump_status_not_implemented; file.stat_info = st; file.fd = fd; file.seekable = lseek (fd, 0, SEEK_SET) == 0; file.offset = 0; rc = t...
DoS
0
sparse_extract_file (int fd, struct tar_stat_info *st, off_t *size) { bool rc = true; struct tar_sparse_file file; size_t i; if (!tar_sparse_init (&file)) return dump_status_not_implemented; file.stat_info = st; file.fd = fd; file.seekable = lseek (fd, 0, SEEK_SET) == 0; file.offset = 0; rc = t...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
523
sparse_member_p (struct tar_stat_info *st) { struct tar_sparse_file file; if (!tar_sparse_init (&file)) return false; file.stat_info = st; return tar_sparse_member_p (&file); }
DoS
0
sparse_member_p (struct tar_stat_info *st) { struct tar_sparse_file file; if (!tar_sparse_init (&file)) return false; file.stat_info = st; return tar_sparse_member_p (&file); }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
524
sparse_scan_file (struct tar_sparse_file *file) { /* always check for completely sparse files */ if (sparse_scan_file_wholesparse (file)) return true; switch (hole_detection) { case HOLE_DETECTION_DEFAULT: case HOLE_DETECTION_SEEK: #ifdef SEEK_HOLE if (sparse_scan_file_seek (file)) ...
DoS
0
sparse_scan_file (struct tar_sparse_file *file) { /* always check for completely sparse files */ if (sparse_scan_file_wholesparse (file)) return true; switch (hole_detection) { case HOLE_DETECTION_DEFAULT: case HOLE_DETECTION_SEEK: #ifdef SEEK_HOLE if (sparse_scan_file_seek (file)) ...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
525
sparse_scan_file_raw (struct tar_sparse_file *file) { struct tar_stat_info *st = file->stat_info; int fd = file->fd; char buffer[BLOCKSIZE]; size_t count = 0; off_t offset = 0; struct sp_array sp = {0, 0}; st->archive_file_size = 0; if (!tar_sparse_scan (file, scan_begin, NULL)) return false; w...
DoS
0
sparse_scan_file_raw (struct tar_sparse_file *file) { struct tar_stat_info *st = file->stat_info; int fd = file->fd; char buffer[BLOCKSIZE]; size_t count = 0; off_t offset = 0; struct sp_array sp = {0, 0}; st->archive_file_size = 0; if (!tar_sparse_scan (file, scan_begin, NULL)) return false; w...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
526
sparse_scan_file_seek (struct tar_sparse_file *file) { struct tar_stat_info *st = file->stat_info; int fd = file->fd; struct sp_array sp = {0, 0}; off_t offset = 0; off_t data_offset; off_t hole_offset; st->archive_file_size = 0; for (;;) { /* locate first chunk of data */ data_offset ...
DoS
0
sparse_scan_file_seek (struct tar_sparse_file *file) { struct tar_stat_info *st = file->stat_info; int fd = file->fd; struct sp_array sp = {0, 0}; off_t offset = 0; off_t data_offset; off_t hole_offset; st->archive_file_size = 0; for (;;) { /* locate first chunk of data */ data_offset ...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
527
sparse_scan_file_wholesparse (struct tar_sparse_file *file) { struct tar_stat_info *st = file->stat_info; struct sp_array sp = {0, 0}; /* Note that this function is called only for truly sparse files of size >= 1 block size (checked via ST_IS_SPARSE before). See the thread http://www.mail-archive.com/...
DoS
0
sparse_scan_file_wholesparse (struct tar_sparse_file *file) { struct tar_stat_info *st = file->stat_info; struct sp_array sp = {0, 0}; /* Note that this function is called only for truly sparse files of size >= 1 block size (checked via ST_IS_SPARSE before). See the thread http://www.mail-archive.com/...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
528
sparse_select_optab (struct tar_sparse_file *file) { switch (current_format == DEFAULT_FORMAT ? archive_format : current_format) { case V7_FORMAT: case USTAR_FORMAT: return false; case OLDGNU_FORMAT: case GNU_FORMAT: /*FIXME: This one should disappear? */ file->optab = &oldgnu_optab; ...
DoS
0
sparse_select_optab (struct tar_sparse_file *file) { switch (current_format == DEFAULT_FORMAT ? archive_format : current_format) { case V7_FORMAT: case USTAR_FORMAT: return false; case OLDGNU_FORMAT: case GNU_FORMAT: /*FIXME: This one should disappear? */ file->optab = &oldgnu_optab; ...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
529
sparse_skip_file (struct tar_stat_info *st) { bool rc = true; struct tar_sparse_file file; if (!tar_sparse_init (&file)) return dump_status_not_implemented; file.stat_info = st; file.fd = -1; rc = tar_sparse_decode_header (&file); skip_file (file.stat_info->archive_file_size - file.dumped_size); ...
DoS
0
sparse_skip_file (struct tar_stat_info *st) { bool rc = true; struct tar_sparse_file file; if (!tar_sparse_init (&file)) return dump_status_not_implemented; file.stat_info = st; file.fd = -1; rc = tar_sparse_decode_header (&file); skip_file (file.stat_info->archive_file_size - file.dumped_size); ...
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
530
tar_sparse_done (struct tar_sparse_file *file) { if (file->optab->done) return file->optab->done (file); return true; }
DoS
0
tar_sparse_done (struct tar_sparse_file *file) { if (file->optab->done) return file->optab->done (file); return true; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
531
tar_sparse_dump_header (struct tar_sparse_file *file) { if (file->optab->dump_header) return file->optab->dump_header (file); return false; }
DoS
0
tar_sparse_dump_header (struct tar_sparse_file *file) { if (file->optab->dump_header) return file->optab->dump_header (file); return false; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
532
tar_sparse_dump_region (struct tar_sparse_file *file, size_t i) { if (file->optab->dump_region) return file->optab->dump_region (file, i); return false; }
DoS
0
tar_sparse_dump_region (struct tar_sparse_file *file, size_t i) { if (file->optab->dump_region) return file->optab->dump_region (file, i); return false; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
533
tar_sparse_extract_region (struct tar_sparse_file *file, size_t i) { if (file->optab->extract_region) return file->optab->extract_region (file, i); return false; }
DoS
0
tar_sparse_extract_region (struct tar_sparse_file *file, size_t i) { if (file->optab->extract_region) return file->optab->extract_region (file, i); return false; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
534
tar_sparse_fixup_header (struct tar_sparse_file *file) { if (file->optab->fixup_header) return file->optab->fixup_header (file); return true; }
DoS
0
tar_sparse_fixup_header (struct tar_sparse_file *file) { if (file->optab->fixup_header) return file->optab->fixup_header (file); return true; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
535
tar_sparse_init (struct tar_sparse_file *file) { memset (file, 0, sizeof *file); if (!sparse_select_optab (file)) return false; if (file->optab->init) return file->optab->init (file); return true; }
DoS
0
tar_sparse_init (struct tar_sparse_file *file) { memset (file, 0, sizeof *file); if (!sparse_select_optab (file)) return false; if (file->optab->init) return file->optab->init (file); return true; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
536
tar_sparse_member_p (struct tar_sparse_file *file) { if (file->optab->sparse_member_p) return file->optab->sparse_member_p (file); return false; }
DoS
0
tar_sparse_member_p (struct tar_sparse_file *file) { if (file->optab->sparse_member_p) return file->optab->sparse_member_p (file); return false; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
537
tar_sparse_scan (struct tar_sparse_file *file, enum sparse_scan_state state, void *block) { if (file->optab->scan_block) return file->optab->scan_block (file, state, block); return true; }
DoS
0
tar_sparse_scan (struct tar_sparse_file *file, enum sparse_scan_state state, void *block) { if (file->optab->scan_block) return file->optab->scan_block (file, state, block); return true; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
538
zero_block_p (char const *buffer, size_t size) { while (size--) if (*buffer++) return false; return true; }
DoS
0
zero_block_p (char const *buffer, size_t size) { while (size--) if (*buffer++) return false; return true; }
@@ -1,6 +1,6 @@ /* Functions for dealing with sparse files - Copyright 2003-2007, 2010, 2013-2017 Free Software Foundation, Inc. + Copyright 2003-2007, 2010, 2013-2018 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Gener...
CWE-835
null
null
539
static void discard_receive_data(int f_in, OFF_T length) { receive_data(f_in, NULL, -1, 0, NULL, -1, length); }
Bypass
0
static void discard_receive_data(int f_in, OFF_T length) { receive_data(f_in, NULL, -1, 0, NULL, -1, length); }
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
540
static int gen_wants_ndx(int desired_ndx, int flist_num) { static int next_ndx = -1; static int done_cnt = 0; static BOOL got_eof = False; if (got_eof) return 0; /* TODO: integrate gen-reading I/O into perform_io() so this is not needed? */ io_flush(FULL_FLUSH); while (next_ndx < desired_ndx) { if (inc_re...
Bypass
0
static int gen_wants_ndx(int desired_ndx, int flist_num) { static int next_ndx = -1; static int done_cnt = 0; static BOOL got_eof = False; if (got_eof) return 0; /* TODO: integrate gen-reading I/O into perform_io() so this is not needed? */ io_flush(FULL_FLUSH); while (next_ndx < desired_ndx) { if (inc_re...
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
541
int get_tmpname(char *fnametmp, const char *fname, BOOL make_unique) { int maxname, length = 0; const char *f; char *suf; if (tmpdir) { /* Note: this can't overflow, so the return value is safe */ length = strlcpy(fnametmp, tmpdir, MAXPATHLEN - 2); fnametmp[length++] = '/'; } if ((f = strrchr(fname, '/'))...
Bypass
0
int get_tmpname(char *fnametmp, const char *fname, BOOL make_unique) { int maxname, length = 0; const char *f; char *suf; if (tmpdir) { /* Note: this can't overflow, so the return value is safe */ length = strlcpy(fnametmp, tmpdir, MAXPATHLEN - 2); fnametmp[length++] = '/'; } if ((f = strrchr(fname, '/'))...
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
542
static void handle_delayed_updates(char *local_name) { char *fname, *partialptr; int ndx; for (ndx = -1; (ndx = bitbag_next_bit(delayed_bits, ndx)) >= 0; ) { struct file_struct *file = cur_flist->files[ndx]; fname = local_name ? local_name : f_name(file, NULL); if ((partialptr = partial_dir_fname(fname)) != N...
Bypass
0
static void handle_delayed_updates(char *local_name) { char *fname, *partialptr; int ndx; for (ndx = -1; (ndx = bitbag_next_bit(delayed_bits, ndx)) >= 0; ) { struct file_struct *file = cur_flist->files[ndx]; fname = local_name ? local_name : f_name(file, NULL); if ((partialptr = partial_dir_fname(fname)) != N...
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
543
static void no_batched_update(int ndx, BOOL is_redo) { struct file_list *flist = flist_for_ndx(ndx, "no_batched_update"); struct file_struct *file = flist->files[ndx - flist->ndx_start]; rprintf(FERROR_XFER, "(No batched update for%s \"%s\")\n", is_redo ? " resend of" : "", f_name(file, NULL)); if (inc_recurse ...
Bypass
0
static void no_batched_update(int ndx, BOOL is_redo) { struct file_list *flist = flist_for_ndx(ndx, "no_batched_update"); struct file_struct *file = flist->files[ndx - flist->ndx_start]; rprintf(FERROR_XFER, "(No batched update for%s \"%s\")\n", is_redo ? " resend of" : "", f_name(file, NULL)); if (inc_recurse ...
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
544
int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file) { int fd; mode_t added_perms; if (!get_tmpname(fnametmp, fname, False)) return -1; if (am_root < 0) { /* For --fake-super, the file must be useable by the copying * user, just like it would be for root. */ added_perms = S_IRUSR...
Bypass
0
int open_tmpfile(char *fnametmp, const char *fname, struct file_struct *file) { int fd; mode_t added_perms; if (!get_tmpname(fnametmp, fname, False)) return -1; if (am_root < 0) { /* For --fake-super, the file must be useable by the copying * user, just like it would be for root. */ added_perms = S_IRUSR...
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
545
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, const char *fname, int fd, OFF_T total_size) { static char file_sum1[MAX_DIGEST_LEN]; struct map_struct *mapbuf; struct sum_struct sum; int sum_len; int32 len; OFF_T offset = 0; OFF_T offset2; char *data; int32 i; char *map = NULL; #...
Bypass
0
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r, const char *fname, int fd, OFF_T total_size) { static char file_sum1[MAX_DIGEST_LEN]; struct map_struct *mapbuf; struct sum_struct sum; int sum_len; int32 len; OFF_T offset = 0; OFF_T offset2; char *data; int32 i; char *map = NULL; #...
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
546
static int we_want_redo(int desired_ndx) { static int redo_ndx = -1; while (redo_ndx < desired_ndx) { if (redo_ndx >= 0) no_batched_update(redo_ndx, True); if ((redo_ndx = flist_ndx_pop(&batch_redo_list)) < 0) return 0; } if (redo_ndx == desired_ndx) { redo_ndx = -1; return 1; } return 0; }
Bypass
0
static int we_want_redo(int desired_ndx) { static int redo_ndx = -1; while (redo_ndx < desired_ndx) { if (redo_ndx >= 0) no_batched_update(redo_ndx, True); if ((redo_ndx = flist_ndx_pop(&batch_redo_list)) < 0) return 0; } if (redo_ndx == desired_ndx) { redo_ndx = -1; return 1; } return 0; }
@@ -722,7 +722,7 @@ int recv_files(int f_in, int f_out, char *local_name) break; } if (!fnamecmp || (daemon_filter_list.head - && check_filter(&daemon_filter_list, FLOG, fname, 0) < 0)) { + &&...
null
null
null
547
static const char *default_charset(void) { # if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET return locale_charset(); # elif defined HAVE_LANGINFO_H && defined HAVE_NL_LANGINFO return nl_langinfo(CODESET); # else return ""; /* Works with (at the very least) gnu iconv... */ # endif }
Bypass
0
static const char *default_charset(void) { # if defined HAVE_LIBCHARSET_H && defined HAVE_LOCALE_CHARSET return locale_charset(); # elif defined HAVE_LANGINFO_H && defined HAVE_NL_LANGINFO return nl_langinfo(CODESET); # else return ""; /* Works with (at the very least) gnu iconv... */ # endif }
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
548
mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms, int exists) { int new_mode; /* If the file already exists, we'll return the local permissions, * possibly tweaked by the --executability option. */ if (exists) { new_mode = (flist_mode & ~CHMOD_BITS) | (stat_mode & CHMOD_BITS); if (preser...
Bypass
0
mode_t dest_mode(mode_t flist_mode, mode_t stat_mode, int dflt_perms, int exists) { int new_mode; /* If the file already exists, we'll return the local permissions, * possibly tweaked by the --executability option. */ if (exists) { new_mode = (flist_mode & ~CHMOD_BITS) | (stat_mode & CHMOD_BITS); if (preser...
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
549
int finish_transfer(const char *fname, const char *fnametmp, const char *fnamecmp, const char *partialptr, struct file_struct *file, int ok_to_set_time, int overwriting_basis) { int ret; const char *temp_copy_name = partialptr && *partialptr != '/' ? partialptr : NULL; if (inplace) { if (DEBUG_G...
Bypass
0
int finish_transfer(const char *fname, const char *fnametmp, const char *fnamecmp, const char *partialptr, struct file_struct *file, int ok_to_set_time, int overwriting_basis) { int ret; const char *temp_copy_name = partialptr && *partialptr != '/' ? partialptr : NULL; if (inplace) { if (DEBUG_G...
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
550
struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc) { struct file_list *flist = cur_flist; if (!flist && !(flist = first_flist)) goto not_found; while (ndx < flist->ndx_start-1) { if (flist == first_flist) goto not_found; flist = flist->prev; } while (ndx >= flist->ndx_start + flist->u...
Bypass
0
struct file_list *flist_for_ndx(int ndx, const char *fatal_error_loc) { struct file_list *flist = cur_flist; if (!flist && !(flist = first_flist)) goto not_found; while (ndx < flist->ndx_start-1) { if (flist == first_flist) goto not_found; flist = flist->prev; } while (ndx >= flist->ndx_start + flist->u...
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
551
void free_sums(struct sum_struct *s) { if (s->sums) free(s->sums); free(s); }
Bypass
0
void free_sums(struct sum_struct *s) { if (s->sums) free(s->sums); free(s); }
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
552
void send_protected_args(int fd, char *args[]) { int i; #ifdef ICONV_OPTION int convert = ic_send != (iconv_t)-1; xbuf outbuf, inbuf; if (convert) alloc_xbuf(&outbuf, 1024); #endif for (i = 0; args[i]; i++) {} /* find first NULL */ args[i] = "rsync"; /* set a new arg0 */ if (DEBUG_GTE(CMD, 1)) print_child_...
Bypass
0
void send_protected_args(int fd, char *args[]) { int i; #ifdef ICONV_OPTION int convert = ic_send != (iconv_t)-1; xbuf outbuf, inbuf; if (convert) alloc_xbuf(&outbuf, 1024); #endif for (i = 0; args[i]; i++) {} /* find first NULL */ args[i] = "rsync"; /* set a new arg0 */ if (DEBUG_GTE(CMD, 1)) print_child_...
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
553
void setup_iconv(void) { const char *defset = default_charset(); # ifdef ICONV_OPTION const char *charset; char *cp; # endif if (!am_server && !allow_8bit_chars) { /* It's OK if this fails... */ ic_chck = iconv_open(defset, defset); if (DEBUG_GTE(ICONV, 2)) { if (ic_chck == (iconv_t)-1) { rprintf(FIN...
Bypass
0
void setup_iconv(void) { const char *defset = default_charset(); # ifdef ICONV_OPTION const char *charset; char *cp; # endif if (!am_server && !allow_8bit_chars) { /* It's OK if this fails... */ ic_chck = iconv_open(defset, defset); if (DEBUG_GTE(ICONV, 2)) { if (ic_chck == (iconv_t)-1) { rprintf(FIN...
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
554
void sig_int(int sig_num) { /* KLUGE: if the user hits Ctrl-C while ssh is prompting * for a password, then our cleanup's sending of a SIGUSR1 * signal to all our children may kill ssh before it has a * chance to restore the tty settings (i.e. turn echo back * on). By sleeping for a short time, ssh gets a big...
Bypass
0
void sig_int(int sig_num) { /* KLUGE: if the user hits Ctrl-C while ssh is prompting * for a password, then our cleanup's sending of a SIGUSR1 * signal to all our children may kill ssh before it has a * chance to restore the tty settings (i.e. turn echo back * on). By sleeping for a short time, ssh gets a big...
@@ -49,6 +49,7 @@ extern int flist_eof; extern int file_old_total; extern int keep_dirlinks; extern int make_backups; +extern int sanitize_paths; extern struct file_list *cur_flist, *first_flist, *dir_flist; extern struct chmod_mode_struct *daemon_chmod_modes; #ifdef ICONV_OPTION @@ -396,6 +397,11 @@ int read_ndx...
null
null
null
555
lt_dlexit () { /* shut down libltdl */ lt_dlloader *loader; int errors = 0; LT_DLMUTEX_LOCK (); loader = loaders; if (!initialized) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); ++errors; goto done; } /* shut down only at last call. */ if (--initialized == 0) ...
+Priv
0
lt_dlexit () { /* shut down libltdl */ lt_dlloader *loader; int errors = 0; LT_DLMUTEX_LOCK (); loader = loaders; if (!initialized) { LT_DLMUTEX_SETERROR (LT_DLSTRERROR (SHUTDOWN)); ++errors; goto done; } /* shut down only at last call. */ if (--initialized == 0) ...
@@ -2192,7 +2192,8 @@ static int trim LT_PARAMS((char **dest, static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader))...
null
null
null
556
lt_dlinit () { int errors = 0; LT_DLMUTEX_LOCK (); /* Initialize only at first call. */ if (++initialized == 1) { handles = 0; user_search_path = 0; /* empty search path */ #if HAVE_LIBDL errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); #endif #if HAVE_SHL_LO...
+Priv
0
lt_dlinit () { int errors = 0; LT_DLMUTEX_LOCK (); /* Initialize only at first call. */ if (++initialized == 1) { handles = 0; user_search_path = 0; /* empty search path */ #if HAVE_LIBDL errors += lt_dlloader_add (lt_dlloader_next (0), &sys_dl, "dlopen"); #endif #if HAVE_SHL_LO...
@@ -2192,7 +2192,8 @@ static int trim LT_PARAMS((char **dest, static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader))...
null
null
null
557
lt_int_dyld_match_loaded_lib_by_install_name(const char *name) { int i=_dyld_image_count(); int j; const struct mach_header *mh=NULL; const char *id=NULL; for (j = 0; j < i; j++) { id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); if ((id) && (!strcmp(id,name))) { mh=_dyld_get_image_header(j); ...
+Priv
0
lt_int_dyld_match_loaded_lib_by_install_name(const char *name) { int i=_dyld_image_count(); int j; const struct mach_header *mh=NULL; const char *id=NULL; for (j = 0; j < i; j++) { id=lt_int_dyld_lib_install_name(_dyld_get_image_header(j)); if ((id) && (!strcmp(id,name))) { mh=_dyld_get_image_header(j); ...
@@ -2192,7 +2192,8 @@ static int trim LT_PARAMS((char **dest, static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader))...
null
null
null
558
presym_free_symlists () { lt_dlsymlists_t *lists; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; while (lists) { lt_dlsymlists_t *tmp = lists; lists = lists->next; LT_DLFREE (tmp); } preloaded_symbols = 0; LT_DLMUTEX_UNLOCK (); return 0; }
+Priv
0
presym_free_symlists () { lt_dlsymlists_t *lists; LT_DLMUTEX_LOCK (); lists = preloaded_symbols; while (lists) { lt_dlsymlists_t *tmp = lists; lists = lists->next; LT_DLFREE (tmp); } preloaded_symbols = 0; LT_DLMUTEX_UNLOCK (); return 0; }
@@ -2192,7 +2192,8 @@ static int trim LT_PARAMS((char **dest, static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader))...
null
null
null
559
sys_dyld_init() { int retCode = 0; int err = 0; if (!_dyld_present()) { retCode=1; } else { err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)&ltdl_NSAddImage); err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)&ltdl_NSLookupSymbolInImage); err = _dyld_func_lookup...
+Priv
0
sys_dyld_init() { int retCode = 0; int err = 0; if (!_dyld_present()) { retCode=1; } else { err = _dyld_func_lookup("__dyld_NSAddImage",(unsigned long*)&ltdl_NSAddImage); err = _dyld_func_lookup("__dyld_NSLookupSymbolInImage",(unsigned long*)&ltdl_NSLookupSymbolInImage); err = _dyld_func_lookup...
@@ -2192,7 +2192,8 @@ static int trim LT_PARAMS((char **dest, static int try_dlopen LT_PARAMS((lt_dlhandle *handle, const char *filename)); static int tryall_dlopen LT_PARAMS((lt_dlhandle *handle, - const char *filename)); + const char *filename, + const char * useloader))...
null
null
null
560
static int dns_build_query(int query_id, int query_type, unsigned int accepted_payload_size, char *hostname_dn, int hostname_dn_len, char *buf, int bufsize) { struct dns_header dns_hdr; struct dns_question qinfo; struct dns_additional_record edns; char *p = buf; if (sizeof(dns_hdr) + siz...
null
0
static int dns_build_query(int query_id, int query_type, unsigned int accepted_payload_size, char *hostname_dn, int hostname_dn_len, char *buf, int bufsize) { struct dns_header dns_hdr; struct dns_question qinfo; struct dns_additional_record edns; char *p = buf; if (sizeof(dns_hdr) + siz...
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
561
static void dns_check_dns_response(struct dns_resolution *res) { struct dns_resolvers *resolvers = res->resolvers; struct dns_requester *req, *reqback; struct dns_answer_item *item, *itemback; struct server *srv; struct dns_srvrq *srvrq; list_for_each_entry_safe(item, itemback, &res->response....
null
0
static void dns_check_dns_response(struct dns_resolution *res) { struct dns_resolvers *resolvers = res->resolvers; struct dns_requester *req, *reqback; struct dns_answer_item *item, *itemback; struct server *srv; struct dns_srvrq *srvrq; list_for_each_entry_safe(item, itemback, &res->response....
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
562
static void dns_reset_resolution(struct dns_resolution *resolution) { /* update resolution status */ resolution->step = RSLV_STEP_NONE; resolution->try = 0; resolution->last_resolution = now_ms; resolution->nb_queries = 0; resolution->nb_responses = 0; resolution->query_type =...
null
0
static void dns_reset_resolution(struct dns_resolution *resolution) { /* update resolution status */ resolution->step = RSLV_STEP_NONE; resolution->try = 0; resolution->last_resolution = now_ms; resolution->nb_queries = 0; resolution->nb_responses = 0; resolution->query_type =...
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
563
static inline int dns_resolution_timeout(struct dns_resolution *res) { switch (res->status) { case RSLV_STATUS_VALID: return res->resolvers->hold.valid; default: return res->resolvers->timeout.resolve; } }
null
0
static inline int dns_resolution_timeout(struct dns_resolution *res) { switch (res->status) { case RSLV_STATUS_VALID: return res->resolvers->hold.valid; default: return res->resolvers->timeout.resolve; } }
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
564
static inline unsigned short dns_response_get_query_id(unsigned char *resp) { return resp[0] * 256 + resp[1]; }
null
0
static inline unsigned short dns_response_get_query_id(unsigned char *resp) { return resp[0] * 256 + resp[1]; }
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
565
static inline uint16_t dns_rnd16(void) { if (!dns_query_id_seed) dns_query_id_seed = now_ms; dns_query_id_seed ^= dns_query_id_seed << 13; dns_query_id_seed ^= dns_query_id_seed >> 7; dns_query_id_seed ^= dns_query_id_seed << 17; return dns_query_id_seed; }
null
0
static inline uint16_t dns_rnd16(void) { if (!dns_query_id_seed) dns_query_id_seed = now_ms; dns_query_id_seed ^= dns_query_id_seed << 13; dns_query_id_seed ^= dns_query_id_seed >> 7; dns_query_id_seed ^= dns_query_id_seed << 17; return dns_query_id_seed; }
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
566
dns_run_resolution(struct dns_resolution *resolution) { struct dns_resolvers *resolvers = resolution->resolvers; int query_id, i; /* Avoid sending requests for resolutions that don't yet have an * hostname, ie resolutions linked to servers that do not yet have an * fqdn */ if (!resolution->hostname_dn) retu...
null
0
dns_run_resolution(struct dns_resolution *resolution) { struct dns_resolvers *resolvers = resolution->resolvers; int query_id, i; /* Avoid sending requests for resolutions that don't yet have an * hostname, ie resolutions linked to servers that do not yet have an * fqdn */ if (!resolution->hostname_dn) retu...
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
567
static int dns_send_query(struct dns_resolution *resolution) { struct dns_resolvers *resolvers = resolution->resolvers; struct dns_nameserver *ns; list_for_each_entry(ns, &resolvers->nameservers, list) { int fd = ns->dgram->t.sock.fd; if (fd == -1) { if (dns_connect_namesaver(ns) == -1) continue; fd ...
null
0
static int dns_send_query(struct dns_resolution *resolution) { struct dns_resolvers *resolvers = resolution->resolvers; struct dns_nameserver *ns; list_for_each_entry(ns, &resolvers->nameservers, list) { int fd = ns->dgram->t.sock.fd; if (fd == -1) { if (dns_connect_namesaver(ns) == -1) continue; fd ...
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
568
static void dns_update_resolvers_timeout(struct dns_resolvers *resolvers) { struct dns_resolution *res; int next; next = tick_add(now_ms, resolvers->timeout.resolve); if (!LIST_ISEMPTY(&resolvers->resolutions.curr)) { res = LIST_NEXT(&resolvers->resolutions.curr, struct dns_resolution *, list); next = MIN(nex...
null
0
static void dns_update_resolvers_timeout(struct dns_resolvers *resolvers) { struct dns_resolution *res; int next; next = tick_add(now_ms, resolvers->timeout.resolve); if (!LIST_ISEMPTY(&resolvers->resolutions.curr)) { res = LIST_NEXT(&resolvers->resolutions.curr, struct dns_resolution *, list); next = MIN(nex...
@@ -394,7 +394,7 @@ static inline unsigned short dns_response_get_query_id(unsigned char *resp) */ int dns_read_name(unsigned char *buffer, unsigned char *bufend, unsigned char *name, char *destination, int dest_len, - int *offset) + int *offset, unsigned int depth) ...
CWE-835
null
null
569
static int cli_io_handler_dump_resolvers_to_buffer(struct appctx *appctx) { struct stream_interface *si = appctx->owner; struct dns_resolvers *resolvers; struct dns_nameserver *ns; chunk_reset(&trash); switch (appctx->st2) { case STAT_ST_INIT: appctx->st2 = STAT_ST_LIST; /* let's start producing data */ ...
null
0
static int cli_io_handler_dump_resolvers_to_buffer(struct appctx *appctx) { struct stream_interface *si = appctx->owner; struct dns_resolvers *resolvers; struct dns_nameserver *ns; chunk_reset(&trash); switch (appctx->st2) { case STAT_ST_INIT: appctx->st2 = STAT_ST_LIST; /* let's start producing data */ ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
570
static int cli_parse_stat_resolvers(char **args, char *payload, struct appctx *appctx, void *private) { struct dns_resolvers *presolvers; if (*args[2]) { list_for_each_entry(presolvers, &dns_resolvers, list) { if (strcmp(presolvers->id, args[2]) == 0) { appctx->ctx.cli.p0 = presolvers; break; } } ...
null
0
static int cli_parse_stat_resolvers(char **args, char *payload, struct appctx *appctx, void *private) { struct dns_resolvers *presolvers; if (*args[2]) { list_for_each_entry(presolvers, &dns_resolvers, list) { if (strcmp(presolvers->id, args[2]) == 0) { appctx->ctx.cli.p0 = presolvers; break; } } ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
571
static void dns_deinit(void) { struct dns_resolvers *resolvers, *resolversback; struct dns_nameserver *ns, *nsback; struct dns_resolution *res, *resback; struct dns_requester *req, *reqback; struct dns_srvrq *srvrq, *srvrqback; list_for_each_entry_safe(resolvers, resolversback, &dns_resolvers, list) { l...
null
0
static void dns_deinit(void) { struct dns_resolvers *resolvers, *resolversback; struct dns_nameserver *ns, *nsback; struct dns_resolution *res, *resback; struct dns_requester *req, *reqback; struct dns_srvrq *srvrq, *srvrqback; list_for_each_entry_safe(resolvers, resolversback, &dns_resolvers, list) { l...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
572
static int dns_finalize_config(void) { struct dns_resolvers *resolvers; struct proxy *px; int err_code = 0; /* allocate pool of resolution per resolvers */ list_for_each_entry(resolvers, &dns_resolvers, list) { struct dns_nameserver *ns; struct task *t; /* Check if we can create the socket w...
null
0
static int dns_finalize_config(void) { struct dns_resolvers *resolvers; struct proxy *px; int err_code = 0; /* allocate pool of resolution per resolvers */ list_for_each_entry(resolvers, &dns_resolvers, list) { struct dns_nameserver *ns; struct task *t; /* Check if we can create the socket w...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
573
static void dns_free_resolution(struct dns_resolution *resolution) { struct dns_requester *req, *reqback; /* clean up configuration */ dns_reset_resolution(resolution); resolution->hostname_dn = NULL; resolution->hostname_dn_len = 0; list_for_each_entry_safe(req, reqback, &resolution->requesters, list) { LIST...
null
0
static void dns_free_resolution(struct dns_resolution *resolution) { struct dns_requester *req, *reqback; /* clean up configuration */ dns_reset_resolution(resolution); resolution->hostname_dn = NULL; resolution->hostname_dn_len = 0; list_for_each_entry_safe(req, reqback, &resolution->requesters, list) { LIST...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
574
int dns_get_ip_from_response(struct dns_response_packet *dns_p, struct dns_options *dns_opts, void *currentip, short currentip_sin_family, void **newip, short *newip_sin_family, void *owner) { struct dns...
null
0
int dns_get_ip_from_response(struct dns_response_packet *dns_p, struct dns_options *dns_opts, void *currentip, short currentip_sin_family, void **newip, short *newip_sin_family, void *owner) { struct dns...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
575
int dns_hostname_validation(const char *string, char **err) { const char *c, *d; int i; if (strlen(string) > DNS_MAX_NAME_SIZE) { if (err) *err = DNS_TOO_LONG_FQDN; return 0; } c = string; while (*c) { d = c; i = 0; while (*d != '.' && *d && i <= DNS_MAX_LABEL_SIZE) { i++; if (!((*d == '-') ...
null
0
int dns_hostname_validation(const char *string, char **err) { const char *c, *d; int i; if (strlen(string) > DNS_MAX_NAME_SIZE) { if (err) *err = DNS_TOO_LONG_FQDN; return 0; } c = string; while (*c) { d = c; i = 0; while (*d != '.' && *d && i <= DNS_MAX_LABEL_SIZE) { i++; if (!((*d == '-') ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
576
int dns_link_resolution(void *requester, int requester_type, int requester_locked) { struct dns_resolution *res = NULL; struct dns_requester *req; struct dns_resolvers *resolvers; struct server *srv = NULL; struct dns_srvrq *srvrq = NULL; char **hostname_dn; int hostname_dn_len, query_type; ...
null
0
int dns_link_resolution(void *requester, int requester_type, int requester_locked) { struct dns_resolution *res = NULL; struct dns_requester *req; struct dns_resolvers *resolvers; struct server *srv = NULL; struct dns_srvrq *srvrq = NULL; char **hostname_dn; int hostname_dn_len, query_type; ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
577
static struct dns_resolution *dns_pick_resolution(struct dns_resolvers *resolvers, char **hostname_dn, int hostname_dn_len, int query_type) { struct dns_resolution *res; if (!*hostname_dn) goto from_pool; /* Search for same hostname and query type in resolutions.curr */ list_for_each_entry(res, ...
null
0
static struct dns_resolution *dns_pick_resolution(struct dns_resolvers *resolvers, char **hostname_dn, int hostname_dn_len, int query_type) { struct dns_resolution *res; if (!*hostname_dn) goto from_pool; /* Search for same hostname and query type in resolutions.curr */ list_for_each_entry(res, ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
578
static struct task *dns_process_resolvers(struct task *t, void *context, unsigned short state) { struct dns_resolvers *resolvers = context; struct dns_resolution *res, *resback; int exp; HA_SPIN_LOCK(DNS_LOCK, &resolvers->lock); /* Handle all expired resolutions from the active list */ list_for_each_entry_safe...
null
0
static struct task *dns_process_resolvers(struct task *t, void *context, unsigned short state) { struct dns_resolvers *resolvers = context; struct dns_resolution *res, *resback; int exp; HA_SPIN_LOCK(DNS_LOCK, &resolvers->lock); /* Handle all expired resolutions from the active list */ list_for_each_entry_safe...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
579
static void dns_resolve_recv(struct dgram_conn *dgram) { struct dns_nameserver *ns, *tmpns; struct dns_resolvers *resolvers; struct dns_resolution *res; struct dns_query_item *query; unsigned char buf[DNS_MAX_UDP_MESSAGE + 1]; unsigned char *bufend; int fd, buflen, dns_resp; int max_answer_records; unsigned ...
null
0
static void dns_resolve_recv(struct dgram_conn *dgram) { struct dns_nameserver *ns, *tmpns; struct dns_resolvers *resolvers; struct dns_resolution *res; struct dns_query_item *query; unsigned char buf[DNS_MAX_UDP_MESSAGE + 1]; unsigned char *bufend; int fd, buflen, dns_resp; int max_answer_records; unsigned ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
580
int dns_str_to_dn_label(const char *str, int str_len, char *dn, int dn_len) { int i, offset; if (dn_len < str_len + 1) return -1; /* First byte of dn will be used to store the length of the first * label */ offset = 0; for (i = 0; i < str_len; ++i) { if (str[i] == '.') { /* 2 or more consecutive dots is...
null
0
int dns_str_to_dn_label(const char *str, int str_len, char *dn, int dn_len) { int i, offset; if (dn_len < str_len + 1) return -1; /* First byte of dn will be used to store the length of the first * label */ offset = 0; for (i = 0; i < str_len; ++i) { if (str[i] == '.') { /* 2 or more consecutive dots is...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
581
void dns_unlink_resolution(struct dns_requester *requester) { struct dns_resolution *res; struct dns_requester *req; /* Nothing to do */ if (!requester || !requester->resolution) return; res = requester->resolution; /* Clean up the requester */ LIST_DEL(&requester->list); requester->resolution = NULL; /*...
null
0
void dns_unlink_resolution(struct dns_requester *requester) { struct dns_resolution *res; struct dns_requester *req; /* Nothing to do */ if (!requester || !requester->resolution) return; res = requester->resolution; /* Clean up the requester */ LIST_DEL(&requester->list); requester->resolution = NULL; /*...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
582
struct dns_resolvers *find_resolvers_by_id(const char *id) { struct dns_resolvers *res; list_for_each_entry(res, &dns_resolvers, list) { if (!strcmp(res->id, id)) return res; } return NULL; }
null
0
struct dns_resolvers *find_resolvers_by_id(const char *id) { struct dns_resolvers *res; list_for_each_entry(res, &dns_resolvers, list) { if (!strcmp(res->id, id)) return res; } return NULL; }
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
583
struct dns_srvrq *new_dns_srvrq(struct server *srv, char *fqdn) { struct proxy *px = srv->proxy; struct dns_srvrq *srvrq = NULL; int fqdn_len, hostname_dn_len; fqdn_len = strlen(fqdn); hostname_dn_len = dns_str_to_dn_label(fqdn, fqdn_len + 1, trash.area, trash.size); if (hostname_dn_len == -1) ...
null
0
struct dns_srvrq *new_dns_srvrq(struct server *srv, char *fqdn) { struct proxy *px = srv->proxy; struct dns_srvrq *srvrq = NULL; int fqdn_len, hostname_dn_len; fqdn_len = strlen(fqdn); hostname_dn_len = dns_str_to_dn_label(fqdn, fqdn_len + 1, trash.area, trash.size); if (hostname_dn_len == -1) ...
@@ -810,6 +810,11 @@ static int dns_validate_dns_response(unsigned char *resp, unsigned char *bufend, /* Move forward 2 bytes for data len */ reader += 2; + if (reader + dns_answer_record->data_len >= bufend) { + pool_free(dns_answer_item_pool, dns_a...
CWE-125
null
null
584
BackSpace() { if (curr->w_x > 0) { curr->w_x--; } else if (curr->w_wrap && curr->w_y > 0) { curr->w_x = cols - 1; curr->w_y--; } LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
DoS Overflow
0
BackSpace() { if (curr->w_x > 0) { curr->w_x--; } else if (curr->w_wrap && curr->w_y > 0) { curr->w_x = cols - 1; curr->w_y--; } LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
585
BackwardTab() { register int x = curr->w_x; if (curr->w_tabs[x] && x > 0) x--; while (x > 0 && !curr->w_tabs[x]) x--; curr->w_x = x; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
DoS Overflow
0
BackwardTab() { register int x = curr->w_x; if (curr->w_tabs[x] && x > 0) x--; while (x > 0 && !curr->w_tabs[x]) x--; curr->w_x = x; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
586
ClearScreen() { LClearArea(&curr->w_layer, 0, 0, curr->w_width - 1, curr->w_height - 1, CURR_BCE, 1); #ifdef COPY_PASTE MScrollV(curr, curr->w_height, 0, curr->w_height - 1, CURR_BCE); #else MClearArea(curr, 0, 0, curr->w_width - 1, curr->w_height - 1, CURR_BCE); #endif }
DoS Overflow
0
ClearScreen() { LClearArea(&curr->w_layer, 0, 0, curr->w_width - 1, curr->w_height - 1, CURR_BCE, 1); #ifdef COPY_PASTE MScrollV(curr, curr->w_height, 0, curr->w_height - 1, CURR_BCE); #else MClearArea(curr, 0, 0, curr->w_width - 1, curr->w_height - 1, CURR_BCE); #endif }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
587
ClearToEOS() { register int y = curr->w_y, x = curr->w_x; if (x == 0 && y == 0) { ClearScreen(); RestorePosRendition(); return; } LClearArea(&curr->w_layer, x, y, cols - 1, rows - 1, CURR_BCE, 1); MClearArea(curr, x, y, cols - 1, rows - 1, CURR_BCE); RestorePosRendition(); }
DoS Overflow
0
ClearToEOS() { register int y = curr->w_y, x = curr->w_x; if (x == 0 && y == 0) { ClearScreen(); RestorePosRendition(); return; } LClearArea(&curr->w_layer, x, y, cols - 1, rows - 1, CURR_BCE, 1); MClearArea(curr, x, y, cols - 1, rows - 1, CURR_BCE); RestorePosRendition(); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
588
FillWithEs() { register int i; register unsigned char *p, *ep; LClearAll(&curr->w_layer, 1); curr->w_y = curr->w_x = 0; for (i = 0; i < rows; ++i) { clear_mline(&curr->w_mlines[i], 0, cols + 1); p = curr->w_mlines[i].image; ep = p + cols; while (p < ep) *p++ = 'E'; } LRefre...
DoS Overflow
0
FillWithEs() { register int i; register unsigned char *p, *ep; LClearAll(&curr->w_layer, 1); curr->w_y = curr->w_x = 0; for (i = 0; i < rows; ++i) { clear_mline(&curr->w_mlines[i], 0, cols + 1); p = curr->w_mlines[i].image; ep = p + cols; while (p < ep) *p++ = 'E'; } LRefre...
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
589
FindAKA() { register unsigned char *cp, *line; register struct win *wp = curr; register int len = strlen(wp->w_akabuf); int y; y = (wp->w_autoaka > 0 && wp->w_autoaka <= wp->w_height) ? wp->w_autoaka - 1 : wp->w_y; cols = wp->w_width; try_line: cp = line = wp->w_mlines[y].image; if (wp->w_autoaka > 0 ...
DoS Overflow
0
FindAKA() { register unsigned char *cp, *line; register struct win *wp = curr; register int len = strlen(wp->w_akabuf); int y; y = (wp->w_autoaka > 0 && wp->w_autoaka <= wp->w_height) ? wp->w_autoaka - 1 : wp->w_y; cols = wp->w_width; try_line: cp = line = wp->w_mlines[y].image; if (wp->w_autoaka > 0 ...
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
590
ForwardTab() { register int x = curr->w_x; if (x == cols) { LineFeed(1); x = 0; } if (curr->w_tabs[x] && x < cols - 1) x++; while (x < cols - 1 && !curr->w_tabs[x]) x++; curr->w_x = x; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
DoS Overflow
0
ForwardTab() { register int x = curr->w_x; if (x == cols) { LineFeed(1); x = 0; } if (curr->w_tabs[x] && x < cols - 1) x++; while (x < cols - 1 && !curr->w_tabs[x]) x++; curr->w_x = x; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
591
PrintFlush() { display = curr->w_pdisplay; if (display && printcmd) { char *bp = curr->w_string; int len = curr->w_stringp - curr->w_string; int r; while (len && display->d_printfd >= 0) { r = write(display->d_printfd, bp, len); if (r <= 0) { WMsg(curr, errno, "printin...
DoS Overflow
0
PrintFlush() { display = curr->w_pdisplay; if (display && printcmd) { char *bp = curr->w_string; int len = curr->w_stringp - curr->w_string; int r; while (len && display->d_printfd >= 0) { r = write(display->d_printfd, bp, len); if (r <= 0) { WMsg(curr, errno, "printin...
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
592
RestorePosRendition() { LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); LSetRendition(&curr->w_layer, &curr->w_rend); }
DoS Overflow
0
RestorePosRendition() { LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); LSetRendition(&curr->w_layer, &curr->w_rend); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
593
Return() { if (curr->w_x == 0) return; curr->w_x = 0; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
DoS Overflow
0
Return() { if (curr->w_x == 0) return; curr->w_x = 0; LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
594
ReverseLineFeed() { if (curr->w_y == curr->w_top) { MScrollV(curr, -1, curr->w_top, curr->w_bot, CURR_BCE); LScrollV(&curr->w_layer, -1, curr->w_top, curr->w_bot, CURR_BCE); LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); } else if (curr->w_y > 0) CursorUp(1); }
DoS Overflow
0
ReverseLineFeed() { if (curr->w_y == curr->w_top) { MScrollV(curr, -1, curr->w_top, curr->w_bot, CURR_BCE); LScrollV(&curr->w_layer, -1, curr->w_top, curr->w_bot, CURR_BCE); LGotoPos(&curr->w_layer, curr->w_x, curr->w_y); } else if (curr->w_y > 0) CursorUp(1); }
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
595
SelectRendition() { #ifdef COLOR register int j, i = 0, a = curr->w_rend.attr, c = curr->w_rend.color; # ifdef COLORS256 int cx = curr->w_rend.colorx; # endif #else register int j, i = 0, a = curr->w_rend.attr; #endif do { j = curr->w_args[i]; #ifdef COLOR if ((j == 38 || j == 48) && i + 2 < cu...
DoS Overflow
0
SelectRendition() { #ifdef COLOR register int j, i = 0, a = curr->w_rend.attr, c = curr->w_rend.color; # ifdef COLORS256 int cx = curr->w_rend.colorx; # endif #else register int j, i = 0, a = curr->w_rend.attr; #endif do { j = curr->w_args[i]; #ifdef COLOR if ((j == 38 || j == 48) && i + 2 < cu...
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
596
StringEnd() { struct canvas *cv; char *p; int typ; curr->w_state = LIT; *curr->w_stringp = '\0'; switch (curr->w_StringType) { case OSC: /* special xterm compatibility hack */ if (curr->w_string[0] == ';' || (p = index(curr->w_string, ';')) == 0) break; typ = atoi(curr->w_string); ...
DoS Overflow
0
StringEnd() { struct canvas *cv; char *p; int typ; curr->w_state = LIT; *curr->w_stringp = '\0'; switch (curr->w_StringType) { case OSC: /* special xterm compatibility hack */ if (curr->w_string[0] == ';' || (p = index(curr->w_string, ';')) == 0) break; typ = atoi(curr->w_string); ...
@@ -2502,13 +2502,13 @@ int n, ys, ye, bce; return; if (n > 0) { + if (ye - ys + 1 < n) + n = ye - ys + 1; if (n > 256) { MScrollV(p, n - 256, ys, ye, bce); n = 256; } - if (ye - ys + 1 < n) - n = ye - ys + 1; #ifdef COPY_PASTE if (compacthist) { @@ -2562,14 +2562,14 ...
CWE-119
null
null
597
_poppler_page_new (PopplerDocument *document, Page *page, int index) { PopplerPage *poppler_page; g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL); poppler_page = (PopplerPage *) g_object_new (POPPLER_TYPE_PAGE, NULL, NULL); poppler_page->document = (PopplerDocument *) g_object_ref (document); po...
DoS Exec Code Overflow Mem. Corr.
0
_poppler_page_new (PopplerDocument *document, Page *page, int index) { PopplerPage *poppler_page; g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL); poppler_page = (PopplerPage *) g_object_new (POPPLER_TYPE_PAGE, NULL, NULL); poppler_page->document = (PopplerDocument *) g_object_ref (document); po...
@@ -609,28 +609,28 @@ create_surface_from_thumbnail_data (guchar *data, gint rowstride) { guchar *cairo_pixels; + gint cairo_stride; cairo_surface_t *surface; - static cairo_user_data_key_t key; int j; - cairo_pixels = (guchar *)g_malloc (4 * width * height); - surface = cairo_image_surface_...
CWE-189
null
null
598
_poppler_page_render_to_pixbuf (PopplerPage *page, int src_x, int src_y, int src_width, int src_height, double scale, int rotation, GBool printing, GdkPixbuf *pixbuf) { OutputDevData data; poppler_page_prepare_output_dev (page, scale, rotation, FALSE, &data); page->page->displaySlice(p...
DoS Exec Code Overflow Mem. Corr.
0
_poppler_page_render_to_pixbuf (PopplerPage *page, int src_x, int src_y, int src_width, int src_height, double scale, int rotation, GBool printing, GdkPixbuf *pixbuf) { OutputDevData data; poppler_page_prepare_output_dev (page, scale, rotation, FALSE, &data); page->page->displaySlice(p...
@@ -609,28 +609,28 @@ create_surface_from_thumbnail_data (guchar *data, gint rowstride) { guchar *cairo_pixels; + gint cairo_stride; cairo_surface_t *surface; - static cairo_user_data_key_t key; int j; - cairo_pixels = (guchar *)g_malloc (4 * width * height); - surface = cairo_image_surface_...
CWE-189
null
null
599
copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, unsigned char *data, GdkPixbuf *pixbuf) { int cairo_width, cairo_height, cairo_rowstride; unsigned char *pixbuf_data, *dst, *cairo_data; int pixbuf_rowstride, pixbuf_n_channels; unsigned int *src; int x, y; cairo_width = cair...
DoS Exec Code Overflow Mem. Corr.
0
copy_cairo_surface_to_pixbuf (cairo_surface_t *surface, unsigned char *data, GdkPixbuf *pixbuf) { int cairo_width, cairo_height, cairo_rowstride; unsigned char *pixbuf_data, *dst, *cairo_data; int pixbuf_rowstride, pixbuf_n_channels; unsigned int *src; int x, y; cairo_width = cair...
@@ -609,28 +609,28 @@ create_surface_from_thumbnail_data (guchar *data, gint rowstride) { guchar *cairo_pixels; + gint cairo_stride; cairo_surface_t *surface; - static cairo_user_data_key_t key; int j; - cairo_pixels = (guchar *)g_malloc (4 * width * height); - surface = cairo_image_surface_...
CWE-189
null
null