struct sockaddr_in addr;
struct sharecache *node;
int minsize, maxsize;
- int dotth, buflen;
+ int dotth;
+ size_t buflen;
int termnum, satisfied, skipcheck;
int level, tersat[32];
wchar_t *terms[32];
if(!dotth && !strncmp(p, "TTH:", 4))
{
dotth = 1;
- if((buf = base32decode(p + 4, &buflen)) == NULL)
- goto out;
- if(buflen != 24)
+ if(((buf = base32decode(p + 4, &buflen)) == NULL) || (buflen != 24))
+ {
+ free(buf);
goto out;
+ }
memcpy(hashtth, buf, 24);
free(buf);
} else {
{
int ret;
void *buf;
- char outbuf[1024];
+ unsigned char outbuf[1024];
z_stream *cstr;
size_t bufsize;