Blackfin: strncpy: fix handling of zero lengths
The jump to 4f will cause the NUL padding loop to run at least one time, so if string length is zero just jump to the end. Otherwise we wrongly write one NUL byte when size==0. Signed-off-by: NSteven Miao <realmz6@gmail.com> Signed-off-by: NMike Frysinger <vapier@gentoo.org>
Showing
想要评论请 注册 或 登录