Project

General

Profile

Actions

Bug #4370

closed

Undefined behavior in Encoding/TestTlv/PrintHelpers/PrintSignatureTypeValue

Added by Davide Pesavento over 6 years ago. Updated over 6 years 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
Actions #1

Updated by Davide Pesavento over 6 years 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

Actions #2

Updated by Davide Pesavento over 6 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF