Skip to content

Commit

Permalink
Fix TN3270 out of bounds write
Browse files Browse the repository at this point in the history
  • Loading branch information
NickSampanis committed Oct 21, 2014
1 parent 0e5c62b commit edd337d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dissectors/ec_TN3270.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ FUNC_DECODER(dissector_TN3270)

int l = strlen(username);
if (l < 2)
return;
return NULL;
username[l-2] = 0;
DISSECT_MSG("%s:%d <= z/OS TSO Username : %s\n", ip_addr_ntoa(&PACKET->L3.dst, tmp), ntohs(PACKET->L4.dst), username);
}
Expand All @@ -128,7 +128,7 @@ FUNC_DECODER(dissector_TN3270)
password[511] = 0; /* Boundary */
int l = strlen(password);
if (l < 2)
return;
return NULL;
password[l-2] = 0;
DISSECT_MSG("%s:%d <= z/OS TSO Password : %s\n", ip_addr_ntoa(&PACKET->L3.dst, tmp), ntohs(PACKET->L4.dst), password);
}
Expand Down

0 comments on commit edd337d

Please sign in to comment.