[Common-dev] CR: resolver bug(Bug 134039: Win: Producer Broadcast crashes when using DNS name instead of IP)

[Common-dev] CR: resolver bug(Bug 134039: Win: Producer Broadcast crashes when using DNS name instead of IP)

JJ Zeng jzeng at real.com
Mon Apr 25 14:45:52 PDT 2005


Synopsis
========
Fixes Bug 134039: Win: Producer Broadcast crashes when using DNS name instead of IP

Branches: SERVER_11_0_STABLE, HEAD (SERVER_CURRENT) 
Suggested Reviewer: 


Description
===========

This bug only happened on win32 boxes with DHCP on.  It won't happen on boxes with static IPs, and
that's why some of us had difficulty on reproing.

The fix is pretty obvious: we need to reset len before passing it RegQueryValueEx again.

Files Affected
==============

common/netio/iresolv.cpp


Testing Performed
=================

Unit Tests:

Verify the internal resolver working well.


Integration Tests:

N/A

Leak Tests:
N/A

Performance Tests:
N/A

Platforms Tested:  win32-i386-vc7
Build verified:  win32-i386-vc7

-------------- next part --------------
? common_netio.sln
? common_netio.vcproj
? dbg32
? Makefile
? resolver.diff
? Umakefil.upp
Index: iresolv.cpp
===================================================================
RCS file: /cvsroot/common/netio/iresolv.cpp,v
retrieving revision 1.20.2.2
diff -u -r1.20.2.2 iresolv.cpp
--- iresolv.cpp	23 Feb 2005 04:27:42 -0000	1.20.2.2
+++ iresolv.cpp	25 Apr 2005 21:38:20 -0000
@@ -1430,6 +1430,7 @@
                                      val, &len);
                 if (rc != ERROR_SUCCESS || val[0] == '\0')
                 {
+                    len = sizeof(val);
                     rc = RegQueryValueEx(hkif, "DhcpNameServer", NULL, NULL,
                                          val, &len);
                 }


More information about the Common-dev mailing list
 

Site Map   |   Terms of Use   |   Privacy Policy   |   Contact Us

Copyright © 1995-2007 RealNetworks, Inc. All rights reserved. RealNetworks and Helix are trademarks of RealNetworks.
All other trademarks or registered trademarks are the property of their respective holders.