提交 2eafd19d 编写于 作者: M Michael McConville 提交者: Michael McConville

Remove a needless memset(). It's okay that we don't append NUL because len is...

Remove a needless memset(). It's okay that we don't append NUL because len is actually one more than the length of argv[0]. However, this is precarious and should probably be replaced with more robust logic.
上级 2d4ae52c
......@@ -328,7 +328,6 @@ int rust_get_argv_zero(void* p, size_t* sz)
return -1;
}
memset(p, 0, len);
memcpy(p, argv[0], len);
free(argv);
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册