Use snprintf(), not sprintf()
Found by OpenBSD build.
This commit is contained in:
@@ -600,7 +600,7 @@ std::string Cell::debug_contents( void ) const
|
|||||||
i < contents.end();
|
i < contents.end();
|
||||||
i++ ) {
|
i++ ) {
|
||||||
|
|
||||||
sprintf( buf, "%s0x%02x", lazycomma, static_cast<uint8_t>(*i) );
|
snprintf( buf, sizeof buf, "%s0x%02x", lazycomma, static_cast<uint8_t>(*i) );
|
||||||
chars.append( buf );
|
chars.append( buf );
|
||||||
lazycomma = ", ";
|
lazycomma = ", ";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user