Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shouldn't assign file_p to the return address in _dmalloc_chunk_read_info #103

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions chunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1892,18 +1892,14 @@ int _dmalloc_chunk_read_info(const void *user_pnt, const char *where,
/* write info back to user space */
SET_POINTER(user_size_p, slot_p->sa_user_size);
SET_POINTER(alloc_size_p, slot_p->sa_total_size);
if (slot_p->sa_file == DMALLOC_DEFAULT_FILE) {
SET_POINTER(file_p, NULL);
}
else {
SET_POINTER(file_p, (char *)slot_p->sa_file);
}
SET_POINTER(line_p, slot_p->sa_line);
/* if the line is blank then the file will be 0 or the return address */
if (slot_p->sa_line == DMALLOC_DEFAULT_LINE) {
SET_POINTER(file_p, NULL);
SET_POINTER(ret_attr_p, (char *)slot_p->sa_file);
}
else {
SET_POINTER(file_p, (char *)slot_p->sa_file);
SET_POINTER(ret_attr_p, NULL);
}
#if LOG_PNT_SEEN_COUNT
Expand Down