return;
} else if (strncmp(buf, "GK", 2) == 0) {
DEBUG(10, ("Requested NTLMSSP session key\n"));
- if(have_session_key)
- x_fprintf(x_stdout, "GK %s\n", base64_encode_data_blob(session_key));
- else
+ if(have_session_key) {
+ char *key64 = base64_encode_data_blob(session_key);
+ x_fprintf(x_stdout, "GK %s\n", key64?key64:"<NULL>");
+ SAFE_FREE(key64);
+ } else {
x_fprintf(x_stdout, "BH\n");
+ }
data_blob_free(&request);
return;
DEBUG(10, ("Requested session key\n"));
if(have_session_key) {
- x_fprintf(x_stdout, "GK %s\n", base64_encode_data_blob(session_key));
+ char *key64 = base64_encode_data_blob(session_key);
+ x_fprintf(x_stdout, "GK %s\n", key64?key64:"<NULL>");
+ SAFE_FREE(key64);
}
else {
x_fprintf(x_stdout, "BH\n");
char *user, *pass;
user=buf;
- pass=memchr(buf,' ',length);
+ pass=(char *)memchr(buf,' ',length);
if (!pass) {
DEBUG(2, ("Password not found. Denying access\n"));
x_fprintf(x_stdout, "ERR\n");
return False;
}
- principal = SMB_MALLOC(spnego.negTokenInit.mechListMIC.length+1);
+ principal = (char *)SMB_MALLOC(
+ spnego.negTokenInit.mechListMIC.length+1);
if (principal == NULL) {
DEBUG(1, ("Could not malloc principal\n"));
exit(0);
}
- c=memchr(buf,'\n',sizeof(buf)-1);
+ c=(char *)memchr(buf,'\n',sizeof(buf)-1);
if (c) {
*c = '\0';
length = c-buf;