Skip to content

Commit

Permalink
Update PHKNetworkIP.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
etwmc committed Jun 22, 2015
1 parent d5b0723 commit 3d5cad1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PHKNetworkIP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -629,10 +629,10 @@ void connectionInfo::handlePairVerify() {

PHKNetworkMessageDataRecord idRecord;
idRecord.activate = true;
idRecord.data = new char[strlen(deviceIdentity)];
strcpy(idRecord.data, deviceIdentity);
idRecord.data = new char[17];
bcopy(deviceIdentity, idRecord.data, 17);
idRecord.index = 1;
idRecord.length = (unsigned int)strlen(deviceIdentity);
idRecord.length = (unsigned int)17;

PHKNetworkMessageDataRecord pubKeyRecord;
pubKeyRecord.activate = true;
Expand Down

1 comment on commit 3d5cad1

@etwmc
Copy link
Owner Author

@etwmc etwmc commented on 3d5cad1 Jun 22, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a potential buffer overflow

Please sign in to comment.