...
This rule appears in the C++ Secure Coding Standard as OOP35-CPP. Do not return references to private data.
...
Bibliography
Wiki Markup |
---|
\[[API 2006|AA. Bibliography#API 06]\] [method clone()|http://java.sun.com/javase/6/docs/api/java/lang/Object.html#clone()] \[[Security 2006|AA. Bibliography#Security 06]\] \[[Bloch 2008|AA. Bibliography#Bloch 08]\] Item 39: Make defensive copies when needed \[[SCG 2007|AA. Bibliography#SCG 07]\] Guideline 2-1 Create a copy of mutable inputs and outputs \[[Haggar 2000|AA. Bibliography#Haggar 00]\] [Practical Java Praxis 64: Use clone for Immutable Objects When Passing or Receiving Object References to Mutable Objects|http://www.informit.com/articles/article.aspx?p=20530] \[[Goetz 2006|AA. Bibliography#Goetz 06]\] 3.2. Publication and Escape: Allowing Internal Mutable State to Escape \[[Gong 2003|AA. Bibliography#Gong 03]\] 9.4 Private Object State and Object Immutability \[[MITRE 2009|AA. Bibliography#MITRE 09]\] [CWE ID 375|http://cwe.mitre.org/data/definitions/375.html] "Passing Mutable Objects to an Untrusted Method" |
...