[rtems-libbsd commit] mDNSResponder: Fix use of uninitialized variables
Sebastian Huber
sebh at rtems.org
Tue Oct 16 11:29:47 UTC 2018
Module: rtems-libbsd
Branch: master
Commit: 91b858d2de3f3effd75009e0bf1b791b20fd555a
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=91b858d2de3f3effd75009e0bf1b791b20fd555a
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Tue Oct 16 11:24:10 2018 +0200
mDNSResponder: Fix use of uninitialized variables
---
mDNSResponder/mDNSPosix/mDNSPosix.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/mDNSResponder/mDNSPosix/mDNSPosix.c b/mDNSResponder/mDNSPosix/mDNSPosix.c
index 701374b..e567087 100755
--- a/mDNSResponder/mDNSPosix/mDNSPosix.c
+++ b/mDNSResponder/mDNSPosix/mDNSPosix.c
@@ -448,6 +448,15 @@ mDNSexport mDNSBool mDNSPlatformSetDNSConfig(mDNSBool setservers, mDNSBool setse
(void) RegDomains;
(void) BrowseDomains;
(void) ackConfig;
+#ifdef __rtems__
+ /*
+ * Copied from mDNSMacOSX/mDNSMacOSX.c to prevent use of uninitialized
+ * stack variables.
+ */
+ if (fqdn ) fqdn->c[0] = 0;
+ if (RegDomains ) *RegDomains = NULL;
+ if (BrowseDomains) *BrowseDomains = NULL;
+#endif /* __rtems__ */
return mDNStrue;
}
More information about the vc
mailing list