projects
/
u
/
mdw
/
putty
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
At some point recently, Unix PuTTY started suffering build errors
[u/mdw/putty]
/
sshcrcda.c
diff --git
a/sshcrcda.c
b/sshcrcda.c
index
7fb5767
..
8d77cbb
100644
(file)
--- a/
sshcrcda.c
+++ b/
sshcrcda.c
@@
-42,12
+42,6
@@
typedef unsigned short uint16;
#define HASH_MINBLOCKS (7*SSH_BLOCKSIZE)
#define HASH_MINBLOCKS (7*SSH_BLOCKSIZE)
-#define GET_32BIT_MSB_FIRST(cp) \
- (((unsigned long)(unsigned char)(cp)[0] << 24) | \
- ((unsigned long)(unsigned char)(cp)[1] << 16) | \
- ((unsigned long)(unsigned char)(cp)[2] << 8) | \
- ((unsigned long)(unsigned char)(cp)[3]))
-
/* Hash function (Input keys are cipher results) */
#define HASH(x) GET_32BIT_MSB_FIRST(x)
/* Hash function (Input keys are cipher results) */
#define HASH(x) GET_32BIT_MSB_FIRST(x)
@@
-71,7
+65,12
@@
void *crcda_make_context(void)
void crcda_free_context(void *handle)
{
void crcda_free_context(void *handle)
{
- sfree(handle);
+ struct crcda_ctx *ctx = (struct crcda_ctx *)handle;
+ if (ctx) {
+ sfree(ctx->h);
+ ctx->h = NULL;
+ sfree(ctx);
+ }
}
static void crc_update(uint32 *a, void *b)
}
static void crc_update(uint32 *a, void *b)