Project

General

Profile

Bug #4370

Undefined behavior in Encoding/TestTlv/PrintHelpers/PrintSignatureTypeValue

Added by Davide Pesavento over 1 year ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:

Description

Reported by UBSan:

../tests/unit-tests/encoding/tlv.t.cpp(470): Entering test case "PrintSignatureTypeValue"
../tests/unit-tests/encoding/tlv.t.cpp(473): info: check boost::lexical_cast<std::string>(value) == "DigestSha256" has passed
../tests/unit-tests/encoding/tlv.t.cpp(476): info: check boost::lexical_cast<std::string>(value) == "SignatureSha256WithRsa" has passed
../tests/unit-tests/encoding/tlv.t.cpp(479): info: check boost::lexical_cast<std::string>(value) == "SignatureSha256WithEcdsa" has passed
../src/encoding/tlv.cpp:30:11: runtime error: load of value 4294967295, which is not a valid value for type 'SignatureTypeValue'
../tests/unit-tests/encoding/tlv.t.cpp(482): info: check boost::lexical_cast<std::string>(value) == "Unknown Signature Type" has passed
../tests/unit-tests/encoding/tlv.t.cpp(470): Leaving test case "PrintSignatureTypeValue"; testing time: 268us

History

#1 Updated by Davide Pesavento over 1 year ago

  • Category changed from Tests to Base
  • Status changed from New to Code review
  • Priority changed from Low to Normal
  • % Done changed from 0 to 100

The same issue occurs in SignatureInfo operator<<.

https://gerrit.named-data.net/4318

#2 Updated by Davide Pesavento over 1 year ago

  • Status changed from Code review to Closed

Also available in: Atom PDF