Status: New
Owner: ----
Labels: Priority-Medium
New issue 136 by [email protected]: Large expire values cause
IllegalArgumentException
http://code.google.com/p/jain-sip/issues/detail?id=136
What steps will reproduce the problem?
1. Set Expires header to a large value, such as 3600000
2. Expires.getExpires() returns an integer. This is itself a problem, as
Java integer (max value 2**31 -1) can not cover the full RFC3261 Expire
range (2**32 - 1). Expires.getExpires() has also the same problem.
3. To schedule the timer, SIPClientTransactionImpl.sendRequest() converts
the expiration value to milliseconds. For large values this causes overflow
and a negative value is passed to sipStack.getTimer().schedule(), which
triggers IllegalArgumentException.
An immediate fix for point 3 is change in SIPClientTransactionImpl.java,
line 1040
original:
sipStack.getTimer().schedule(expiresTimerTask, expiresTime * 1000);
proposed fix 1:
sipStack.getTimer().schedule(expiresTimerTask, expiresTime * 1000L);
proposed fix 2:
sipStack.getTimer().schedule(expiresTimerTask,
Long.valueOf(expiresTime) * 1000L);
Fixing point 2 can be more troublesome, left for further study.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
---
You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.