"
A member of a class can be private,protected, or public:
- If it is private, ...
- If it is protected,...
- If it is public, its name can be used by any function.
This refelcts the view that there are three kinds of functions
accessing a class: functions implementing the class (its friends and
members), function implementing a derived class (The derived class
friends and members) and other functions."
You shall not have (Read RFC (Request For Comments) 2119 to interpret
the menaing of "SHALL") private virtual functions and protected
virtual functions in the base class. That means you shall have only
public virtual functions in the base class. This public virtual
functions in the base class can be overridden by and virtual function
which has the same signature in the derived class. In this case , the
derived class has the same signature in the private section but
private section doesn't matter for public virtual sections in the
base class. Using the dynamic binding concept, the virtual pointer
table locates the derived class virtual function signature and
executes it by calling it. So this can not be considered as a security
breach. It works as per the design.
I don't know Java so I can't make a comment on that.
Thanks
S.Karthikselvan
(P.S. You guys start reading or writing RFCs to understand networking
concepts from the source. I mean original authors of the protocol.)