diff -uNr a/udp/libudp/unix_udp.c b/udp/libudp/unix_udp.c --- a/udp/libudp/unix_udp.c 575886decfb03275e991dad5372d9f29627e287a3ae29e920b817f7f57f72fd672e09e800bc07166fa6ed97436d66e4c9f0cb06329468b13102758db3b76f90e +++ b/udp/libudp/unix_udp.c 392dc3bbebb8ba295916d8ea5ab5cfb2ce44fac68ccd209f4a088d3bc812b9b8bae712599cd0481146ff7db530400882cbf72bc36c637e895430c3e82aa55410 @@ -39,7 +39,12 @@ struct in_addr addr; addr.s_addr = htonl(ip); char *txt = inet_ntoa(addr); - strncpy(buf, txt, buf_size); + /* Given IP might be shorter than buf_size so don't copy blindly. */ + int len = strlen(txt); + /* ONTH don't ever copy more than buf_size either */ + if (len > buf_size) + len = buf_size; + strncpy(buf, txt, len); } /* Should be replaced with native routine */ diff -uNr a/udp/manifest b/udp/manifest --- a/udp/manifest c2719877ad84bd2cf788458df5eb16341e0151e867afa8b8b20faf9f10a8b1723123f19b581dab0627458350e6ab26be87ec84ac94f80f29d61778df5705a969 +++ b/udp/manifest 408581efe33eb2d149c57211c1461d8c71313e2b3ec17efc421f32f4a2b67234300b8866522ba68b255bbdaf505a40efa0e51e5e05333908f9c81f1c2549f864 @@ -1,2 +1,3 @@ 543080 udp_genesis diana_coman Regrind of asciilifeform's UDP lib genesis, to bring it to current format (Keccak hashes, manifest file and standard compliant names for vpatches). A minimal library for UDP communications with fixed-size payloads sent/received over the wire. Uses Ada and C code. 543081 udp_errata_asciilifeform diana_coman Regrind of asciilifeform's errata on his UDP lib: adds closing socket calls, corrects and adds to comments. +543082 udp_fix_nullchars diana_coman Fix for issue in unix_udp.c that returns null characters at end of IPs shorter than 16 characters in length.