aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <[email protected]>2015-01-09 14:25:43 +0100
committerPhilip Kaufmann <[email protected]>2015-02-04 13:47:32 +0100
commita6516686dcf0b93dd0bcae304e74f9ac69cb305c (patch)
tree44d9394cf2c1ac085f2815c8b55f1539f9c2d3c7 /src/rest.cpp
parentMerge pull request #5509 (diff)
downloaddiscoin-a6516686dcf0b93dd0bcae304e74f9ac69cb305c.tar.xz
discoin-a6516686dcf0b93dd0bcae304e74f9ac69cb305c.zip
[Qt] prevent amount overflow problem with payment requests
Bitcoin amounts are stored as uint64 in the protobuf messages (see paymentrequest.proto), but CAmount is defined as int64_t. Because of that we need to verify that single and accumulated amounts are in a valid range and no variable overflow has happened. - fixes #5624 (#5622) Thanks @SergioDemianLerner for reporting that issue and also supplying us with a possible solution. - add static verifyAmount() function to PaymentServer and move the logging on error into the function - also add a unit test to paymentservertests.cpp
Diffstat (limited to 'src/rest.cpp')
0 files changed, 0 insertions, 0 deletions