You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/12/20 05:51:47 UTC

[GitHub] [tvm] gussmith23 opened a new pull request #9775: Include \0 terminating character in strncpy

gussmith23 opened a new pull request #9775:
URL: https://github.com/apache/tvm/pull/9775


   I'm fairly certain that this bugfix is correct, but please check my code. I'm not sure how this hasn't caused more problems for people! Perhaps the malloced memory is usually filled with 0s? Either way, on my system, the malloced memory was NOT all 0s, and so when we would copy the `key.size()` valid characters of `key` into `*out_type_key`, it was likely that the next character was not 0, and thus, because no terminator was copied over, the string wouldn't be terminated correctly. This fix ensures the terminator gets copied over, by copying `key.size() + 1` characters.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [tvm] tqchen merged pull request #9775: Include \0 terminating character in strncpy

Posted by GitBox <gi...@apache.org>.
tqchen merged pull request #9775:
URL: https://github.com/apache/tvm/pull/9775


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org