Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Sound automated detection appears to be infeasible in the general case. Heuristic approaches could be useful.

Related Guidelines

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1402fd99-7a53-4f1b-b6f9-1eb7dc95dd0b"><ac:plain-text-body><![CDATA[

[[MITRE 2009

AA. Bibliography#MITRE 09]]

[CWE-374

http://cwe.mitre.org/data/definitions/374.html] "Passing Mutable Objects to an Untrusted Method" and [CWE-375

http://cwe.mitre.org/data/definitions/375.html] "Returning a Mutable Object to an Untrusted Caller"

]]></ac:plain-text-body></ac:structured-macro>

Bibliography

<ac:structured-macro ac:name="unmigrated-wiki-markup

...

" ac:schema-version="1" ac:macro-id="ba05e6af-435f-41b0-880b-7a7f1471f856"><ac:plain-text-body><![CDATA[

[[API

...

2006

...

AA.

...

Bibliography#API

...

06]

...

]

...

[method

...

clone()

...

http://java.sun.com/javase/6/docs/api/java/lang/Object.html#clone()]

...

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b0a6801a-2fde-4ecd-a214-5aa2988d642d"><ac:plain-text-body><![CDATA[

[[Bloch

...

2008

...

AA.

...

Bibliography#Bloch

...

08]

...

]

...

Item

...

39:

...

Make

...

defensive

...

copies

...

when

...

needed

...

and

...

Item

...

11:

...

Override

...

clone

...

judiciously

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="69574985-791d-440e-a00a-f95e6b58a282"><ac:plain-text-body><![CDATA[

[[SCG 2007

AA. Bibliography#SCG 07]]

Guideline 2-2 Support copy functionality for a mutable class

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="af274d7d-8f77-4538-950a-87fcef0073b3"><ac:plain-text-body><![CDATA[

[[SCG 2009

AA. Bibliography#SCG 09]]

Guideline 2-3 Support copy functionality for a mutable class

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c1a3de5d-3020-4372-bbe2-cd516fa600d0"><ac:plain-text-body><![CDATA[

[[Security 2006

AA. Bibliography#Security 06]]

]]></ac:plain-text-body></ac:structured-macro>

...

OBJ07-J. Preserve dependencies in subclasses when changing superclasses      04. Object Orientation (OBJ)      OBJ09-J. Defensively copy private mutable class members before returning their references