Skip to content

the preprocessing buffer code is VERY bad #39

@berndbischl

Description

@berndbischl

these lines

SEXP c_rd_preproc(SEXP s_path_in, SEXP s_path_out, SEXP s_data_sect_index) {

FILE* handle_in;
FILE* handle_out;
const char* path_in = CHAR(asChar(s_path_in));
const char* path_out = CHAR(asChar(s_path_out));
int data_sect_index = asInteger(s_data_sect_index);
char line_buf_1[400000];
char line_buf_2[400000];

can obviously lead to buffer overflows for very long lines. that is VERY BAD code.
at least we should do a check, but we should likely alloc mem here dynamically.

see issue #37 for where this problem already occured

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions