[quickjs-devel] A bug about Number.prototype.toString

  • From: "Houyou Yao" <yaohouyou@xxxxxx>
  • To: "QuickJS" <quickjs-devel@xxxxxxxxxxxxx>
  • Date: Wed, 11 Dec 2019 09:13:17 +0800

# Version: quickjs-2019-10-27


# Testcase:
var NISLFuzzingFunc = function(a) {
&nbsp; &nbsp; var b = a.toString(16);
&nbsp; &nbsp; print(b);
};
var NISLParameter0 = 16.1;
NISLFuzzingFunc(NISLParameter0);


# Command:
quickjs-2019-10-27/qjs testcase.js


# Output:
16.1



# Expected output: 

10.19999999999a



# Description:
When calling Number.prototype.toString ( [ radix ] ), if the Number is not an 
integer, the output of QuickJS will be abnormal.

Other related posts: