]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - lhnet.c
Replaced all calls to str[n]cat and strncpy by calls to strlcat and strlcpy respectively
[xonotic/darkplaces.git] / lhnet.c
diff --git a/lhnet.c b/lhnet.c
index 0b63b560758e1bce88607acd01fab3cfefbd09ae..67ccc9a727ac927746b6f0f88ebcbd8462327da3 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -104,7 +104,7 @@ int LHNETADDRESS_FromString(lhnetaddress_t *address, const char *string, int def
        struct hostent *hostentry;
        const char *colon;
        char name[128];
-       if (!address || !string)
+       if (!address || !string || !*string)
                return 0;
        memset(address, 0, sizeof(*address));
        address->addresstype = LHNETADDRESSTYPE_NONE;