]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: fix potential access violation 9583/head
authorxie xingguo <xie.xingguo@zte.com.cn>
Wed, 8 Jun 2016 06:30:30 +0000 (14:30 +0800)
committerxie xingguo <xie.xingguo@zte.com.cn>
Wed, 8 Jun 2016 06:37:23 +0000 (14:37 +0800)
commit411fa253d0d5047ea9d0313c54328d5755b77205
treeffe819046e35399bf2a1704063187d2eaf2904d4
parentcb7645fc86901824b0ed93394bbb05ae4e2a5059
client: fix potential access violation

The _read() call may fail and return a negative result,
and thus when it is passed to "resid", which is of type of
"unsigned", overflow happens due to a forced cast that is
implicitly performed.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
src/client/Client.cc