Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common: Check this->data.op_size before use #18816

Merged
merged 1 commit into from Nov 20, 2017

Conversation

amitkumar50
Copy link

Fixes the coverity issue:
CID 1394853 (#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)

  1. divide_by_zero: In expression (this->data.object_size * max_objects
  • this->data.op_size - 1UL) / this->data.op_size, division by expression
    this->data.op_size which may be zero has undefined behavior.

Signed-off-by: Amit Kumar amitkuma@redhat.com

Fixes the coverity issue:
CID 1394853 (ceph#1 of 1): Division or modulo by zero (DIVIDE_BY_ZERO)
29. divide_by_zero: In expression (this->data.object_size * max_objects
+ this->data.op_size - 1UL) / this->data.op_size, division by expression
this->data.op_size which may be zero has undefined behavior.

Signed-off-by: Amit Kumar <amitkuma@redhat.com>
@amitkumar50
Copy link
Author

jenkins retest this please

@tchaikov tchaikov merged commit 2e4d355 into ceph:master Nov 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants