idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
2,100
jsonb_to_record(PG_FUNCTION_ARGS) { return populate_record_worker(fcinfo, "jsonb_to_record", false); }
DoS Overflow
0
jsonb_to_record(PG_FUNCTION_ARGS) { return populate_record_worker(fcinfo, "jsonb_to_record", false); }
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,101
jsonb_to_recordset(PG_FUNCTION_ARGS) { return populate_recordset_worker(fcinfo, "jsonb_to_recordset", false); }
DoS Overflow
0
jsonb_to_recordset(PG_FUNCTION_ARGS) { return populate_recordset_worker(fcinfo, "jsonb_to_recordset", false); }
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,102
okeys_object_field_start(void *state, char *fname, bool isnull) { OkeysState *_state = (OkeysState *) state; /* only collecting keys for the top level object */ if (_state->lex->lex_level != 1) return; /* enlarge result array if necessary */ if (_state->result_count >= _state->result_size) { _state->result_...
DoS Overflow
0
okeys_object_field_start(void *state, char *fname, bool isnull) { OkeysState *_state = (OkeysState *) state; /* only collecting keys for the top level object */ if (_state->lex->lex_level != 1) return; /* enlarge result array if necessary */ if (_state->result_count >= _state->result_size) { _state->result_...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,103
populate_recordset_array_element_start(void *state, bool isnull) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; if (_state->lex->lex_level == 1 && _state->lex->token_type != JSON_TOKEN_OBJECT_START) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("argument of %s mu...
DoS Overflow
0
populate_recordset_array_element_start(void *state, bool isnull) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; if (_state->lex->lex_level == 1 && _state->lex->token_type != JSON_TOKEN_OBJECT_START) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("argument of %s mu...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,104
populate_recordset_array_start(void *state) { /* nothing to do */ }
DoS Overflow
0
populate_recordset_array_start(void *state) { /* nothing to do */ }
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,105
populate_recordset_object_field_end(void *state, char *fname, bool isnull) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; JsonHashEntry *hashentry; bool found; /* * Ignore nested fields. */ if (_state->lex->lex_level > 2) return; /* * Ignore field names >= NAMEDATALEN - they can't...
DoS Overflow
0
populate_recordset_object_field_end(void *state, char *fname, bool isnull) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; JsonHashEntry *hashentry; bool found; /* * Ignore nested fields. */ if (_state->lex->lex_level > 2) return; /* * Ignore field names >= NAMEDATALEN - they can't...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,106
populate_recordset_object_field_start(void *state, char *fname, bool isnull) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; if (_state->lex->lex_level > 2) return; if (_state->lex->token_type == JSON_TOKEN_ARRAY_START || _state->lex->token_type == JSON_TOKEN_OBJECT_START) { _state->sav...
DoS Overflow
0
populate_recordset_object_field_start(void *state, char *fname, bool isnull) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; if (_state->lex->lex_level > 2) return; if (_state->lex->token_type == JSON_TOKEN_ARRAY_START || _state->lex->token_type == JSON_TOKEN_OBJECT_START) { _state->sav...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,107
populate_recordset_object_start(void *state) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; int lex_level = _state->lex->lex_level; HASHCTL ctl; /* Reject object at top level: we must have an array at level 0 */ if (lex_level == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_V...
DoS Overflow
0
populate_recordset_object_start(void *state) { PopulateRecordsetState *_state = (PopulateRecordsetState *) state; int lex_level = _state->lex->lex_level; HASHCTL ctl; /* Reject object at top level: we must have an array at level 0 */ if (lex_level == 0) ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_V...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,108
populate_recordset_worker(FunctionCallInfo fcinfo, const char *funcname, bool have_record_arg) { int json_arg_num = have_record_arg ? 1 : 0; Oid jtype = get_fn_expr_argtype(fcinfo->flinfo, json_arg_num); ReturnSetInfo *rsi; MemoryContext old_cxt; Oid tupType; int32 tupTypmod; HeapTupleHeader rec; ...
DoS Overflow
0
populate_recordset_worker(FunctionCallInfo fcinfo, const char *funcname, bool have_record_arg) { int json_arg_num = have_record_arg ? 1 : 0; Oid jtype = get_fn_expr_argtype(fcinfo->flinfo, json_arg_num); ReturnSetInfo *rsi; MemoryContext old_cxt; Oid tupType; int32 tupTypmod; HeapTupleHeader rec; ...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,109
setPathArray(JsonbIterator **it, Datum *path_elems, bool *path_nulls, int path_len, JsonbParseState **st, int level, Jsonb *newval, uint32 nelems, bool create) { JsonbValue v; int idx, i; char *badp; bool done = false; /* pick correct index */ if (level < path_len && !path_nulls[level]) { ch...
DoS Overflow
0
setPathArray(JsonbIterator **it, Datum *path_elems, bool *path_nulls, int path_len, JsonbParseState **st, int level, Jsonb *newval, uint32 nelems, bool create) { JsonbValue v; int idx, i; char *badp; bool done = false; /* pick correct index */ if (level < path_len && !path_nulls[level]) { ch...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,110
setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls, int path_len, JsonbParseState **st, int level, Jsonb *newval, uint32 npairs, bool create) { JsonbValue v; int i; JsonbValue k; bool done = false; if (level >= path_len || path_nulls[level]) done = true; /* empty object is a sp...
DoS Overflow
0
setPathObject(JsonbIterator **it, Datum *path_elems, bool *path_nulls, int path_len, JsonbParseState **st, int level, Jsonb *newval, uint32 npairs, bool create) { JsonbValue v; int i; JsonbValue k; bool done = false; if (level >= path_len || path_nulls[level]) done = true; /* empty object is a sp...
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,111
sn_array_element_start(void *state, bool isnull) { StripnullState *_state = (StripnullState *) state; if (_state->strval->data[_state->strval->len - 1] != '[') appendStringInfoCharMacro(_state->strval, ','); }
DoS Overflow
0
sn_array_element_start(void *state, bool isnull) { StripnullState *_state = (StripnullState *) state; if (_state->strval->data[_state->strval->len - 1] != '[') appendStringInfoCharMacro(_state->strval, ','); }
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,112
sn_array_end(void *state) { StripnullState *_state = (StripnullState *) state; appendStringInfoCharMacro(_state->strval, ']'); }
DoS Overflow
0
sn_array_end(void *state) { StripnullState *_state = (StripnullState *) state; appendStringInfoCharMacro(_state->strval, ']'); }
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,113
sn_array_start(void *state) { StripnullState *_state = (StripnullState *) state; appendStringInfoCharMacro(_state->strval, '['); }
DoS Overflow
0
sn_array_start(void *state) { StripnullState *_state = (StripnullState *) state; appendStringInfoCharMacro(_state->strval, '['); }
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,114
sn_object_end(void *state) { StripnullState *_state = (StripnullState *) state; appendStringInfoCharMacro(_state->strval, '}');
DoS Overflow
0
sn_object_end(void *state) { StripnullState *_state = (StripnullState *) state; appendStringInfoCharMacro(_state->strval, '}');
@@ -3724,6 +3724,8 @@ setPath(JsonbIterator **it, Datum *path_elems, JsonbValue *res = NULL; int r; + check_stack_depth(); + if (path_nulls[level]) elog(ERROR, "path element at the position %d is NULL", level + 1);
CWE-119
null
null
2,115
static int ne2000_buffer_full(NE2000State *s) { int avail, index, boundary; index = s->curpag << 8; boundary = s->boundary << 8; if (index < boundary) avail = boundary - index; else avail = (s->stop - s->start) - (index - boundary); if (avail < (MAX_ETH_FRAME_SIZE + 4)) ...
DoS Exec Code Overflow
0
static int ne2000_buffer_full(NE2000State *s) { int avail, index, boundary; index = s->curpag << 8; boundary = s->boundary << 8; if (index < boundary) avail = boundary - index; else avail = (s->stop - s->start) - (index - boundary); if (avail < (MAX_ETH_FRAME_SIZE + 4)) ...
@@ -230,6 +230,9 @@ ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_) } index = s->curpag << 8; + if (index >= NE2000_PMEM_END) { + index = s->start; + } /* 4 bytes for header */ total_len = size + 4; /* address for next packet (4 bytes for CRC) */ @@ -...
CWE-119
null
null
2,116
int ne2000_can_receive(NetClientState *nc) { NE2000State *s = qemu_get_nic_opaque(nc); if (s->cmd & E8390_STOP) return 1; return !ne2000_buffer_full(s); }
DoS Exec Code Overflow
0
int ne2000_can_receive(NetClientState *nc) { NE2000State *s = qemu_get_nic_opaque(nc); if (s->cmd & E8390_STOP) return 1; return !ne2000_buffer_full(s); }
@@ -230,6 +230,9 @@ ssize_t ne2000_receive(NetClientState *nc, const uint8_t *buf, size_t size_) } index = s->curpag << 8; + if (index >= NE2000_PMEM_END) { + index = s->start; + } /* 4 bytes for header */ total_len = size + 4; /* address for next packet (4 bytes for CRC) */ @@ -...
CWE-119
null
null
2,117
NTSTATUS smb_register_vfs(int version, const char *name, const struct vfs_fn_pointers *fns) { struct vfs_init_function_entry *entry = backends; if ((version != SMB_VFS_INTERFACE_VERSION)) { DEBUG(0, ("Failed to register vfs module.\n" "The module was compiled against SMB_VFS_INTERFACE_VERSION %d,...
Bypass
0
NTSTATUS smb_register_vfs(int version, const char *name, const struct vfs_fn_pointers *fns) { struct vfs_init_function_entry *entry = backends; if ((version != SMB_VFS_INTERFACE_VERSION)) { DEBUG(0, ("Failed to register vfs module.\n" "The module was compiled against SMB_VFS_INTERFACE_VERSION %d,...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,118
bool smbd_vfs_init(connection_struct *conn) { const char **vfs_objects; unsigned int i = 0; int j = 0; /* Normal share - initialise with disk access functions */ vfs_init_default(conn); /* No need to load vfs modules for printer connections */ if (conn->printer) { return True; } vfs_objects = lp_vfs_objec...
Bypass
0
bool smbd_vfs_init(connection_struct *conn) { const char **vfs_objects; unsigned int i = 0; int j = 0; /* Normal share - initialise with disk access functions */ vfs_init_default(conn); /* No need to load vfs modules for printer connections */ if (conn->printer) { return True; } vfs_objects = lp_vfs_objec...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,119
void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle, files_struct *fsp, size_t ext_size, void (*destroy_fn)(void *p_data)) { struct vfs_fsp_data *ext; void * ext_data; /* Prevent VFS modules adding multiple extensions. */ if ((ext_data = vfs_fetch_fsp_extension(handle, fsp))) { return ext_...
Bypass
0
void *vfs_add_fsp_extension_notype(vfs_handle_struct *handle, files_struct *fsp, size_t ext_size, void (*destroy_fn)(void *p_data)) { struct vfs_fsp_data *ext; void * ext_data; /* Prevent VFS modules adding multiple extensions. */ if ((ext_data = vfs_fetch_fsp_extension(handle, fsp))) { return ext_...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,120
int vfs_allocate_file_space(files_struct *fsp, uint64_t len) { int ret; connection_struct *conn = fsp->conn; uint64_t space_avail; uint64_t bsize,dfree,dsize; NTSTATUS status; /* * Actually try and commit the space on disk.... */ DEBUG(10,("vfs_allocate_file_space: file %s, len %.0f\n", fsp_str_dbg(fsp...
Bypass
0
int vfs_allocate_file_space(files_struct *fsp, uint64_t len) { int ret; connection_struct *conn = fsp->conn; uint64_t space_avail; uint64_t bsize,dfree,dsize; NTSTATUS status; /* * Actually try and commit the space on disk.... */ DEBUG(10,("vfs_allocate_file_space: file %s, len %.0f\n", fsp_str_dbg(fsp...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,121
void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; head = (struct vfs_fsp_data *)vfs_memctx_fsp_extension(handle, fsp); if (head != NULL) { return EXT_DATA_AREA(head); } return NULL; }
Bypass
0
void *vfs_fetch_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; head = (struct vfs_fsp_data *)vfs_memctx_fsp_extension(handle, fsp); if (head != NULL) { return EXT_DATA_AREA(head); } return NULL; }
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,122
NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname) { /* Only return OK if stat was successful and S_ISREG */ if ((SMB_VFS_STAT(conn, smb_fname) != -1) && S_ISREG(smb_fname->st.st_ex_mode)) { return NT_STATUS_OK; } return NT_STATUS_OBJECT_NAME_NOT_FOUND; }
Bypass
0
NTSTATUS vfs_file_exist(connection_struct *conn, struct smb_filename *smb_fname) { /* Only return OK if stat was successful and S_ISREG */ if ((SMB_VFS_STAT(conn, smb_fname) != -1) && S_ISREG(smb_fname->st.st_ex_mode)) { return NT_STATUS_OK; } return NT_STATUS_OBJECT_NAME_NOT_FOUND; }
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,123
int vfs_fill_sparse(files_struct *fsp, off_t len) { int ret; NTSTATUS status; off_t offset; size_t num_to_write; status = vfs_stat_fsp(fsp); if (!NT_STATUS_IS_OK(status)) { return -1; } if (len <= fsp->fsp_name->st.st_ex_size) { return 0; } #ifdef S_ISFIFO if (S_ISFIFO(fsp->fsp_name->st.st_ex_mode)) { ...
Bypass
0
int vfs_fill_sparse(files_struct *fsp, off_t len) { int ret; NTSTATUS status; off_t offset; size_t num_to_write; status = vfs_stat_fsp(fsp); if (!NT_STATUS_IS_OK(status)) { return -1; } if (len <= fsp->fsp_name->st.st_ex_size) { return 0; } #ifdef S_ISFIFO if (S_ISFIFO(fsp->fsp_name->st.st_ex_mode)) { ...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,124
bool vfs_init_custom(connection_struct *conn, const char *vfs_object) { char *module_path = NULL; char *module_name = NULL; char *module_param = NULL, *p; vfs_handle_struct *handle; const struct vfs_init_function_entry *entry; if (!conn||!vfs_object||!vfs_object[0]) { DEBUG(0, ("vfs_init_custom() called with N...
Bypass
0
bool vfs_init_custom(connection_struct *conn, const char *vfs_object) { char *module_path = NULL; char *module_name = NULL; char *module_param = NULL, *p; vfs_handle_struct *handle; const struct vfs_init_function_entry *entry; if (!conn||!vfs_object||!vfs_object[0]) { DEBUG(0, ("vfs_init_custom() called with N...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,125
static void vfs_init_default(connection_struct *conn) { DEBUG(3, ("Initialising default vfs hooks\n")); vfs_init_custom(conn, DEFAULT_VFS_MODULE_NAME); }
Bypass
0
static void vfs_init_default(connection_struct *conn) { DEBUG(3, ("Initialising default vfs hooks\n")); vfs_init_custom(conn, DEFAULT_VFS_MODULE_NAME); }
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,126
void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; for (head = fsp->vfs_extension; head; head = head->next) { if (head->owner == handle) { return head; } } return NULL; }
Bypass
0
void *vfs_memctx_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *head; for (head = fsp->vfs_extension; head; head = head->next) { if (head->owner == handle) { return head; } } return NULL; }
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,127
static ssize_t vfs_pwrite_fn(void *file, const void *buf, size_t len, off_t offset) { struct files_struct *fsp = (struct files_struct *)file; return SMB_VFS_PWRITE(fsp, buf, len, offset); }
Bypass
0
static ssize_t vfs_pwrite_fn(void *file, const void *buf, size_t len, off_t offset) { struct files_struct *fsp = (struct files_struct *)file; return SMB_VFS_PWRITE(fsp, buf, len, offset); }
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,128
ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count) { size_t total=0; while (total < byte_count) { ssize_t ret = SMB_VFS_READ(fsp, buf + total, byte_count - total); if (ret == 0) return total; if (ret == -1) { if (errno == EINTR) continue; else return -1; } total ...
Bypass
0
ssize_t vfs_read_data(files_struct *fsp, char *buf, size_t byte_count) { size_t total=0; while (total < byte_count) { ssize_t ret = SMB_VFS_READ(fsp, buf + total, byte_count - total); if (ret == 0) return total; if (ret == -1) { if (errno == EINTR) continue; else return -1; } total ...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,129
void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *curr; struct vfs_fsp_data *prev; for (curr = fsp->vfs_extension, prev = NULL; curr; prev = curr, curr = curr->next) { if (curr->owner == handle) { if (prev) { prev->next = curr->next; ...
Bypass
0
void vfs_remove_fsp_extension(vfs_handle_struct *handle, files_struct *fsp) { struct vfs_fsp_data *curr; struct vfs_fsp_data *prev; for (curr = fsp->vfs_extension, prev = NULL; curr; prev = curr, curr = curr->next) { if (curr->owner == handle) { if (prev) { prev->next = curr->next; ...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,130
int vfs_set_filelen(files_struct *fsp, off_t len) { int ret; contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_SET_FILE_LEN); DEBUG(10,("vfs_set_filelen: ftruncate %s to len %.0f\n", fsp_str_dbg(fsp), (double)len)); flush_write_cache(fsp, SAMBA_SIZECHANGE_FLUSH); if ((ret = SMB_VFS_FTRUNCATE(fsp, len)) != -1)...
Bypass
0
int vfs_set_filelen(files_struct *fsp, off_t len) { int ret; contend_level2_oplocks_begin(fsp, LEVEL2_CONTEND_SET_FILE_LEN); DEBUG(10,("vfs_set_filelen: ftruncate %s to len %.0f\n", fsp_str_dbg(fsp), (double)len)); flush_write_cache(fsp, SAMBA_SIZECHANGE_FLUSH); if ((ret = SMB_VFS_FTRUNCATE(fsp, len)) != -1)...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,131
int vfs_slow_fallocate(files_struct *fsp, off_t offset, off_t len) { ssize_t pwrite_ret; size_t total = 0; if (!sparse_buf) { sparse_buf = SMB_CALLOC_ARRAY(char, SPARSE_BUF_WRITE_SIZE); if (!sparse_buf) { errno = ENOMEM; return -1; } } while (total < len) { size_t curr_write_size = MIN(SPARSE_BUF_W...
Bypass
0
int vfs_slow_fallocate(files_struct *fsp, off_t offset, off_t len) { ssize_t pwrite_ret; size_t total = 0; if (!sparse_buf) { sparse_buf = SMB_CALLOC_ARRAY(char, SPARSE_BUF_WRITE_SIZE); if (!sparse_buf) { errno = ENOMEM; return -1; } } while (total < len) { size_t curr_write_size = MIN(SPARSE_BUF_W...
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,132
off_t vfs_transfer_file(files_struct *in, files_struct *out, off_t n) { return transfer_file_internal((void *)in, (void *)out, n, vfs_pread_fn, vfs_pwrite_fn); }
Bypass
0
off_t vfs_transfer_file(files_struct *in, files_struct *out, off_t n) { return transfer_file_internal((void *)in, (void *)out, n, vfs_pread_fn, vfs_pwrite_fn); }
@@ -982,6 +982,7 @@ NTSTATUS check_reduced_name_with_privilege(connection_struct *conn, struct smb_filename *smb_fname_cwd = NULL; struct privilege_paths *priv_paths = NULL; int ret; + bool matched; DEBUG(3,("check_reduced_name_with_privilege [%s] [%s]\n", ...
CWE-264
null
null
2,133
another_hunk (enum diff difftype, bool rev) { char *s; lin context = 0; size_t chars_read; char numbuf0[LINENUM_LENGTH_BOUND + 1]; char numbuf1[LINENUM_LENGTH_BOUND + 1]; char numbuf2[LINENUM_LENGTH_BOUND + 1]; char numbuf3[LINENUM_LENGTH_BOUND + 1]; set_hunkmax(); while (p_end >= ...
null
0
another_hunk (enum diff difftype, bool rev) { char *s; lin context = 0; size_t chars_read; char numbuf0[LINENUM_LENGTH_BOUND + 1]; char numbuf1[LINENUM_LENGTH_BOUND + 1]; char numbuf2[LINENUM_LENGTH_BOUND + 1]; char numbuf3[LINENUM_LENGTH_BOUND + 1]; set_hunkmax(); while (p_end >= ...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,134
best_name (char *const *name, int const *ignore) { enum nametype i; int components[3]; int components_min = INT_MAX; size_t basename_len[3]; size_t basename_len_min = SIZE_MAX; size_t len[3]; size_t len_min = SIZE_MAX; for (i = OLD; i <= INDEX; i++) if (name[i] && !ignore[i]) { /* Take the...
null
0
best_name (char *const *name, int const *ignore) { enum nametype i; int components[3]; int components_min = INT_MAX; size_t basename_len[3]; size_t basename_len_min = SIZE_MAX; size_t len[3]; size_t len_min = SIZE_MAX; for (i = OLD; i <= INDEX; i++) if (name[i] && !ignore[i]) { /* Take the...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,135
fetchmode (char const *str) { const char *s; mode_t mode; while (ISSPACE ((unsigned char) *str)) str++; for (s = str, mode = 0; s < str + 6; s++) { if (*s >= '0' && *s <= '7') mode = (mode << 3) + (*s - '0'); else { mode = 0; break; } } if (*s == '\r') s++; i...
null
0
fetchmode (char const *str) { const char *s; mode_t mode; while (ISSPACE ((unsigned char) *str)) str++; for (s = str, mode = 0; s < str + 6; s++) { if (*s >= '0' && *s <= '7') mode = (mode << 3) + (*s - '0'); else { mode = 0; break; } } if (*s == '\r') s++; i...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,136
get_line (void) { return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr, p_pass_comments_through); }
null
0
get_line (void) { return pget_line (p_indent, p_rfc934_nesting, p_strip_trailing_cr, p_pass_comments_through); }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,137
get_sha1(char **sha1, char const *start, char const *end) { unsigned int len = end - start; *sha1 = xmalloc (len + 1); memcpy (*sha1, start, len); (*sha1)[len] = 0; }
null
0
get_sha1(char **sha1, char const *start, char const *end) { unsigned int len = end - start; *sha1 = xmalloc (len + 1); memcpy (*sha1, start, len); (*sha1)[len] = 0; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,138
grow_hunkmax (void) { hunkmax *= 2; assert (p_line && p_len && p_Char); if ((p_line = realloc (p_line, hunkmax * sizeof (*p_line))) && (p_len = realloc (p_len, hunkmax * sizeof (*p_len))) && (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char)))) return true; if (!using_plan_a) xalloc_die...
null
0
grow_hunkmax (void) { hunkmax *= 2; assert (p_line && p_len && p_Char); if ((p_line = realloc (p_line, hunkmax * sizeof (*p_line))) && (p_len = realloc (p_len, hunkmax * sizeof (*p_len))) && (p_Char = realloc (p_Char, hunkmax * sizeof (*p_Char)))) return true; if (!using_plan_a) xalloc_die...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,139
incomplete_line (void) { FILE *fp = pfp; int c; file_offset line_beginning = file_tell (fp); if (getc (fp) == '\\') { while ((c = getc (fp)) != '\n' && c != EOF) /* do nothing */ ; return true; } else { /* We don't trust ungetc. */ Fseek (pfp, line_beginning, SEEK_SET)...
null
0
incomplete_line (void) { FILE *fp = pfp; int c; file_offset line_beginning = file_tell (fp); if (getc (fp) == '\\') { while ((c = getc (fp)) != '\n' && c != EOF) /* do nothing */ ; return true; } else { /* We don't trust ungetc. */ Fseek (pfp, line_beginning, SEEK_SET)...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,140
maybe_reverse (char const *name, bool nonexistent, bool is_empty) { bool looks_reversed = (! is_empty) < p_says_nonexistent[reverse ^ is_empty]; /* Allow to create and delete empty files when we know that they are empty: in the "diff --git" format, we know that from the index header. */ if (is_empty ...
null
0
maybe_reverse (char const *name, bool nonexistent, bool is_empty) { bool looks_reversed = (! is_empty) < p_says_nonexistent[reverse ^ is_empty]; /* Allow to create and delete empty files when we know that they are empty: in the "diff --git" format, we know that from the index header. */ if (is_empty ...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,141
name_is_valid (char const *name) { int i; bool is_valid = true; for (i = 0; i < ARRAY_SIZE (invalid_names); i++) { if (! invalid_names[i]) break; if (! strcmp (invalid_names[i], name)) return false; } is_valid = filename_is_safe (name); /* Allow any filename if we are in the filesyste...
null
0
name_is_valid (char const *name) { int i; bool is_valid = true; for (i = 0; i < ARRAY_SIZE (invalid_names); i++) { if (! invalid_names[i]) break; if (! strcmp (invalid_names[i], name)) return false; } is_valid = filename_is_safe (name); /* Allow any filename if we are in the filesyste...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,142
next_intuit_at (file_offset file_pos, lin file_line) { p_base = file_pos; p_bline = file_line; }
null
0
next_intuit_at (file_offset file_pos, lin file_line) { p_base = file_pos; p_bline = file_line; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,143
open_patch_file (char const *filename) { file_offset file_pos = 0; file_offset pos; struct stat st; if (!filename || !*filename || strEQ (filename, "-")) pfp = stdin; else { pfp = fopen (filename, binary_transput ? "rb" : "r"); if (!pfp) pfatal ("Can't open patch file %s", quotearg...
null
0
open_patch_file (char const *filename) { file_offset file_pos = 0; file_offset pos; struct stat st; if (!filename || !*filename || strEQ (filename, "-")) pfp = stdin; else { pfp = fopen (filename, binary_transput ? "rb" : "r"); if (!pfp) pfatal ("Can't open patch file %s", quotearg...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,144
pch_c_function (void) { return p_c_function; }
null
0
pch_c_function (void) { return p_c_function; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,145
bool pch_copy (void) { return p_copy[OLD] && p_copy[NEW]; }
null
0
bool pch_copy (void) { return p_copy[OLD] && p_copy[NEW]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,146
pch_end (void) { return p_end; }
null
0
pch_end (void) { return p_end; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,147
pch_first (void) { return p_first; }
null
0
pch_first (void) { return p_first; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,148
pch_git_diff (void) { return p_git_diff; }
null
0
pch_git_diff (void) { return p_git_diff; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,149
pch_line_len (lin line) { return p_len[line]; }
null
0
pch_line_len (lin line) { return p_len[line]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,150
pch_mode (bool which) { return p_mode[which]; }
null
0
pch_mode (bool which) { return p_mode[which]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,151
pch_name (enum nametype type) { return type == NONE ? NULL : p_name[type]; }
null
0
pch_name (enum nametype type) { return type == NONE ? NULL : p_name[type]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,152
pch_newfirst (void) { return p_newfirst; }
null
0
pch_newfirst (void) { return p_newfirst; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,153
pch_prefix_context (void) { return p_prefix_context; }
null
0
pch_prefix_context (void) { return p_prefix_context; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,154
pch_ptrn_lines (void) { return p_ptrn_lines; }
null
0
pch_ptrn_lines (void) { return p_ptrn_lines; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,155
bool pch_rename (void) { return p_rename[OLD] && p_rename[NEW]; }
null
0
bool pch_rename (void) { return p_rename[OLD] && p_rename[NEW]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,156
pch_repl_lines (void) { return p_repl_lines; }
null
0
pch_repl_lines (void) { return p_repl_lines; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,157
pch_says_nonexistent (bool which) { return p_says_nonexistent[which]; }
null
0
pch_says_nonexistent (bool which) { return p_says_nonexistent[which]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,158
pch_suffix_context (void) { return p_suffix_context; }
null
0
pch_suffix_context (void) { return p_suffix_context; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,159
pch_swap (void) { char **tp_line; /* the text of the hunk */ size_t *tp_len; /* length of each line */ char *tp_char; /* +, -, and ! */ lin i; lin n; bool blankline = false; char *s; i = p_first; p_first = p_newfirst; p_newfirst = i; /* make a scratch copy */ tp_lin...
null
0
pch_swap (void) { char **tp_line; /* the text of the hunk */ size_t *tp_len; /* length of each line */ char *tp_char; /* +, -, and ! */ lin i; lin n; bool blankline = false; char *s; i = p_first; p_first = p_newfirst; p_newfirst = i; /* make a scratch copy */ tp_lin...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,160
pch_timestr (bool which) { return p_timestr[which]; }
null
0
pch_timestr (bool which) { return p_timestr[which]; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,161
pch_write_line (lin line, FILE *file) { bool after_newline = (p_len[line] > 0) && (p_line[line][p_len[line] - 1] == '\n'); if (! fwrite (p_line[line], sizeof (*p_line[line]), p_len[line], file)) write_fatal (); return after_newline; }
null
0
pch_write_line (lin line, FILE *file) { bool after_newline = (p_len[line] > 0) && (p_line[line][p_len[line] - 1] == '\n'); if (! fwrite (p_line[line], sizeof (*p_line[line]), p_len[line], file)) write_fatal (); return after_newline; }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,162
pget_line (size_t indent, int rfc934_nesting, bool strip_trailing_cr, bool pass_comments_through) { FILE *fp = pfp; int c; size_t i; char *b; size_t s; do { i = 0; for (;;) { c = getc (fp); if (c == EOF) { if (ferror (fp)) read_fatal (); return 0; } i...
null
0
pget_line (size_t indent, int rfc934_nesting, bool strip_trailing_cr, bool pass_comments_through) { FILE *fp = pfp; int c; size_t i; char *b; size_t s; do { i = 0; for (;;) { c = getc (fp); if (c == EOF) { if (ferror (fp)) read_fatal (); return 0; } i...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,163
prefix_components (char *filename, bool checkdirs) { int count = 0; struct stat stat_buf; int stat_result; char *f = filename + FILE_SYSTEM_PREFIX_LEN (filename); if (*f) while (*++f) if (ISSLASH (f[0]) && ! ISSLASH (f[-1])) { if (checkdirs) { *f = '\0'; stat_result = safe_st...
null
0
prefix_components (char *filename, bool checkdirs) { int count = 0; struct stat stat_buf; int stat_result; char *f = filename + FILE_SYSTEM_PREFIX_LEN (filename); if (*f) while (*++f) if (ISSLASH (f[0]) && ! ISSLASH (f[-1])) { if (checkdirs) { *f = '\0'; stat_result = safe_st...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,164
set_hunkmax (void) { if (!p_line) p_line = xmalloc (hunkmax * sizeof *p_line); if (!p_len) p_len = xmalloc (hunkmax * sizeof *p_len); if (!p_Char) p_Char = xmalloc (hunkmax * sizeof *p_Char); }
null
0
set_hunkmax (void) { if (!p_line) p_line = xmalloc (hunkmax * sizeof *p_line); if (!p_len) p_len = xmalloc (hunkmax * sizeof *p_len); if (!p_Char) p_Char = xmalloc (hunkmax * sizeof *p_Char); }
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,165
sha1_says_nonexistent(char const *sha1) { char const *empty_sha1 = "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"; char const *s; /* Nonexisting files have an all-zero checksum. */ for (s = sha1; *s; s++) if (*s != '0') break; if (! *s) return 2; /* Empty files have empty_sha1 as their checksum...
null
0
sha1_says_nonexistent(char const *sha1) { char const *empty_sha1 = "e69de29bb2d1d6434b8b29ae775ad8c2e48c5391"; char const *s; /* Nonexisting files have an all-zero checksum. */ for (s = sha1; *s; s++) if (*s != '0') break; if (! *s) return 2; /* Empty files have empty_sha1 as their checksum...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,166
skip_to (file_offset file_pos, lin file_line) { FILE *i = pfp; FILE *o = stdout; int c; assert(p_base <= file_pos); if ((verbosity == VERBOSE || !inname) && p_base < file_pos) { Fseek (i, p_base, SEEK_SET); say ("The text leading up to this was:\n--------------------------\n"); while (file_tell...
null
0
skip_to (file_offset file_pos, lin file_line) { FILE *i = pfp; FILE *o = stdout; int c; assert(p_base <= file_pos); if ((verbosity == VERBOSE || !inname) && p_base < file_pos) { Fseek (i, p_base, SEEK_SET); say ("The text leading up to this was:\n--------------------------\n"); while (file_tell...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,167
there_is_another_patch (bool need_header, mode_t *file_type) { if (p_base != 0 && p_base >= p_filesize) { if (verbosity == VERBOSE) say ("done\n"); return false; } if (verbosity == VERBOSE) say ("Hmm..."); diff_type = intuit_diff_type (need_header, file_type); if (diff_type == NO_DIFF) { if...
null
0
there_is_another_patch (bool need_header, mode_t *file_type) { if (p_base != 0 && p_base >= p_filesize) { if (verbosity == VERBOSE) say ("done\n"); return false; } if (verbosity == VERBOSE) say ("Hmm..."); diff_type = intuit_diff_type (need_header, file_type); if (diff_type == NO_DIFF) { if...
@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname, *outname_needs_removal = true; copy_file (inname, outname, 0, exclusive, instat.st_mode, true); } - sprintf (buf, "%s %s%s", editor_program, - verbosity == VERBOSE ? "" : "- ", - outname); fflush (stdout); pid = fork(...
CWE-78
null
null
2,168
get_input_file (char const *filename, char const *outname, mode_t file_type) { bool elsewhere = strcmp (filename, outname) != 0; char const *cs; char *diffbuf; char *getbuf; if (inerrno == -1) inerrno = stat_file (filename, &instat); /* Perhaps look for RCS or SCCS versions. */ if (...
null
0
get_input_file (char const *filename, char const *outname, mode_t file_type) { bool elsewhere = strcmp (filename, outname) != 0; char const *cs; char *diffbuf; char *getbuf; if (inerrno == -1) inerrno = stat_file (filename, &instat); /* Perhaps look for RCS or SCCS versions. */ if (...
@@ -238,8 +238,13 @@ plan_a (char const *filename) { if (S_ISREG (instat.st_mode)) { - int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); + int flags = O_RDONLY | binary_transput; size_t buffered = 0, n; + int ifd; + + if (! follow_symlinks) + flags |= O_NOFOLLOW; + ifd ...
CWE-59
null
null
2,169
lines_too_long (char const *filename) { fatal ("Lines in file %s are too long", quotearg (filename)); }
null
0
lines_too_long (char const *filename) { fatal ("Lines in file %s are too long", quotearg (filename)); }
@@ -238,8 +238,13 @@ plan_a (char const *filename) { if (S_ISREG (instat.st_mode)) { - int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); + int flags = O_RDONLY | binary_transput; size_t buffered = 0, n; + int ifd; + + if (! follow_symlinks) + flags |= O_NOFOLLOW; + ifd ...
CWE-59
null
null
2,170
re_input (void) { if (using_plan_a) { if (i_buffer) { free (i_buffer); i_buffer = 0; free (i_ptr); } } else { if (tifd >= 0) close (tifd); tifd = -1; if (tibuf[0]) { free (tibuf[0]); tibuf[0] = 0; } tiline[0] = tiline[1] = -1; tireclen = 0; } }
null
0
re_input (void) { if (using_plan_a) { if (i_buffer) { free (i_buffer); i_buffer = 0; free (i_ptr); } } else { if (tifd >= 0) close (tifd); tifd = -1; if (tibuf[0]) { free (tibuf[0]); tibuf[0] = 0; } tiline[0] = tiline[1] = -1; tireclen = 0; } }
@@ -238,8 +238,13 @@ plan_a (char const *filename) { if (S_ISREG (instat.st_mode)) { - int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); + int flags = O_RDONLY | binary_transput; size_t buffered = 0, n; + int ifd; + + if (! follow_symlinks) + flags |= O_NOFOLLOW; + ifd ...
CWE-59
null
null
2,171
report_revision (bool found_revision) { char const *rev = quotearg (revision); if (found_revision) { if (verbosity == VERBOSE) say ("Good. This file appears to be the %s version.\n", rev); } else if (force) { if (verbosity != SILENT) say ("Warning: this file doesn't appear to be the %s...
null
0
report_revision (bool found_revision) { char const *rev = quotearg (revision); if (found_revision) { if (verbosity == VERBOSE) say ("Good. This file appears to be the %s version.\n", rev); } else if (force) { if (verbosity != SILENT) say ("Warning: this file doesn't appear to be the %s...
@@ -238,8 +238,13 @@ plan_a (char const *filename) { if (S_ISREG (instat.st_mode)) { - int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); + int flags = O_RDONLY | binary_transput; size_t buffered = 0, n; + int ifd; + + if (! follow_symlinks) + flags |= O_NOFOLLOW; + ifd ...
CWE-59
null
null
2,172
too_many_lines (char const *filename) { fatal ("File %s has too many lines", quotearg (filename)); }
null
0
too_many_lines (char const *filename) { fatal ("File %s has too many lines", quotearg (filename)); }
@@ -238,8 +238,13 @@ plan_a (char const *filename) { if (S_ISREG (instat.st_mode)) { - int ifd = safe_open (filename, O_RDONLY|binary_transput, 0); + int flags = O_RDONLY | binary_transput; size_t buffered = 0, n; + int ifd; + + if (! follow_symlinks) + flags |= O_NOFOLLOW; + ifd ...
CWE-59
null
null
2,173
Fseek (FILE *stream, file_offset offset, int ptrname) { if (file_seek (stream, offset, ptrname) != 0) pfatal ("fseek"); }
null
0
Fseek (FILE *stream, file_offset offset, int ptrname) { if (file_seek (stream, offset, ptrname) != 0) pfatal ("fseek"); }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,174
__insert_file_id (struct stat const *st, enum file_id_type type) { file_id *p; static file_id *next_slot; if (!next_slot) next_slot = xmalloc (sizeof *next_slot); next_slot->dev = st->st_dev; next_slot->ino = st->st_ino; next_slot->queued_output = false; p = hash_insert (file_id_table, next_s...
null
0
__insert_file_id (struct stat const *st, enum file_id_type type) { file_id *p; static file_id *next_slot; if (!next_slot) next_slot = xmalloc (sizeof *next_slot); next_slot->dev = st->st_dev; next_slot->ino = st->st_ino; next_slot->queued_output = false; p = hash_insert (file_id_table, next_s...
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,175
contains_slash (const char *s) { for (; *s; s++) if (ISSLASH(*s)) return true; return false; }
null
0
contains_slash (const char *s) { for (; *s; s++) if (ISSLASH(*s)) return true; return false; }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,176
copy_attr (char const *src_path, char const *dst_path) { struct error_context ctx = { .error = copy_attr_error, .quote = copy_attr_quote, .quote_free = copy_attr_free }; /* FIXME: We are copying between files we know we can safely access by * pathname. A safe_ version of attr_copy_file() might st...
null
0
copy_attr (char const *src_path, char const *dst_path) { struct error_context ctx = { .error = copy_attr_error, .quote = copy_attr_quote, .quote_free = copy_attr_free }; /* FIXME: We are copying between files we know we can safely access by * pathname. A safe_ version of attr_copy_file() might st...
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,177
copy_attr (char const *src_path, char const *dst_path) { return 0; }
null
0
copy_attr (char const *src_path, char const *dst_path) { return 0; }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,178
copy_attr_check (const char *name, struct error_context *ctx) { int action = attr_copy_action (name, ctx); return action == 0 || action == ATTR_ACTION_PERMISSIONS; }
null
0
copy_attr_check (const char *name, struct error_context *ctx) { int action = attr_copy_action (name, ctx); return action == 0 || action == ATTR_ACTION_PERMISSIONS; }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,179
copy_attr_error (struct error_context *ctx, char const *fmt, ...) { int err = errno; va_list ap; if (err != ENOSYS && err != ENOTSUP && err != EPERM) { /* use verror module to print error message */ va_start (ap, fmt); verror (0, err, fmt, ap); va_end (ap); } }
null
0
copy_attr_error (struct error_context *ctx, char const *fmt, ...) { int err = errno; va_list ap; if (err != ENOSYS && err != ENOTSUP && err != EPERM) { /* use verror module to print error message */ va_start (ap, fmt); verror (0, err, fmt, ap); va_end (ap); } }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,180
copy_attr_free (struct error_context *ctx, char const *str) { }
null
0
copy_attr_free (struct error_context *ctx, char const *str) { }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,181
copy_attr_quote (struct error_context *ctx, char const *str) { return quotearg (str); }
null
0
copy_attr_quote (struct error_context *ctx, char const *str) { return quotearg (str); }
@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original) try_makedirs_errno = ENOENT; safe_unlink (bakname); - while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0) + while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)...
CWE-59
null
null
2,182
_dbus_header_cache_check (DBusHeader *header, int field) { _dbus_assert (field <= DBUS_HEADER_FIELD_LAST); if (header->fields[field].value_pos == _DBUS_HEADER_FIELD_VALUE_UNKNOWN) _dbus_header_cache_revalidate (header); if (header->fields[field].value_pos == _DBUS_HEA...
DoS +Info
0
_dbus_header_cache_check (DBusHeader *header, int field) { _dbus_assert (field <= DBUS_HEADER_FIELD_LAST); if (header->fields[field].value_pos == _DBUS_HEADER_FIELD_VALUE_UNKNOWN) _dbus_header_cache_revalidate (header); if (header->fields[field].value_pos == _DBUS_HEA...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,183
_dbus_header_cache_invalidate_all (DBusHeader *header) { int i; i = 0; while (i <= DBUS_HEADER_FIELD_LAST) { header->fields[i].value_pos = _DBUS_HEADER_FIELD_VALUE_UNKNOWN; ++i; } }
DoS +Info
0
_dbus_header_cache_invalidate_all (DBusHeader *header) { int i; i = 0; while (i <= DBUS_HEADER_FIELD_LAST) { header->fields[i].value_pos = _DBUS_HEADER_FIELD_VALUE_UNKNOWN; ++i; } }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,184
_dbus_header_cache_known_nonexistent (DBusHeader *header, int field) { _dbus_assert (field <= DBUS_HEADER_FIELD_LAST); return (header->fields[field].value_pos == _DBUS_HEADER_FIELD_VALUE_NONEXISTENT); }
DoS +Info
0
_dbus_header_cache_known_nonexistent (DBusHeader *header, int field) { _dbus_assert (field <= DBUS_HEADER_FIELD_LAST); return (header->fields[field].value_pos == _DBUS_HEADER_FIELD_VALUE_NONEXISTENT); }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,185
_dbus_header_cache_one (DBusHeader *header, int field_code, DBusTypeReader *variant_reader) { header->fields[field_code].value_pos = _dbus_type_reader_get_value_pos (variant_reader); #if 0 _dbus_verbose ("cached value_pos %d for field %d\n", ...
DoS +Info
0
_dbus_header_cache_one (DBusHeader *header, int field_code, DBusTypeReader *variant_reader) { header->fields[field_code].value_pos = _dbus_type_reader_get_value_pos (variant_reader); #if 0 _dbus_verbose ("cached value_pos %d for field %d\n", ...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,186
_dbus_header_cache_revalidate (DBusHeader *header) { DBusTypeReader array; DBusTypeReader reader; int i; i = 0; while (i <= DBUS_HEADER_FIELD_LAST) { header->fields[i].value_pos = _DBUS_HEADER_FIELD_VALUE_NONEXISTENT; ++i; } _dbus_type_reader_init (&reader, he...
DoS +Info
0
_dbus_header_cache_revalidate (DBusHeader *header) { DBusTypeReader array; DBusTypeReader reader; int i; i = 0; while (i <= DBUS_HEADER_FIELD_LAST) { header->fields[i].value_pos = _DBUS_HEADER_FIELD_VALUE_NONEXISTENT; ++i; } _dbus_type_reader_init (&reader, he...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,187
_dbus_header_copy (const DBusHeader *header, DBusHeader *dest) { *dest = *header; if (!_dbus_string_init_preallocated (&dest->data, _dbus_string_get_length (&header->data))) return FALSE; if (!_dbus_string_copy (&header->data, 0, &dest->data, 0...
DoS +Info
0
_dbus_header_copy (const DBusHeader *header, DBusHeader *dest) { *dest = *header; if (!_dbus_string_init_preallocated (&dest->data, _dbus_string_get_length (&header->data))) return FALSE; if (!_dbus_string_copy (&header->data, 0, &dest->data, 0...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,188
_dbus_header_create (DBusHeader *header, int message_type, const char *destination, const char *path, const char *interface, const char *member, const char *error_name) { unsign...
DoS +Info
0
_dbus_header_create (DBusHeader *header, int message_type, const char *destination, const char *path, const char *interface, const char *member, const char *error_name) { unsign...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,189
_dbus_header_delete_field (DBusHeader *header, int field) { DBusTypeReader reader; DBusTypeReader realign_root; if (_dbus_header_cache_known_nonexistent (header, field)) return TRUE; /* nothing to do */ /* Scan to the field we want, delete and realign, reappend * padd...
DoS +Info
0
_dbus_header_delete_field (DBusHeader *header, int field) { DBusTypeReader reader; DBusTypeReader realign_root; if (_dbus_header_cache_known_nonexistent (header, field)) return TRUE; /* nothing to do */ /* Scan to the field we want, delete and realign, reappend * padd...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,190
_dbus_header_get_flag (DBusHeader *header, dbus_uint32_t flag) { const unsigned char *flags_p; flags_p = _dbus_string_get_const_data_len (&header->data, FLAGS_OFFSET, 1); return (*flags_p & flag) != 0; }
DoS +Info
0
_dbus_header_get_flag (DBusHeader *header, dbus_uint32_t flag) { const unsigned char *flags_p; flags_p = _dbus_string_get_const_data_len (&header->data, FLAGS_OFFSET, 1); return (*flags_p & flag) != 0; }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,191
_dbus_header_get_message_type (DBusHeader *header) { int type; type = _dbus_string_get_byte (&header->data, TYPE_OFFSET); _dbus_assert (type != DBUS_MESSAGE_TYPE_INVALID); return type; }
DoS +Info
0
_dbus_header_get_message_type (DBusHeader *header) { int type; type = _dbus_string_get_byte (&header->data, TYPE_OFFSET); _dbus_assert (type != DBUS_MESSAGE_TYPE_INVALID); return type; }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,192
_dbus_header_get_serial (DBusHeader *header) { return _dbus_marshal_read_uint32 (&header->data, SERIAL_OFFSET, header->byte_order, NULL); }
DoS +Info
0
_dbus_header_get_serial (DBusHeader *header) { return _dbus_marshal_read_uint32 (&header->data, SERIAL_OFFSET, header->byte_order, NULL); }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,193
_dbus_header_have_message_untrusted (int max_message_length, DBusValidity *validity, int *byte_order, int *fields_array_len, ...
DoS +Info
0
_dbus_header_have_message_untrusted (int max_message_length, DBusValidity *validity, int *byte_order, int *fields_array_len, ...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,194
_dbus_header_init (DBusHeader *header, int byte_order) { if (!_dbus_string_init_preallocated (&header->data, 32)) return FALSE; _dbus_header_reinit (header, byte_order); return TRUE; }
DoS +Info
0
_dbus_header_init (DBusHeader *header, int byte_order) { if (!_dbus_string_init_preallocated (&header->data, 32)) return FALSE; _dbus_header_reinit (header, byte_order); return TRUE; }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,195
_dbus_header_reinit (DBusHeader *header, int byte_order) { _dbus_string_set_length (&header->data, 0); header->byte_order = byte_order; header->padding = 0; _dbus_header_cache_invalidate_all (header); }
DoS +Info
0
_dbus_header_reinit (DBusHeader *header, int byte_order) { _dbus_string_set_length (&header->data, 0); header->byte_order = byte_order; header->padding = 0; _dbus_header_cache_invalidate_all (header); }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,196
_dbus_header_set_field_basic (DBusHeader *header, int field, int type, const void *value) { _dbus_assert (field <= DBUS_HEADER_FIELD_LAST); if (!reserve_header_padding (header)) ret...
DoS +Info
0
_dbus_header_set_field_basic (DBusHeader *header, int field, int type, const void *value) { _dbus_assert (field <= DBUS_HEADER_FIELD_LAST); if (!reserve_header_padding (header)) ret...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,197
_dbus_header_set_serial (DBusHeader *header, dbus_uint32_t serial) { /* we use this function to set the serial on outgoing * messages, and to reset the serial in dbus_message_copy; * this assertion should catch a double-set on outgoing. */ _dbus_assert (_dbus_header_get_serial ...
DoS +Info
0
_dbus_header_set_serial (DBusHeader *header, dbus_uint32_t serial) { /* we use this function to set the serial on outgoing * messages, and to reset the serial in dbus_message_copy; * this assertion should catch a double-set on outgoing. */ _dbus_assert (_dbus_header_get_serial ...
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,198
_dbus_header_update_lengths (DBusHeader *header, int body_len) { _dbus_marshal_set_uint32 (&header->data, BODY_LENGTH_OFFSET, body_len, header->byte_order); }
DoS +Info
0
_dbus_header_update_lengths (DBusHeader *header, int body_len) { _dbus_marshal_set_uint32 (&header->data, BODY_LENGTH_OFFSET, body_len, header->byte_order); }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null
2,199
_dbus_marshal_header_test (void) { return TRUE; }
DoS +Info
0
_dbus_marshal_header_test (void) { return TRUE; }
@@ -1468,14 +1468,20 @@ void _dbus_header_byteswap (DBusHeader *header, int new_order) { + unsigned char byte_order; + if (header->byte_order == new_order) return; + byte_order = _dbus_string_get_byte (&header->data, BYTE_ORDER_OFFSET); + _dbus_assert (header->byte_order =...
CWE-20
null
null