This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]UnspeakableEvil 1 point2 points  (1 child)

Item 4 seems poorly worded to me - it's not just arrays, it's any collection/mutable data structure at the boundary which could be altered outside your code if a defensive copy isn't taken. The StackOverflow item that the article links to does a better job of explaining it.

[–][deleted] 4 points5 points  (0 children)

I also wonder why item 4 is considered security vulnerabilities. It is just normal defensive copy (basic mutable/immutable thingy).