Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8690085
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:49:35+00:00 2026-06-12T23:49:35+00:00

Question: Explain how a privacy leak could occur when a Java programmer defines methods

  • 0

Question: Explain how a privacy leak could occur when a Java programmer defines methods for the implementation of an array.

My class and I brain stormed this idea, and came up with the following options:

Assume the array holds employee objects, with salary amount, employment date etc.

  1. If the array holds references to the objects in the array and not deep copies of these objects, a malicious individual have access to change the content of those objects.
  2. If there are over flow errors, a malicious individual would be able to perform some kind of stack (or heap?) trace to obtain information kept in those objects of the array.

However we are not sure we are on the right track and would appreciate some help.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T23:49:38+00:00Added an answer on June 12, 2026 at 11:49 pm

    The first answer is correct, but the second answer is incorrect. An exception won’t reveal the contents of the array to the caller, as the stack trace (and the data structure used to generate it) doesn’t include a pointer to the actual stack frames.

    A third scenario assumes that the “attacker” can grab a copy of the JVM processes address space; e.g. by forcing a core dump or by reading the page file / swap area. In that scenario, it is possible to get hold of the state of any object that has not been garbage collected. One thing that the bad guys could target is the backing arrays for strings that contain passwords and other sensitive text information. This can be done in a “brute-force” fashion by searching for what looks like sequences of Unicode text characters in the language most commonly used.


    @sparkle had a point. In the first answer, the leak involving arrays happens if the attacker is able to retain a reference to the array used by the container … because the container class neglected to copy it. Assuming that objects in the array are known to the attacker in the first place, it is the copying of the array itself that is critical to preventing the security breach here.

    The other thing to note is that the design and implementation that “enables” the privacy leak is a bit contrived in this case.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

To explain my question: Class : Toy Trait1: Speak like Male Trait2: Speak like
To explain my question, let me first point to this array: <?php $_depends =
Came across this question: explain the role of dominators in reverse engineering Java code.
Question: Could you explain why @Html.DisplayFor(x=>x) yields the same result as @Html.DisplayForModel() in the
This demo class to explain the question public class SomeClass { public string Name
The title should explain my question. I have an array: a = [[1,2],[1,3],[1,4]]; How
The following is what I am trying to figure out. Question - Explain how
This is a very hard to explain question and I hope my code extract
First thing i want to say that it's not an easy question to explain,
To explain my question I have created this http://jsfiddle.net/Jams/XNVB2/ here I want when div1

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.