rmyorston / pdpmake

Public domain POSIX make
https://frippery.org/make
Other
107 stars 11 forks source link

Fix null dereference #4

Closed aabacchus closed 2 years ago

aabacchus commented 2 years ago

To uncover the bug, do:

printf "%s\n" "X += " | make -f -

newq may be NULL but mp is still dereferenced for mp->m_simple. Add another check.

rmyorston commented 2 years ago

Good job spotting that! Patch applied, thank you.