2009-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
authorGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 20 Jan 2009 06:32:22 +0000 (06:32 -0000)
committerGonzalo Paniagua Javier <gonzalo.mono@gmail.com>
Tue, 20 Jan 2009 06:32:22 +0000 (06:32 -0000)
* IPAddress.cs: handle sign extension for the high byte when using the
byte[] ctor for an IPv4 address.
Fixes bug #467472.

svn path=/branches/mono-2-2/mcs/; revision=123857

mcs/class/System/System.Net/ChangeLog
mcs/class/System/System.Net/IPAddress.cs

index 2ee287e4ed84b13e962e02904e0a5ad7888d651f..c49de68e7f78c1a8103e25e0de39752ccd59d0d2 100644 (file)
@@ -1,3 +1,9 @@
+2009-01-20 Gonzalo Paniagua Javier <gonzalo@novell.com>
+
+       * IPAddress.cs: handle sign extension for the high byte when using the
+       byte[] ctor for an IPv4 address.
+       Fixes bug #467472.
+
 2009-01-16 Gonzalo Paniagua Javier <gonzalo@novell.com>
 
        * FtpWebRequest.cs: adjust to the correct directory when listing too.
index f0ae01fd5dd0694452a6fe2a310b2aa33771e66f..3a7ee7ec3f41cdd28a04850b95ec9fce69f10f93 100644 (file)
@@ -153,7 +153,7 @@ namespace System.Net {
                                m_Family = AddressFamily.InterNetworkV6;
                                m_ScopeId = 0;
                        } else {
-                               m_Address = (address [3] << 24) + (address [2] << 16) +
+                               m_Address = ((uint) address [3] << 24) + (address [2] << 16) +
                                        (address [1] << 8) + address [0];
                        }
                }