[jcifs] Bug in jcifs.netbios.NameServiceClient

Michael B Allen mba2000 at ioplex.com
Wed Jan 19 06:29:53 GMT 2005


On Tue, 18 Jan 2005 08:58:48 -0700
Steve Herndon <sherndon at stillsecure.com> wrote:

> Does the 1.1.7 release fix the problem I reported earlier? I'm assuming 
> this release note:
> 
> "The DC lookup code has been modified to gracefully  handle  WINS 
> returning  an  empty  list (e.g. due to temporary network failure)."
> 
> refers to my problem?

No. I forgot about this. I'll try to get it in the next release.

Although this shouldn't happen on a regular basis. I'm assuming the
response packet is invalid. To be certain we would need a capture. But
I'll fix it either way.

Mike

> >>$ diff -c jcifs_1.1.6/src/jcifs/netbios/NameServiceClient.java
> >>!                 synchronized( response ) {
> >>!                     try {
> >>!                         response.readWireFormat( rcv_buf, 0 );
> >>!                     }
> >>!                     catch (NegativeArraySizeException ex) {
> >>!                         // Malformed packet. Ignore it
> >>!                         continue;
> >>!                     }
> >>!                     response.received = true;
> >
> >So if you get a crappy packet it quits? Ok. I'll look at this. But I
> >think it might be a shade wiser for readWireFormat not to throw a
> >NegativeArraySizeException in the first place.

-- 
Greedo shoots first? Not in my Star Wars.


More information about the jcifs mailing list