diff options
Diffstat (limited to 'pjlib/src/pj/sock_bsd.c')
-rw-r--r-- | pjlib/src/pj/sock_bsd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pjlib/src/pj/sock_bsd.c b/pjlib/src/pj/sock_bsd.c index eafc29e3..156ded85 100644 --- a/pjlib/src/pj/sock_bsd.c +++ b/pjlib/src/pj/sock_bsd.c @@ -307,6 +307,9 @@ PJ_DEF(pj_status_t) pj_inet_ntop(int af, const void *src, { PJ_ASSERT_RETURN(src && dst && size, PJ_EINVAL); + + *dst = '\0'; + PJ_ASSERT_RETURN(af==PJ_AF_INET || af==PJ_AF_INET6, PJ_EINVAL); #if defined(PJ_SOCK_HAS_INET_NTOP) && PJ_SOCK_HAS_INET_NTOP != 0 |