Earlier quoted context omitted.
Interesting that babble.c doesn't compile (with gcc 14): babble.c: In function ‘main’: babble.c:651:40: error: passing argument 1 of ‘pthread_detach’ makes integer from pointer without a cast [-Wint-conversion] 651 | pthread_detach(&thread); | ^~~~~~~ | | | pthread_t * {aka long unsigned int *} In file included from babble.c:77: /usr/include/pthread.h:269:38: note: expected ‘pthread_t’ {aka ‘long unsigned int’} but a…
Sorry about that, stupid mistake on my side. I've fix the version on the server, an you can just edit the line to "pthread_detach(thread);" The snprintf() is only part of a status page, so you can remove it if you want. As for the threads, that could be an issue if directly exposed to the internet: All it would take for an attacker to open a whole a whole bunch of connections and never send anything to OOM the proces…
Chant with me:
-Werror=all -Werror=extra -pedantic
Chant with me.Also, stop using C. Use C++. You can use it just like C, but you can also learn some of the guardrails that C++ provides.