diff options
author | John Kohl <jtkohl@mit.edu> | 1988-06-17 13:13:53 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1988-06-17 13:13:53 +0000 |
commit | 30c9d2e377eefb4cd2151a1f776e7eca21dce783 (patch) | |
tree | ab81a75e1767c6d0b131652a5df891d898eaacb5 /lib/ZFmtAuth.c | |
parent | a5c3a2d52d3d7b9aaca2bb3002b1ee29f367bd67 (diff) |
use pointer system for figuring out how much to checksum
Diffstat (limited to 'lib/ZFmtAuth.c')
-rw-r--r-- | lib/ZFmtAuth.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/ZFmtAuth.c b/lib/ZFmtAuth.c index 5d7f91c..71fa5a6 100644 --- a/lib/ZFmtAuth.c +++ b/lib/ZFmtAuth.c @@ -36,18 +36,15 @@ Code_t ZFormatAuthenticNotice(notice, buffer, buffer_len, len, session) newnotice.z_authent_len = 0; newnotice.z_ascii_authent = (char *)""; - if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, &hdrlen)) - != ZERR_NONE) + if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, + &hdrlen, &ptr)) != ZERR_NONE) return (retval); - for (hdrlen--;buffer[hdrlen-1];hdrlen--) - ; - - newnotice.z_checksum = (ZChecksum_t)quad_cksum(buffer, NULL, hdrlen, 0, - session); + newnotice.z_checksum = (ZChecksum_t)quad_cksum(buffer, NULL, ptr - buffer, + 0, session); - if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, &hdrlen)) - != ZERR_NONE) + if ((retval = Z_FormatRawHeader(&newnotice, buffer, buffer_len, + &hdrlen, (char **) 0)) != ZERR_NONE) return (retval); ptr = buffer+hdrlen; |