Project

General

Profile

Actions

Bug #1681

closed

Data can be implicitly converted to Certificate

Added by Alex Afanasyev almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Security
Target version:
Start date:
06/19/2014
Due date:
% Done:

100%

Estimated time:

Description

Certificate::Certificate(const Data&) constructor is missing "explicit" marker, making it possible to implicitly convert Data packet to Certificate.

This problem highlighted itself in NLSR, due to missing declaration of operator<<(std::ostream&, const Data&). When there was an attempt to print out Data packet to output stream, c++ implicitly (and completely wrongly) converted Data packet and used operator<<(std::ostream&, const Certificate&), which caused the failure.

Actions #1

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from New to Code review
Actions #2

Updated by Alex Afanasyev almost 10 years ago

  • Status changed from Code review to Closed
Actions

Also available in: Atom PDF