libc: fix buffer overrun in getrpcport(3)
Approved by: re (gjb)
Reviewed By: markj
Sponsored by: NetApp, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D27332
(cherry picked from commit 5299d64b2b9f7a25e423ef1785d9402a0ef198d3)
(cherry picked from commit a3576b6207074ba5182be253c26af72f8fb51759)