--- rtusb_info.c.orig	2007-01-16 19:31:12.000000000 +0100
+++ rtusb_info.c	2007-01-16 19:34:51.000000000 +0100
@@ -678,6 +678,7 @@
 
 	PRT2570ADAPTER pAdapter = (PRT2570ADAPTER) dev->priv;
 	NDIS_802_11_SSID					Ssid, *pSsid=NULL;
+	ULONG Length;
 
     //check if the interface is down
     if (pAdapter->RTUSBCmdThr_pid < 0)
@@ -691,8 +692,14 @@
 			return -E2BIG;
 		}
 
-		memcpy(Ssid.Ssid, essid, (data->length - 1));
-		Ssid.SsidLength = data->length - 1;	//minus null character.
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19)
+		Length = data->length - 1; // minus null character
+#else
+		Length = data->length;
+#endif
+
+		memcpy(Ssid.Ssid, essid, (Length));
+		Ssid.SsidLength = Length;
 	}
 	else
 		Ssid.SsidLength = 0;  // ANY ssid 
