Use snprintf(), not sprintf()

Found by OpenBSD build.
This commit is contained in:
John Hood
2015-12-08 02:28:05 -05:00
parent 08f64a750a
commit ed92637f25
+1 -1
View File
@@ -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 = ", ";
} }