question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

buffersize is parsed as integer without checking

See original GitHub issue

When validating a bufersize we should check it is actually a valid integer.

Now something like 1E300 will be admitted as valid with the value 1 (as given by parseInt) which users might find surprising (well, it did surprise me!)

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jgoizuetacommented, Jul 11, 2018

Can buffersize arrive as a String? I see the problem occurs with strings:

> parseInt('1e10', 10)
1
0reactions
dgaubertcommented, Jul 17, 2018

Fix deployed in production

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to successfully avoid integer overflow? · Issue #371
I start to think that the buffer size is also maybe not that important regarding overall parsing performance. I would not pick something...
Read more >
Encoding | Protocol Buffers - Google Developers
When the sint32 or sint64 is parsed, its value is decoded back to the original, signed version. In protoscope, suffixing an integer with...
Read more >
Top 25 Series - Rank 18 - Incorrect Calculation of Buffer Size
The most basic case of buffer overflow is not checking for buffer ... Each of the integer is 4 bytes in length, the...
Read more >
Parsing arguments and building values — Python 3.11.1 ...
It is possible to pass “long” integers (integers whose value exceeds the platform's LONG_MAX ) however no proper range checking is done —...
Read more >
Parsing arguments and building values - Read the Docs
They work by checking that the object's PyBufferProcs.bf_releasebuffer field ... B ( int ) [unsigned char]: Convert a Python integer to a tiny...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found