]> git.saurik.com Git - apple/mdnsresponder.git/blobdiff - mDNSWindows/DNSServiceBrowser/WindowsCE/Sources/BrowserDialog.cpp
mDNSResponder-878.250.4.tar.gz
[apple/mdnsresponder.git] / mDNSWindows / DNSServiceBrowser / WindowsCE / Sources / BrowserDialog.cpp
index 01fa3a003342fba98e69ce161276dc733438c81d..67b9cb85d9d4829a88ecf9de1d3b5867b27f1984 100644 (file)
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
-
-    Change History (most recent first):
-    
-$Log: BrowserDialog.cpp,v $
-Revision 1.3  2006/08/14 23:25:55  cheshire
-Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
-
-Revision 1.2  2004/07/13 21:24:27  rpantos
-Fix for <rdar://problem/3701120>.
-
-Revision 1.1  2004/06/18 04:04:37  rpantos
-Move up one level
-
-Revision 1.5  2004/01/30 02:56:33  bradley
-Updated to support full Unicode display. Added support for all services on www.dns-sd.org.
-
-Revision 1.4  2003/10/16 09:21:56  bradley
-Ignore non-IPv4 resolves until mDNS on Windows supports IPv6.
-
-Revision 1.3  2003/10/14 03:28:50  bradley
-Insert services in sorted order to make them easier to find. Defer service adds/removes to the main
-thread to avoid potential problems with multi-threaded MFC message map access. Added some asserts.
-
-Revision 1.2  2003/10/10 03:43:34  bradley
-Added support for launching a web browser to go to the browsed web site on a single-tap.
-
-Revision 1.1  2003/08/21 02:16:10  bradley
-DNSServiceBrowser for HTTP services for Windows CE/PocketPC.
-
-*/
+ */
 
 #include       "stdafx.h"
 
 
 #include       "stdafx.h"
 
@@ -87,7 +58,7 @@ BrowserDialog::BrowserDialog( CWnd *inParent )
        : CDialog( BrowserDialog::IDD, inParent )
 {
        //{{AFX_DATA_INIT(BrowserDialog)
        : CDialog( BrowserDialog::IDD, inParent )
 {
        //{{AFX_DATA_INIT(BrowserDialog)
-               // NOTE: the ClassWizard will add member initialization here
+               // Note: the ClassWizard will add member initialization here
        //}}AFX_DATA_INIT
        
        // Note that LoadIcon does not require a subsequent DestroyIcon in Win32.
        //}}AFX_DATA_INIT
        
        // Note that LoadIcon does not require a subsequent DestroyIcon in Win32.
@@ -233,7 +204,7 @@ void
                        {
                                char            ip[ 64 ];
 
                        {
                                char            ip[ 64 ];
 
-                               sprintf( ip, "%u.%u.%u.%u:%u", 
+                               snprintf( ip, sizeof( ip ), "%u.%u.%u.%u:%u", 
                                        inEvent->data.resolved->address.u.ipv4.addr.v8[ 0 ], 
                                        inEvent->data.resolved->address.u.ipv4.addr.v8[ 1 ], 
                                        inEvent->data.resolved->address.u.ipv4.addr.v8[ 2 ], 
                                        inEvent->data.resolved->address.u.ipv4.addr.v8[ 0 ], 
                                        inEvent->data.resolved->address.u.ipv4.addr.v8[ 1 ], 
                                        inEvent->data.resolved->address.u.ipv4.addr.v8[ 2 ],