AppThreat / chen

Code Hierarchy Exploration Net (chen)
https://appthreat.com
Apache License 2.0
14 stars 2 forks source link

[c++] assignments with addressOf operator must be tracked as dynamic_dispatch #45

Closed prabhu closed 10 months ago

prabhu commented 10 months ago

Upstream bug: https://github.com/joernio/joern/issues/3740

class Animal {
    public:
    virtual void eat() {
        std::cout<<"eat nothing";
    }  
};
class Cat:public Animal {  
    public:
    void eat() {  
        std::cout<<"eat fish";
    }  
};  
int main( )
{
   Cat c;
   Animal *a = &c;
   a->eat();
   return 0;
}