pre-8.0 fixes

This commit is contained in:
vanhauser-thc 2014-04-28 11:04:38 +02:00
parent 76c6145106
commit ebbd664e07
18 changed files with 199 additions and 129 deletions

View file

@ -977,8 +977,10 @@ unsigned long SMBSessionSetup(int s, char *szLogin, char *szPassword, char *misc
memset(LMhash, 0, 24);
ret = HashLM(&LMhash, (unsigned char *) szPassword, (unsigned char *) challenge);
if (ret == -1)
if (ret == -1) {
free(LMv2hash);
return -1;
}
memcpy(buf + iOffset, LMhash, 24);
free(LMhash);
@ -1053,8 +1055,10 @@ unsigned long SMBSessionSetup(int s, char *szLogin, char *szPassword, char *misc
memset(LMv2hash, 0, 24);
ret = HashLMv2(&LMv2hash, (unsigned char *) szLogin, (unsigned char *) szPassword);
if (ret == -1)
if (ret == -1) {
free(LMv2hash);
return -1;
}
memcpy(buf + iOffset, LMv2hash, 24);
free(LMv2hash);