зеркало из https://github.com/mozilla/pjs.git
Comment tweak I forgot to bug mrbkap about.
This commit is contained in:
Родитель
4f125b95bb
Коммит
e9e25d6c99
|
@ -362,7 +362,10 @@ js_str_escape(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval
|
|||
newlength += 5; /* The character will be encoded as %uXXXX */
|
||||
}
|
||||
|
||||
/* NB: this works because newlength can be incremented by at most 5. */
|
||||
/*
|
||||
* This overflow test works because newlength is incremented by at
|
||||
* most 5 on each iteration.
|
||||
*/
|
||||
if (newlength < length) {
|
||||
JS_ReportOutOfMemory(cx);
|
||||
return JS_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче