I am currently learning about how the current batch overflow happens. But there are some points I don't understand. The article says following:
The vulnerable function is located in batchTransfer and the code is shown in Figure 2. As indicated in line 257, the amount local variable is calculated as the product of cnt and _value. The second parameter, i.e., _value, can be an arbitrary 256 bits integer, say 0x8000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000,0000(63 0’s). By having two _receivers passed into batchTransfer(), with that extremely large _value, we can overflow amount and make it zero. With amount zeroed, an attacker can then pass the sanity checks in lines 258–259 and make the subtraction in line 261 irrelevant. Finally, here comes the interesting part: as shown in lines 262–265, the balance of the two receivers would be added by the extremely large _value without costing a dime in the the attacker’s pocket!
So now, when the hacker enters the number, the number get's extremely huge. In the next step, the number even gets higher with multiplication with cnt which is the amount of receivers (let's say 2).
Why did the execution not stop in the line 259 as the amount the hacker transferred was way higher than his balance?
Can someone please explain to me what exactly happened here?