nihilowy / surfer

Simple keyboard based web browser
GNU General Public License v2.0
71 stars 9 forks source link

Buffer overflow #19

Closed sdsddsd1 closed 4 years ago

sdsddsd1 commented 4 years ago

Since commit 6e22c3362cf8de69fd4113a5f879853354e5e9a4 surfer refuses to start with a "bufferoverflow" on my musl based linux.

nihilowy commented 4 years ago

well I tried to compile it ona arch but : musl-gcc -Wno-deprecated-declarations -o surfer surfer.c \ pkg-config --cflags --libs gtk+-3.0 glib-2.0 webkit2gtk-4.0 \ -DEXTENSION_DIR=\"/usr/lib/surfer/\" \ -DDEBUG=0 -lm /usr/bin/ld: cannot find -lwebkit2gtk-4.0 /usr/bin/ld: cannot find -lgtk-3 /usr/bin/ld: cannot find -lgdk-3 /usr/bin/ld: cannot find -lz /usr/bin/ld: cannot find -lpangocairo-1.0 /usr/bin/ld: cannot find -lpango-1.0 /usr/bin/ld: cannot find -lharfbuzz /usr/bin/ld: cannot find -latk-1.0 /usr/bin/ld: cannot find -lcairo-gobject /usr/bin/ld: cannot find -lcairo /usr/bin/ld: cannot find -lgdk_pixbuf-2.0 /usr/bin/ld: cannot find -lsoup-2.4 /usr/bin/ld: cannot find -lgio-2.0 /usr/bin/ld: cannot find -ljavascriptcoregtk-4.0 /usr/bin/ld: cannot find -lgobject-2.0 /usr/bin/ld: cannot find -lglib-2.0

sdsddsd1 commented 4 years ago

"possible fix" does not fix my problem. But, changing to root does make the browser start (: I am not sure how to make something with musl on a glibc system. I think you might need those libraries also linked against musl?

nihilowy commented 4 years ago

well I should read about it, makefile made me lazy. But probably it doesnt make sense because, webkit2gtk and other libs should also be compilled with musl. But if on root account it works - so maybe problem is somewhre else ? ulimit ? idk

nihilowy commented 4 years ago

ok for curiosity I installed alpine linux . surfer compiled and works normal. maybe problem relates to docker/container but I havent tested it. If you got this communicate : Buffer overflow detected. its remove_newline .function . Try to comment its call : 1532 while (fgets (buf, sizeof (buf), f> 1533 { 1534 // remove_newline(buf); 1535 key = strtok (buf, "=");

setting css wont work then.

sdsddsd1 commented 4 years ago

Yes the complete error message it returns is Buffer overflow detected. Commenting out line 1534 makes surfer start again and it works so far without error.
I think to look into the direction of ulimit is unlikely because it has worked before on my standard settings, as do monster programs like firefox.

nihilowy commented 4 years ago

again forget about it .just remove .surfer/tablecss.txt

sdsddsd1 commented 4 years ago

Yes removing tablecss.txt also works. So the issue for me personal is fixed. Thanks!
Do you want to investigate more or shell we close the issue? Greetings

nihilowy commented 4 years ago

ok thx