note broken use of memcmp in NetworkAddress, and delete generated doc/final_document.pdf file
Binary file doc/final_document.pdf has changed
--- a/src/Network/Address.hh Wed Dec 17 00:44:46 2008 +0000
+++ b/src/Network/Address.hh Wed Dec 17 01:13:26 2008 +0000
@@ -90,14 +90,16 @@
virtual void free_addrinfo (addrinfo *info) const;
/**
- * Equal-to comparison operator. Invalid addresses compare equal and are always smaller
+ * Equal-to comparison operator. Invalid addresses compare equal and are always smaller.
+ *
+ * XXX: use of memcmp is broken... there's garbage in the padding
*/
bool operator== (const NetworkAddress &other) const {
return (address_length == other.address_length) && memcmp(&address, &other.address, address_length) == 0;
}
/**
- * Not-equal-to comparison operator. Invalid addresses compare equal and are always smaller
+ * Not-equal-to comparison operator. Invalid addresses compare equal and are always smaller.
*/
bool operator!= (const NetworkAddress &other) const {
return (address_length != other.address_length) || memcmp(&address, &other.address, address_length) != 0;