Page MenuHomePhabricator

Fix undefined behavior in rpc/server.cpp
ClosedPublic

Authored by jasonbcox on Mar 1 2019, 00:55.

Details

Summary

Calling std::move() on command while dereferencing GetName() is undefined.

Test Plan

ninja check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
rpc-ub
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 5112
Build 8287: Bitcoin ABC Buildbot (legacy)
Build 8286: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Mar 1 2019, 07:14
deadalnix requested changes to this revision.Mar 1 2019, 13:59
deadalnix added inline comments.
src/rpc/server.cpp
71

You are introducing a copy here for no good reason.

This revision now requires changes to proceed.Mar 1 2019, 13:59
This revision is now accepted and ready to land.Mar 2 2019, 00:44
This revision was automatically updated to reflect the committed changes.