leahneukirchen / mblaze

Unix utilities to deal with Maildir
Other
441 stars 48 forks source link

mpick: Freeing of pointer returned by getenv causes memory errors #177

Closed julianrother closed 4 years ago

julianrother commented 4 years ago

With 95a9c08 mpick started crashing with memory errors (segfaults with musl-libc, aborts with glibc) when environment variables were used in test expressions. This is caused by the return value of getenv() being treated the same way as memory allocated with malloc/xstrdup/..., including being passed to free().

Duncaen commented 4 years ago

Thanks LGTM.