Skip to content

Crash on free of temporary buffer s in zchko #21

@Pleune

Description

@Pleune

At

ckermit/ckufio.c

Line 2832 in cbe8041

if (s) free(s); /* Free temporary storage */

I'm trying to run this on a super constrained linux riscv/musl system and run into this. Interestingly on my x86-64 system, I don't get a crash. I ran out of time to do a proper root-cause... I will update if I figure out more at some point. For now I just know that the last debug log I get is the access ok above, and then segfault. If I comment out the free everything works great.

log from get asd.txt

<snip>
DECODE
zstrip before[d.txt]
zstrip after tilde=stripping[d.txt]
zstrip after[d.txt]
rcvfil cmarg2[]
rcvfil srvcmd 2[asd.txt]
zchko entry[asd.txt]
zchko setroot[]=0
zchko len[asd.txt]=7
zchko zchkod[asd.txt]=0
isdir entry[asd.txt]
isdir stat[asd.txt]=-1
isdir errno=2
zchko attempting to open[asd.txt]
zchko open mode[asd.txt]=2048
zchko open[asd.txt]=-1
zchko open errno=2
zchko i=-1
zchko itsadir=0
zchko access ok: [.] =0
<segfault>

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