[BUG] Lose Arguments
See original GitHub issueDescription
Hi there. I didn’t write on e-mail this time, because that just a bug report (ONE MORE KRUZYA 😄)
So, I try obfuscate some code. I use plural-ru
, but I think this isn’t trouble of plural-ru
package.
So, in short description. If I right, obfuscator with next config:
{
"controlFlowFlattening": true,
"controlFlowFlatteningThreshold": 1.0,
}
Just lose a few arguments by spread
operator. For more check examples.
Steps to reproduce
- Create function with
spread
operator (...some_array
). - Obfuscate with my settings.
- Profit.
Examples
Oh shit, here we go again…
Original:
// index.js | Я упростил код до 2 + 2.
const plural = require("plural-ru");
const translate = ["Kruzya", "Is", "P..."];
plural(online, ...translate); // in this line I found bug, but go next...
Obfuscated:
_0x102640['HrGnp'](plural, online, ...translate);
Function:
How you can see, function can send only 3 arguments.
- first: plural,
- second: online,
- third: array.
But in third argument we have a bug … because ...translate
=> arg1,arg2,arg3, …, argn (n = length of array).
So, here we get 5 arguments, but sended only 3.
Result of this exec:
This is a potential bug of obfuscator 👀
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Bug Patterns - Error Prone
Arguments to AutoValue constructor are in the wrong order. BadAnnotationImplementation. Classes that implement Annotation must override equals and hashCode.
Read more >As Biotech Crops Lose Their Power, Scientists Push For New ...
Bt crops are losing their power. New strains of bollworms, rootworms, and other pests have emerged that are able to feed on Bt...
Read more >Out arguments not carrying value upon exception - Studio
Hi,. I have tried this in latest version of UiPath as well as older version 2020.4, but it seems the bug still persists....
Read more >A List Of Fallacious Arguments
Tonight I can't lose." This is Argument By. Generalization, but it assumes that small numbers are the same as big numbers. (Three sevens...
Read more >Wrong arguments are passed to a program in debug mode
In order to fix the bug, the way arguments are treated was changed, as behaviour previously was pretty much undefined. The following guidelines...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Released as
2.10.5
Found the minimal code to reproduce the issue:
The output: