ICU-3280 reject out-of-range Unicode escape

X-SVN-Rev: 13239
This commit is contained in:
Alan Liu 2003-09-29 23:18:03 +00:00
parent 17eaec5cb0
commit 85665276a9

View file

@ -5,8 +5,8 @@
*******************************************************************************
*
* $Source: /xsrl/Nsvn/icu/icu4j/src/com/ibm/icu/impl/Utility.java,v $
* $Date: 2003/09/24 22:06:27 $
* $Revision: 1.44 $
* $Date: 2003/09/29 23:18:03 $
* $Revision: 1.45 $
*
*****************************************************************************************
*/
@ -800,6 +800,9 @@ public final class Utility {
}
++offset;
}
if (result < 0 || result >= 0x110000) {
return -1;
}
offset16[0] = offset;
return result;
}
@ -911,7 +914,7 @@ public final class Utility {
}
if (result < 0 || result >= 0x110000) {
chars.setPos(save);
result = -1;
return -1;
}
return result;
}