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

错误使用strcpy_s #19

@tearshark

Description

@tearshark

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions