summaryrefslogtreecommitdiffstats
path: root/tools/build/unhex.c
diff options
context:
space:
mode:
authorCynthia Rempel <cynthia@rtems.org>2013-08-25 18:00:31 -0700
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-08-26 09:25:58 +0200
commit2f0d5e453b97e2d34593e00f8173635ae990a08d (patch)
treeaeb424432b47ad4299c26130402c460a5e70d3b3 /tools/build/unhex.c
parentStop a resource leak (diff)
downloadrtems-2f0d5e453b97e2d34593e00f8173635ae990a08d.tar.bz2
Initialize the string before replacing characters
Diffstat (limited to 'tools/build/unhex.c')
-rw-r--r--tools/build/unhex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/build/unhex.c b/tools/build/unhex.c
index 9248e8ffff..be4465d807 100644
--- a/tools/build/unhex.c
+++ b/tools/build/unhex.c
@@ -545,6 +545,7 @@ convert_TI_records(
while ( ! endrecord && (fgets(buff, sizeof(buff), ifp)))
{
+ p = &buff[0];
if (p[strlen(p)-1] == '\n') /* get rid of newline */
p[strlen(p)-1] = '\0';
@@ -553,7 +554,6 @@ convert_TI_records(
tb.dl_count = 0;
- p = &buff[0];
eol = FALSE;
while ( ! eol && ! endrecord)
{