skyjake / lagrange

A Beautiful Gemini Client
https://gmi.skyjake.fi/lagrange/
BSD 2-Clause "Simplified" License
1.22k stars 65 forks source link

Segfault when popen errors due to missing error handling #694

Open sertonix opened 2 weeks ago

sertonix commented 2 weeks ago

When the popen call in lib/sealcurses/src/video.c#L45 errors it returns NULL. Since there is no error checking the NULL is passed to fgetc and can cause a segfault (at least on musl libc).

(Hope this is enough information to fix the issue.)

skyjake commented 1 week ago

Seems easy enough to fix. I'll include this in the next patch.