kuvaus / LlamaGPTJ-chat

Simple chat program for LLaMa, GPT-J, and MPT models.
MIT License
216 stars 50 forks source link

handle buffer alloc errors and quoted tilde #18

Closed mjholub closed 1 year ago

mjholub commented 1 year ago

I've run into an issue where using the quoted tilde, which doesn't expand in quotation marks instead of $HOME causes boundary errors and a segfault with no meaningful core dump. This is an attempt to fix this issue. Alternatively some early return can be used if the argument contains a tilde, or the program should handle rewriting the tilde into $HOME

kuvaus commented 1 year ago

Thank you a lot! Great stuff. :) Fixing the path string to behave properly and handling buffer allocation errors are important fixes.