X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=lhnet.c;h=4099ac6809e74a9690b91fd2fe268d687ecb3f2d;hb=2fe9d8457697fb9d9846e1464829bd976da30cfc;hp=0b63b560758e1bce88607acd01fab3cfefbd09ae;hpb=c05b58925cc9eb1b5b4e27facdefab37315f7602;p=xonotic%2Fdarkplaces.git diff --git a/lhnet.c b/lhnet.c index 0b63b560..4099ac68 100644 --- 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; @@ -252,7 +252,7 @@ int LHNETADDRESS_ToString(const lhnetaddress_t *address, char *string, int strin { if (stringbuffersize >= 6) { - strcpy(string, "local"); + memcpy(string, "local", 6); return 1; } }