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.
This commit is contained in:
parent
2d4ae52cbd
commit
2eafd19dfa
@ -328,7 +328,6 @@ int rust_get_argv_zero(void* p, size_t* sz)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(p, 0, len);
|
|
||||||
memcpy(p, argv[0], len);
|
memcpy(p, argv[0], len);
|
||||||
free(argv);
|
free(argv);
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user