diff options
author | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-07 16:51:27 +0000 |
---|---|---|
committer | russell <russell@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-02-07 16:51:27 +0000 |
commit | a47d91c5d52be00a737bdcb7087c7d836dcfa651 (patch) | |
tree | 8103ae35d92105cb97bf3ebc31f960049bca1e00 /ztcfg.c | |
parent | a2b72cce02a7197ece84f83cee6deadfac672f33 (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.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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"); |