- rename the message argument of NET_SVC_*_Parse to msg
- rename the other argument to block, for brevity
- convert svc_spawnstaticsound
- convert svc_serverinfo
- convert svc_playerinfo
- fix a exploitable buffer overflow with svc_lightstyle
give mst_t a buffer to hold unterminated message strings
kill MSG_ReadStaticString and MSG_ReadStringLine
msg.c:
kill MSG_ReadStaticString and MSG_ReadStringLine
MSG_ReadString: implement the buffer for unterminated message strings
and update readcount on badread
cl_main.c:
go back to MSG_ReadString and fix up the resulting const char * issues
cl_parse.c:
rewrite the cl_mofake code all because of an uninitialized variable :)
sv_main.c:
use MSG_ReadString instead of MSG_ReadStringLine because
Cmd_TokenizeString really doesn't care about a terminating \n
directly into the packet data.
- change a bunch of char *'s to const char *'s for the above. Only
thing that had trouble was the cl_nofake handler, which I changed to
use a local buffer.
- add MSG_ReadStaticString which acts like the old MSG_ReadString,
specifically that it uses a static buffer and tollerates
unterminated strings.
- add a Q_strnlen function, and make strnlen use it if strnlen is
undefined.
- Add a net_svc.h and net_svc.c which will preparse svc messages into
structs, for easier handling. Currently only soundlist and
modellist are done.
(1), or causes a fatal error (2) when the progs remove an already
removed entity. default is 1.
- fix a segfault in FFnickFF parsing that causes a segfault
segfault if your first call was with "". Probably could cause
crashes too
- add a string.c file to libQFutil, with a Q_strcasestr function,
which strcasestr is defined to if it's not already defined. (we'd
get that with glibc if we defined __USE_GNU, but we don't)
- make client_t and SV_ExtractFromUserinfo both use NAME_MAX for
their name arrays, instead of 32 for one and 80 for the other
- rewrite almost all of SV_ExtractFromUserinfo's name handling.
- \r, \n, and \t are all converted to spaces
- leading/trailing spaces are stripped
- consecutive spaces are reduced to a single space
- empty names are considered bad
- user-* nicks are considered bad (unless forced to them)
- a name containing console or admin is considered bad
- a name that already exists is considered bad
- if they have a bad name it gets forced to user-%d, where %d is
their userid
- netname in the progs is now updated properly
- name changes are always reported unless it's the initial setting,
rather than only if they're full connected and not a spectator
- finally, if the name change fails (info string exceeded), give
them the boot. (before this was only done for duplicate names)
That's about it :)