Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.security > #29

some security issues...

From "kester83" <kester83@THRWHITE.remove-dii-this>
Subject some security issues...
Message-ID <1192523533.706892.256430@e9g2000prf.googlegroups.com> (permalink)
Newsgroups comp.lang.java.security
Date 2011-04-27 16:07 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.security
hi

problem1:
below is a java file that i have and after applying a security check
on the return reference,
i have this security risk involved :"The method returns the reference
Object type directly."
the suggested solution was to "Return a copy of the reference Object."
Can any one help me to see what i can do to remove this secutiry risk?

public class InventoryList{
	public static InventoryList merge(InventoryList a, InventoryList b){
		if (a == null){
			return b;}
		else if (b == null){
			return a;
		}
		else {

			InventoryList c = new InventoryList();
			c.count = a.count + b.count;
			c.head = a.head;
			c.tail = b.tail;
			a.tail.next = b.head;
			return c;
		}
	}

}

problem 2:
i've been told to do work on the security check for "buffers
overflow". the only example i was given is below

int data[] = new data[10];
data[10] = 100;

can anyone explain to me how this checking of buffers overflow works
and perhaps and example to how it can be solved?

will really appreciate any help i can get :)

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.security | Previous | Next | Find similar


Thread

some security issues... "kester83" <kester83@THRWHITE.remove-dii-this> - 2011-04-27 16:07 +0000

csiph-web