summaryrefslogtreecommitdiffstats
path: root/src/net/tcp/iscsi.c
diff options
context:
space:
mode:
authorMichael Brown2008-01-07 14:12:43 +0100
committerMichael Brown2008-01-07 14:12:43 +0100
commit82bae302b1f24d1abf9c6abd3dcdc74c449f44ed (patch)
treeeb78054d81c1a46c8a899f17b9af9236c166261e /src/net/tcp/iscsi.c
parentUnconditionally set utility program variables in Makefile to allow CROSS_COMP... (diff)
downloadipxe-82bae302b1f24d1abf9c6abd3dcdc74c449f44ed.tar.gz
ipxe-82bae302b1f24d1abf9c6abd3dcdc74c449f44ed.tar.xz
ipxe-82bae302b1f24d1abf9c6abd3dcdc74c449f44ed.zip
Fix off-by-one error (discovered by Shao Miller).
Diffstat (limited to 'src/net/tcp/iscsi.c')
-rw-r--r--src/net/tcp/iscsi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/tcp/iscsi.c b/src/net/tcp/iscsi.c
index 2416089a..86f3c67b 100644
--- a/src/net/tcp/iscsi.c
+++ b/src/net/tcp/iscsi.c
@@ -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 "