michelangelo13 / openid4java

Automatically exported from code.google.com/p/openid4java
Apache License 2.0
0 stars 0 forks source link

integer overflow problem in the expiration date #186

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Several constructor of the 'Association' class has the code like this in it, 
where the 'expiryIn' parameter is the int type:

  new Date(System.currentTimeMillis() + expiryIn * 1000)

This is prone to integer overflow problem, as the multiplication was done by 
int and then the result extended to long. This needs to be changed to the 
following:

  new Date(System.currentTimeMillis() + expiryIn * 1000L)

(notice the L in the literal value 1000)

Original issue reported on code.google.com by kohsuke....@gmail.com on 27 Dec 2012 at 4:29

GoogleCodeExporter commented 9 years ago

Original comment by Johnny.B...@gmail.com on 15 Jan 2013 at 8:28