Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1a9357f4 authored by Jim Rees's avatar Jim Rees Committed by J. Bruce Fields
Browse files

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: default avatarJoakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: default avatarJim Rees <rees@umich.edu>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent b6040f97
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment