forked from sonic-net/sonic-buildimage
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change gAsicInstance to type string with max length limit (sonic-net#…
…1526) **What I did** 1. Change gAsicInstance to type string with max length limit 2. Replace malloc with calloc to prevent risk of integer overflow, in test code **Why I did it** 1. Remove `calloc` manual memory management. 2. Graceful release memory before exiting. 3. Save memory if input is very long **How I verified it** Ad-hoc test with different input arguments.
- Loading branch information
1 parent
c7ee75f
commit 64576f0
Showing
2 changed files
with
18 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters