Skip to content
This repository has been archived by the owner on Nov 15, 2019. It is now read-only.

错误使用strcpy_s #19

Open
tearshark opened this issue Dec 1, 2017 · 0 comments
Open

错误使用strcpy_s #19

tearshark opened this issue Dec 1, 2017 · 0 comments

Comments

@tearshark
Copy link

multipart_parser* multipart_parser_init
(const char boundary, const multipart_parser_settings settings) {

size_t boundary_length = strlen(boundary);
multipart_parser* p = malloc(sizeof(multipart_parser) +
boundary_length +
boundary_length + 9);

strcpy_s(p->multipart_boundary, boundary_length, boundary);

boundary_length 这个参数给得有问题,应该是boundary_length + 1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant