Skip to content

ReplaceStrncpy#4823

Merged
RandySheriffH merged 3 commits into
masterfrom
ReplaceStrncpy
Aug 17, 2020
Merged

ReplaceStrncpy#4823
RandySheriffH merged 3 commits into
masterfrom
ReplaceStrncpy

Conversation

@RandySheriffH

Copy link
Copy Markdown
Contributor

Replace strncpy with strlcpy to silence BinscopeForMac warning.

@RandySheriffH RandySheriffH requested a review from a team as a code owner August 17, 2020 16:03
@RandySheriffH RandySheriffH changed the title Replace strncpy ReplaceStrncpy Aug 17, 2020
Comment thread onnxruntime/core/session/onnxruntime_c_api.cc
#else
out[i][MAX_LEN] = '\0';
#elif defined(__APPLE__)
strlcpy(out[i], providers_available[i], MAX_LEN);

@snnn snnn Aug 17, 2020

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny comment: the last argument can be MAX_LEN+1. But it doesn't matter.

@RandySheriffH RandySheriffH merged commit 6a360ba into master Aug 17, 2020
@RandySheriffH RandySheriffH deleted the ReplaceStrncpy branch August 17, 2020 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants