Commit dcecda5
committed
Merge pull request #4888 from xiaoyinl:dbltostr_len
For the function `Js::NumberUtilities::FNonZeroFiniteDblToStr` (in `NumberUtilities_strtod.cpp`), if the input double value `dbl` is negative and `nDstBufSize` is zero, there's a buffer overflow. The buffer length is not checked before the buffer `ppsz` is written.
This is not currently triggerable, since all callers pass a 256 byte buffer. But I think it's good to check the length here just in case.
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2507 | 2507 | | |
2508 | 2508 | | |
2509 | 2509 | | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
| 2513 | + | |
2510 | 2514 | | |
2511 | 2515 | | |
2512 | 2516 | | |
| |||
0 commit comments