Merge pull request #143 from xexyl/2006/birken

Fix segfault in 2006/birken under macOS
This commit is contained in:
Landon Curt Noll authored and GitHub committed 2023-03-24 16:00:19 -07:00
commit a23c8e2ed9
2 files changed
+5 -1

No files matched your search

+4
View File
@@ -18,6 +18,10 @@ make
./birken < file.tofu
```
[Cody Boone Ferguson](/winners.html#Cody_Boone_Ferguson) fixed a segfault in
macOS with this entry. The problem was a missing `+1` for strlen() with
malloc(). Thank you Cody for your assistance!
### Try:
```sh
+1 -1
View File
@@ -64,7 +64,7 @@ _=z->o; c=_->o->_; a= c->_->_->o; c=_
->c++; h(c); } Q Z(a->c<c->c){ a
->c++; h(a); } z=z->_; } } X*
v(X*_,int O){ X*s=(X*)m\
alloc(strlen(_)*siz\
alloc(1+strlen(_)*siz\
eof(X)); X*l=s;
J((*l++=*_?
*_-O:0)