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

Replace unsafe functions in iccpd #11694

Merged
merged 2 commits into from
Sep 13, 2022

Conversation

maipbui
Copy link
Contributor

@maipbui maipbui commented Aug 11, 2022

Why I did it

Replace unsafe functions in iccpd

How I did it

Replace memset() by zero initialization
Replace strtok() by strtok_r()

How to verify it

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012
  • 202106
  • 202111
  • 202205

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

src/iccpd/src/app_csm.c Outdated Show resolved Hide resolved
@qiluo-msft
Copy link
Collaborator

qiluo-msft commented Aug 11, 2022

int parse_rtattr_flags(struct rtattr *tb[], int max, struct rtattr *rta, int len, unsigned short flags)

This function is not used at all. We should remove the function.


In reply to: 1212522145


Refers to: src/iccpd/src/iccp_ifm.c:665 in fd4aa40. [](commit_id = fd4aa40cc81f669ce0dce4366e8dc4fd511d495e, deletion_comment = False)

@qiluo-msft qiluo-msft changed the title Replace unsafe functions in user code Replace unsafe functions in iccpd Aug 12, 2022
@maipbui maipbui marked this pull request as ready for review August 23, 2022 13:50
@maipbui maipbui requested a review from lguohan as a code owner August 23, 2022 13:50
Signed-off-by: maipbui <maibui@microsoft.com>
Signed-off-by: maipbui <maibui@microsoft.com>
@qiluo-msft
Copy link
Collaborator

@shine4chen @Praveen-Brcm @jianjundong Could you please help review?

@maipbui maipbui merged commit 7d1b99a into sonic-net:master Sep 13, 2022
@maipbui maipbui deleted the replace_unsafe_func_user branch September 13, 2022 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants