-
Notifications
You must be signed in to change notification settings - Fork 42
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
Fixed unsafe string dup behaviour. #153
Conversation
@alvin1221 plz fix related unsafe strcmp |
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #153 +/- ##
==========================================
+ Coverage 61.42% 61.46% +0.03%
==========================================
Files 99 99
Lines 26480 26484 +4
==========================================
+ Hits 16266 16278 +12
+ Misses 10214 10206 -8
... and 20 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
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.
alvin thank lee
{ | ||
topic_qos[index].topic.buf = (uint8_t *) nni_strdup(topic_name); | ||
topic_qos[index].topic.length = (uint32_t) strlen(topic_name); | ||
topic_qos[index].topic.buf = (uint8_t *) nni_alloc(len * sizeof(uint8_t)); |
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.
Why not just use function strndup()?
No description provided.