Skip to content
Permalink
Browse files
8252100: NumberOverflow in class MemoryCache
Reviewed-by: prr, serb
  • Loading branch information
jayathirthrao committed Sep 17, 2020
1 parent 9a7dcdc commit b87a1599674b8a73f489330decf051d1be9e9fba
Showing 1 changed file with 2 additions and 2 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -333,7 +333,7 @@ public void read(byte[] b, int off, int len, long pos)
}

long index = pos/BUFFER_LENGTH;
int offset = (int)pos % BUFFER_LENGTH;
int offset = (int)(pos % BUFFER_LENGTH);
while (len > 0) {
int nbytes = Math.min(len, BUFFER_LENGTH - offset);
byte[] buf = getCacheBlock(index++);

1 comment on commit b87a159

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented on b87a159 Sep 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.