nihilowy/surfer

Buffer overflow

Closed this issue · 8 comments

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

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

"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?

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

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.

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.

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

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

ok thx