Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix off-by-one error (discovered by Shao Miller).
  • Loading branch information
Michael Brown committed Jan 7, 2008
1 parent a9b8197 commit 82bae30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/tcp/iscsi.c
Expand Up @@ -684,7 +684,7 @@ static int iscsi_handle_chap_c_value ( struct iscsi_session *iscsi,
/* Process challenge an octet at a time */
for ( ; ( value[0] && value[1] ) ; value += 2 ) {
memcpy ( buf, value, 2 );
buf[3] = 0;
buf[2] = 0;
byte = strtoul ( buf, &endp, 16 );
if ( *endp != '\0' ) {
DBGC ( iscsi, "iSCSI %p saw invalid CHAP challenge "
Expand Down

0 comments on commit 82bae30

Please sign in to comment.