diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 8615922de..6a0df77ab 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,6 +5,7 @@ D1X-Rebirth Changelog main/collide.c: Fit player/player collisions to not take damage from bump while remote player has possibly not aligned to the collision, yet; Added FORCE_DAMAGE_THRESHOLD for minimum force damage to receive from object bumps to not simply take damage from touching objects main/net_udp.c: Fixed one more copy/paste issue causeing positional updates relayed to possibly disconnected players include/vecmat.h, main/gameseg.c, main/multi.h, main/net_udp.c, main/net_udp.h, main/object.h, maths/vecmat.c: Optimization for quaternion structure: Stuffed orientation in shorts and removed figure out segnum by position - saving 10 bytes for each positional update in Multiplayer; Also removed render_type from pdata to save yet another byte +main/titles.c: fixed possible buffer overflow in load_screen_text() 20120525 -------- diff --git a/main/titles.c b/main/titles.c index b793d04da..d7451155b 100644 --- a/main/titles.c +++ b/main/titles.c @@ -351,10 +351,12 @@ void briefing_init(briefing *br, short level_num) int load_screen_text(char *filename, char **buf) { PHYSFS_file *tfile; - int len; - int have_binary = 0; + int len, have_binary = 0; + char *ext; - if (!d_stricmp(strrchr(filename, '.'), ".txb")) + if ((ext = strrchr(filename, '.')) == NULL) + return (0); + if (!d_stricmp(ext, ".txb")) have_binary = 1; if ((tfile = PHYSFSX_openReadBuffered(filename)) == NULL)