summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2006-09-02 19:01:35 +0000
committerSimon Howard2006-09-02 19:01:35 +0000
commit27b9f8bdac5b224615bec43cc15e758a7a6ef601 (patch)
tree053ed1526765f8ae9644534d95bf67563f846a2d /src
parent99f836fcb772f4720066975d79909719b03398c8 (diff)
downloadchocolate-doom-27b9f8bdac5b224615bec43cc15e758a7a6ef601.tar.gz
chocolate-doom-27b9f8bdac5b224615bec43cc15e758a7a6ef601.tar.bz2
chocolate-doom-27b9f8bdac5b224615bec43cc15e758a7a6ef601.zip
Don't allow \0 in dehacked strings read with DEH_ReadLine.
Subversion-branch: /trunk/chocolate-doom Subversion-revision: 594
Diffstat (limited to 'src')
-rw-r--r--src/deh_io.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/deh_io.c b/src/deh_io.c
index 65185ea1..5fd2b546 100644
--- a/src/deh_io.c
+++ b/src/deh_io.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: deh_io.c 175 2005-10-08 20:54:16Z fraggle $
+// $Id: deh_io.c 594 2006-09-02 19:01:35Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -163,6 +163,11 @@ char *DEH_ReadLine(deh_context_t *context)
return NULL;
}
+ if (c == '\0')
+ {
+ return NULL;
+ }
+
// cope with lines of any length: increase the buffer size
if (pos >= context->readbuffer_size)