-
Notifications
You must be signed in to change notification settings - Fork 549
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
solving out of boundaries vulnerability #3464
base: master
Are you sure you want to change the base?
solving out of boundaries vulnerability #3464
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. @dgsudharsan , please review
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove extra line
@@ -2150,11 +2150,15 @@ string RouteSync::getNextHopIf(struct rtnl_route *route_obj) | |||
char if_name[IFNAMSIZ] = "0"; | |||
|
|||
/* If we cannot get the interface name */ | |||
if (!getIfName(if_index, if_name, IFNAMSIZ)) | |||
if (!getIfName(if_index, if_name, IFNAMSIZ)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix alignment
What I did
replaced strcpy with strncpy and added last element of the string to be null
Why I did it
to ensure that the string will not get out of boundaries and to ensure last element of the string will be null
How I verified it
by using scurity tool (checkmarx) as it give it to me as vulnerability and by these edits vulnerability was solved