DrTimothyAldenDavis / SuiteSparse

The official SuiteSparse library: a suite of sparse matrix algorithms authored or co-authored by Tim Davis, Texas A&M University.
https://people.engr.tamu.edu/davis/suitesparse.html
Other
1.15k stars 259 forks source link

SPEXpy: invalid memory write by strcpy() #847

Closed svillemot closed 2 months ago

svillemot commented 3 months ago

On this line: https://github.com/DrTimothyAldenDavis/SuiteSparse/blob/26ababc7f3af725c5fb9168a1b94850eab74b666/SPEX/Python/SPEXpy/Source/spex_python_connect.c#L146

The buffer allocated is not large enough. One more byte needs to be allocated for the null terminal.

mmuetzel commented 3 months ago

Thank you for reporting this issue.

I opened #851 with the fix you pointed out.