Skip to content

uninitialized memory access in grid.c:write_VTK_unstructured_Points #3

@mwestphal

Description

@mwestphal

After valgrind analysing, it appears there is access to uninitialized memory in
grid.c:write_VTK_unstructured_Points

Memory Use g[i].abun in a loop from 0 to par->ncell

par-ncell defined as par->pIntensity+par->sinkPoints;

g structures is correctly allocated with a size of par->pIntensity+par->sinkPoints

but g structures is not correctly initialized, a part of it is initialized only to par->pIntensity

I guess the fix is to initialized from 0 to par->pIntensity + par->sinkPoints like I propose in my pull request
#1

@christianbrinch is my fix correct ?

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