From: Danny Al-Gaaf Date: Sun, 26 Oct 2014 17:28:50 +0000 (+0100) Subject: cls_rgw_client.cc: fix potential null pointer deref X-Git-Tag: v0.88~22^2~6 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1bd2abec3379e7c3dc170f2a0f0926f5c04ed18e;p=ceph.git cls_rgw_client.cc: fix potential null pointer deref Fix for: CID 1054853 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking is_truncated suggests that it may be null, but it has already been dereferenced on all paths leading to the check. Add vim line to file. Signed-off-by: Danny Al-Gaaf --- diff --git a/src/cls/rgw/cls_rgw_client.cc b/src/cls/rgw/cls_rgw_client.cc index 87d6127ae58c..c13c1a1559c6 100644 --- a/src/cls/rgw/cls_rgw_client.cc +++ b/src/cls/rgw/cls_rgw_client.cc @@ -1,3 +1,5 @@ +// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- +// vim: ts=8 sw=2 smarttab #include #include "include/types.h" @@ -251,7 +253,8 @@ int cls_rgw_usage_log_read(IoCtx& io_ctx, string& oid, string& user, string& read_iter, map& usage, bool *is_truncated) { - *is_truncated = false; + if (is_truncated) + *is_truncated = false; bufferlist in, out; rgw_cls_usage_log_read_op call;