nfsd: avoid undefined signed overflow
In C, signed integer overflow results in undefined behavior, but unsigned overflow wraps around. So do the subtraction first, then cast to signed. Reported-by: NJoakim Tjernlund <joakim.tjernlund@transmode.se> Signed-off-by: NJim Rees <rees@umich.edu> Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
Showing
想要评论请 注册 或 登录