summaryrefslogtreecommitdiff
path: root/ztcfg.c
diff options
context:
space:
mode:
authorrussell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-07 16:51:27 +0000
committerrussell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2007-02-07 16:51:27 +0000
commita47d91c5d52be00a737bdcb7087c7d836dcfa651 (patch)
tree8103ae35d92105cb97bf3ebc31f960049bca1e00 /ztcfg.c
parenta2b72cce02a7197ece84f83cee6deadfac672f33 (diff)
In case the ZT_GETVERSION ioctl fails, ensure that the buffers are initialized
to "Unknown" so that we don't try to print uninitialized string buffers. (issue #8992, Oron Peled, tzafrir) git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@2099 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'ztcfg.c')
-rw-r--r--ztcfg.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ztcfg.c b/ztcfg.c
index 8bd07cb..48e9516 100644
--- a/ztcfg.c
+++ b/ztcfg.c
@@ -1131,6 +1131,9 @@ static void printconfig(int fd)
int configs=0;
struct zt_versioninfo vi;
+ strcpy(vi.version, "Unknown");
+ strcpy(vi.echo_canceller, "Unknown");
+
if (ioctl(fd, ZT_GETVERSION, &vi))
error("Unable to read Zaptel version information.\n");