monero-ecosystem / monero-python

A comprehensive Python module for handling Monero cryptocurrency
BSD 3-Clause "New" or "Revised" License
245 stars 79 forks source link

Wallet().transfer() method leaking memory on giving amount as string. #48

Closed nandubatchu closed 5 years ago

emesik commented 5 years ago

Can you elaborate?

nandubatchu commented 5 years ago

@emesik when I tried specifying the 'amount' parameter in the transfer() method in string, There is some kind of recursive loop happening and the memory footprint of the application keeps rising exponentially.

emesik commented 5 years ago

There's no type check and string ends up being multiplicated 10^12 times and concatenated to self. No wonder it causes memory errors. Quite funny bug :)

I've got a fix for that already, expect ValueError to be thrown. Just running tests to reassure everything works, and I'm releasing 0.5.2 today.

Thanks!