aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/ChrootChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/ChrootChecker.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp b/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
index 991296538a5b..ad415770e5e5 100644
--- a/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp
@@ -41,11 +41,11 @@ bool isRootChanged(intptr_t k) { return k == ROOT_CHANGED; }
class ChrootChecker : public Checker<eval::Call, check::PreStmt<CallExpr> > {
mutable IdentifierInfo *II_chroot, *II_chdir;
// This bug refers to possibly break out of a chroot() jail.
- mutable OwningPtr<BuiltinBug> BT_BreakJail;
+ mutable std::unique_ptr<BuiltinBug> BT_BreakJail;
public:
- ChrootChecker() : II_chroot(0), II_chdir(0) {}
-
+ ChrootChecker() : II_chroot(nullptr), II_chdir(nullptr) {}
+
static void *getTag() {
static int x;
return &x;
@@ -142,9 +142,9 @@ void ChrootChecker::checkPreStmt(const CallExpr *CE, CheckerContext &C) const {
if (isRootChanged((intptr_t) *k))
if (ExplodedNode *N = C.addTransition()) {
if (!BT_BreakJail)
- BT_BreakJail.reset(new BuiltinBug("Break out of jail",
- "No call of chdir(\"/\") immediately "
- "after chroot"));
+ BT_BreakJail.reset(new BuiltinBug(
+ this, "Break out of jail", "No call of chdir(\"/\") immediately "
+ "after chroot"));
BugReport *R = new BugReport(*BT_BreakJail,
BT_BreakJail->getDescription(), N);
C.emitReport(R);