You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
방어적 복사에 Date의 clone() 메서드가 사용하지 않은 것도 주목하자. Date는 final이 아니기 때문에 clone이 Date가 정의한 메서드가 아닐 수 있다. 즉 clone이 악의를 가진 하위 클래스의 인스턴스를 반환할 수도 있다. 예컨대 이 하위 클래스는 start와 end 필드의 참조를 private 정적 리스트에 담아뒀다가 공격자에게 이 리스트에 접근하는 길을 열어줄 수도 있다.
Activity
[-][Item 49] 방어적 복사를 사용하지 않았을 때의 공격[/-][+][Item 50] 방어적 복사를 사용하지 않았을 때의 공격[/+]