Skip to content

[BUG] run error #1569

@luyuduan

Description

@luyuduan

Description

code_open/C-master/misc/run_length_encoding.c

char* compacted_string = malloc(strlen(encoded));
modified to
char* compacted_string = malloc(strlen(encoded) + 1);

assert(!strcmp(test, "1l1i1d1j1h1v1i1p1d1u1r1e1v1b1e1i1r1b1g1i1p1e1a1h1a1p1o1e1u1" "h1w1a1i1p1e1f1u1p1w1i1e1o1f1bq"));
modified to
assert(!strcmp(test, "1l1i1d1j1h1v1i1p1d1u1r1e1v1b1e1i1r1b1g1i1p1e1a1h1a1p1o1e1u1" "h1w1a1i1p1e1f1u1p1w1i1e1o1f1b"));

Expected behavior

Running normally

Actual behavior

ABORTING

Possible fix

No response

Steps to reproduce

None

Context

None

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions