Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Security > some security i...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 1730 of 1792
Post > Topic >>

some security issues...

by kester83@[EMAIL PROTECTED] Oct 16, 2007 at 01:32 AM

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 :)
 




 5 Posts in Topic:
some security issues...
kester83@[EMAIL PROTECTED  2007-10-16 01:32:13 
Re: some security issues...
Gordon Beaton <n.o.t@[  2007-10-16 16:18:18 
Re: some security issues...
kester83@[EMAIL PROTECTED  2007-10-16 09:37:40 
Re: some security issues...
Gordon Beaton <n.o.t@[  2007-10-16 16:37:30 
Re: some security issues...
kester83@[EMAIL PROTECTED  2007-10-16 18:56:47 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:58:33 CDT 2008.