summaryrefslogtreecommitdiff
path: root/util/broadcom/secimage
diff options
context:
space:
mode:
Diffstat (limited to 'util/broadcom/secimage')
-rw-r--r--util/broadcom/secimage/misc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/broadcom/secimage/misc.c b/util/broadcom/secimage/misc.c
index a64c448741..fa9f8c5088 100644
--- a/util/broadcom/secimage/misc.c
+++ b/util/broadcom/secimage/misc.c
@@ -15,7 +15,7 @@
#include <string.h>
#include "secimage.h"
-static unsigned char filebuffer[2048];
+static unsigned char filebuffer[2049];
void FillHeaderFromConfigFile(char *h, char *ConfigFileName)
{
@@ -32,6 +32,7 @@ void FillHeaderFromConfigFile(char *h, char *ConfigFileName)
if (fp != NULL) {
printf("\r\n Reading config information from file \r\n");
byte_count = fread(filebuffer, 1, 2048, fp);
+ filebuffer[2048] = 0;
if (byte_count > 0) {
ptr = strstr((char *)filebuffer, "Tag=");
if (ptr) {