summaryrefslogtreecommitdiff
path: root/src/m_argv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/m_argv.c')
-rw-r--r--src/m_argv.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/m_argv.c b/src/m_argv.c
index 78404d35..7fc15863 100644
--- a/src/m_argv.c
+++ b/src/m_argv.c
@@ -89,12 +89,17 @@ static void LoadResponseFile(int argv_index)
size = M_FileLength(handle);
// Read in the entire file
- // Allocate one byte extra - this is incase there is an argument
+ // Allocate one byte extra - this is in case there is an argument
// at the end of the response file, in which case a '\0' will be
// needed.
file = malloc(size + 1);
- fread(file, size, 1, handle);
+
+ if (fread(file, 1, size, handle) < size)
+ {
+ I_Error("Failed to read entire response file");
+ }
+
fclose(handle);
// Create new arguments list array