Opened 11 years ago

Closed 11 years ago

#2168 closed defect (fixed)

Memory error in G_matrix_inverse

Reported by: stopkovae Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Default Version: svn-trunk
Keywords: Cc:
CPU: x86-64 Platform: Linux

Description

Hi,

I would like to ask for error correction in G_matrix_inverse() function. It makes "free(): invalid next size (fast)" error.

I suggest replacing of

perm = (integer *) G_malloc(wmat->rows);
with
perm = (integer *) G_malloc(wmat->rows * sizeof(int));

in grass/trunk/lib/gmath/la.c (line 486).

Thank you in advance.

Eva

Change History (3)

comment:1 by huhabla, 11 years ago

Hi Eva, thank yout for the bug report. It should be fixed in r58748. Please test the changes.

comment:2 by StopkovaE, 11 years ago

Hi Soeren,

thank you for fixing, it works fine.

Eva

comment:3 by martinl, 11 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.