Skip to content

Commit

Permalink
Merge pull request #596 from alfred-bratterud/master
Browse files Browse the repository at this point in the history
Fix #595
  • Loading branch information
alfreb authored Jun 21, 2016
2 parents 5ec66b7 + 434ddab commit 5bab8ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/net/ethernet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ namespace net {

// hex string representation
std::string str() const {
char eth_addr[17];
sprintf(eth_addr, "%1x:%1x:%1x:%1x:%1x:%1x",
char eth_addr[18];
snprintf(eth_addr, sizeof(eth_addr), "%1x:%1x:%1x:%1x:%1x:%1x",
part[0], part[1], part[2],
part[3], part[4], part[5]);
return eth_addr;
Expand Down

0 comments on commit 5bab8ce

Please sign in to comment.