Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jgit-dev] NegativeArraySizeException in PackIndexV2

> Is this a ridiculously large pack?

Unfortunately I don't have any more information than the pure
stacktrace. How large would be too large? Could the fanoutTable be
corrupted, so bucketCount < 0?

-Marc

On 12.08.2014 11:28, Robin Rosenberg wrote:
> 
> 
> ----- Ursprungligt meddelande -----
>> Från: "Marc Strapetz" <marc.strapetz@xxxxxxxxxxx>
>> Till: jgit-dev@xxxxxxxxxxx
>> Skickat: tisdag, 12 aug 2014 10:50:22
>> Ämne: [jgit-dev] NegativeArraySizeException in PackIndexV2
>>
>> Any ideas regarding this error? Our jgit is based on 3.3.x.
>>
>> java.lang.NegativeArraySizeException
>> 	at
>> org.eclipse.jgit.internal.storage.file.PackIndexV2.<init>(PackIndexV2.java:123)
>> 	at
>> org.eclipse.jgit.internal.storage.file.PackIndex.read(PackIndex.java:137)
>> 	at org.eclipse.jgit.internal.storage.file.PackIndex.open(PackIndex.java:96)
>>
> 
> Is this a ridiculously large pack?
> 
> -- robin
> 
>>
>> The offending code is:
>>
>> final long nameLen = bucketCnt * Constants.OBJECT_ID_LENGTH;
>> if (nameLen > Integer.MAX_VALUE)
>>   throw new IOException(JGitText.get().indexFileIsTooLargeForJgit);
>>
>> final int intNameLen = (int) nameLen;
>>>>> final byte[] raw = new byte[intNameLen];
>>
>> -Marc
>> _______________________________________________
>> jgit-dev mailing list
>> jgit-dev@xxxxxxxxxxx
>> To change your delivery options, retrieve your password, or unsubscribe from
>> this list, visit
>> https://dev.eclipse.org/mailman/listinfo/jgit-dev
>>
> 


Back to the top