Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upGuard against bad allocation calling rcl_arguments_copy() #367
Conversation
jacobperron
added some commits
Dec 20, 2018
jacobperron
added
the
in progress
label
Dec 22, 2018
jacobperron
added
in review
and removed
in progress
labels
Dec 22, 2018
sloretz
approved these changes
Jan 3, 2019
rcl/src/rcl/arguments.c Outdated
This comment has been minimized.
This comment has been minimized.
sloretz
approved these changes
Jan 3, 2019
jacobperron
merged commit 65bf34b
into
master
Jan 4, 2019
jacobperron
deleted the
fix_362
branch
Jan 4, 2019
jacobperron
removed
the
in review
label
Jan 4, 2019
clalancette
referenced this pull request
Jan 7, 2019
Closed
ROS 2 Crystal Clemmys Patch Release 1 #638
added a commit
to AAlon/rcl
that referenced
this pull request
Jan 8, 2019
added a commit
to AAlon/rcl
that referenced
this pull request
Jan 11, 2019
added a commit
to emersonknapp/rcl
that referenced
this pull request
Feb 13, 2019
added a commit
to emersonknapp/rcl
that referenced
this pull request
Feb 13, 2019
added a commit
to AAlon/rcl
that referenced
this pull request
Feb 13, 2019
added a commit
that referenced
this pull request
Feb 21, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
jacobperron commentedDec 22, 2018
•
edited
Closes #362
If the implementation of
malloc(0)
returnsNULL
thenrcl_arguments_copy()
will returnRCL_BAD_ALLOC
when the input hasargs->impl->num_unparsed_args == 0
orargs->impl->num_remap_rules == 0
.This raises another concern.
It doesn't appear that we have test cases for when
malloc(0)
returnsNULL
(which is a valid implementation). Perhaps we should have a CI job that overrides the default allocate function inrcutils
to uncover other bugs similar in nature to this one.