summaryrefslogtreecommitdiff
path: root/warnquota.c
diff options
context:
space:
mode:
authorPetr Písař <ppisar@redhat.com>2014-02-24 15:54:32 +0100
committerJan Kara <jack@suse.cz>2014-05-01 19:40:44 +0200
commitd850a85b2374fe1b83779c0fc61463057eeca4ab (patch)
tree67d0bccb4b3f383e21b01719381ea878e2b6d2c9 /warnquota.c
parent7cc53f085ba8b8efe1887d1c5cfdeb7b61f904d2 (diff)
downloadlinuxquota-d850a85b2374fe1b83779c0fc61463057eeca4ab.tar.gz
Prevent from grace period overflow in RPC transport
The RPC transports grace time as unsigned int, but the value stored there and retrivedd from is treated as singed difference against current time. This leads to overflow after expiring the grace time which is presented as an enourmously large grace time instead of "none" in the quota(1) output. There also possible an overflow when the time difference is still bigger than an int can represent. This first issue is solved by explicit type cast to/from int32_t, the second issue is fixes by limiting the value into int32_t range. <https://sourceforge.net/p/linuxquota/bugs/115/> Signed-off-by: Petr Písař <ppisar@redhat.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'warnquota.c')
0 files changed, 0 insertions, 0 deletions