Skip to content
  • Daniel Pfeifer's avatar
    cmDependsJavaParserHelper: fix dangling pointer · fe27879c
    Daniel Pfeifer authored and Brad King's avatar Brad King committed
    The cmDependsJavaParserHelper tries to implement a "deep copy" in the
    assignment operator of the internal class CurrentClass.  To do that, it
    uses std::copy and std::back_inserter.  The copy constructor is
    implemented in terms of the assignment operator but it does not
    initialize the member NestedClasses, a pointer to vector.  This pointer
    is dereferenced in the assignment operator.  Change the pointer to a
    value and rely on the compiler generated special functions.
    fe27879c