mirror of
https://github.com/proxytunnel/proxytunnel.git
synced 2026-01-23 02:34:59 +00:00
Fixed compiler-warnings for gcc-4... mostly type-checking
git-svn-id: https://proxytunnel.svn.sourceforge.net/svnroot/proxytunnel/trunk/proxytunnel@90 bc163920-b10d-0410-b2c5-a5491ca2ceef
This commit is contained in:
parent
e2b31bddcc
commit
f51bdbda82
7 changed files with 13 additions and 11 deletions
2
base64.c
2
base64.c
|
|
@ -88,7 +88,7 @@ void base64(unsigned char *out, const unsigned char *in, int len)
|
|||
*out = '\0';
|
||||
}
|
||||
|
||||
int unbase64(char *out, const char *in, int maxlen)
|
||||
int unbase64(unsigned char *out, const unsigned char *in, int maxlen)
|
||||
/* base 64 to raw bytes in quasi-big-endian order, returning count of bytes */
|
||||
/* maxlen limits output buffer size, set to zero to ignore */
|
||||
{
|
||||
|
|
|
|||
2
base64.h
2
base64.h
|
|
@ -20,4 +20,4 @@
|
|||
/* base64.h */
|
||||
|
||||
void base64(unsigned char *out, const unsigned char *in, int len);
|
||||
int unbase64(char *out, const char *in, int maxlen);
|
||||
int unbase64(unsigned char *out, const unsigned char *in, int maxlen);
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ void make_basicauth()
|
|||
* Base64 encode the clear text cookie to create the HTTP base64
|
||||
* authentication cookie
|
||||
*/
|
||||
base64( basicauth, p, strlen( p ) );
|
||||
base64( (unsigned char *)basicauth, (unsigned char *)p, strlen( p ) );
|
||||
|
||||
if( args_info.verbose_flag )
|
||||
{
|
||||
|
|
|
|||
6
http.c
6
http.c
|
|
@ -45,7 +45,9 @@ void analyze_HTTP()
|
|||
*/
|
||||
while (strncmp( p, "HTTP/", 5) != 0 )
|
||||
{
|
||||
readline(); p = strtok( buf, " "); }
|
||||
readline();
|
||||
p = strtok( buf, " ");
|
||||
}
|
||||
|
||||
if (strcmp( p, "HTTP/1.0" ) != 0 && strcmp( p, "HTTP/1.1" ) != 0)
|
||||
{
|
||||
|
|
@ -65,7 +67,7 @@ void analyze_HTTP()
|
|||
do {
|
||||
readline();
|
||||
if (strncmp( buf, "Proxy-Authenticate: NTLM ", 25) == 0) {
|
||||
if (parse_type2(&buf[25]) < 0)
|
||||
if (parse_type2((unsigned char *)&buf[25]) < 0)
|
||||
exit(1);
|
||||
}
|
||||
} while ( strcmp( buf, "\r\n" ) != 0 );
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ void message( char *s, ... )
|
|||
char buf[1024];
|
||||
|
||||
va_start( ap, s );
|
||||
vsnprintf( buf, sizeof( buf ), s, ap );
|
||||
vsnprintf( (char *)buf, sizeof( buf ), s, ap );
|
||||
va_end( ap );
|
||||
|
||||
if ( i_am_daemon )
|
||||
|
|
|
|||
6
ntlm.c
6
ntlm.c
|
|
@ -80,7 +80,7 @@ void build_type1() {
|
|||
type1->message_type = NTLM_TYPE_1;
|
||||
type1->flags = NEG_UNICODE | NEG_OEM | REQ_TARGET | NEG_NTLM | NEG_ASIGN | NEG_NTLM2 | NEG_128 | NEG_56 | IE_SETSTHIS;
|
||||
|
||||
base64(ntlm_type1_buf, (unsigned char *)type1, len);
|
||||
base64((unsigned char *)ntlm_type1_buf, (unsigned char *)type1, len);
|
||||
|
||||
free(type1);
|
||||
return;
|
||||
|
|
@ -98,7 +98,7 @@ int parse_type2(unsigned char *buf)
|
|||
return -1;
|
||||
}
|
||||
|
||||
if (strcmp(t2->signature, "NTLMSSP") != 0) {
|
||||
if (strcmp((const char *)t2->signature, "NTLMSSP") != 0) {
|
||||
message("parse_type2: Signature did not match\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -223,7 +223,7 @@ void build_type3_response() {
|
|||
for (i = 0; i < strlen(workstation); i++)
|
||||
t3[type3->workstation.offset + i * sp] = workstation[i];
|
||||
|
||||
base64(ntlm_type3_buf, (unsigned char *)type3, len);
|
||||
base64((unsigned char *)ntlm_type3_buf, (unsigned char *)type3, len);
|
||||
|
||||
free(type3);
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ void do_daemon()
|
|||
socklen_t client_len;
|
||||
int pid = 0;
|
||||
int sd_client;
|
||||
char buf[80];
|
||||
char buf[80];
|
||||
unsigned char addr[4];
|
||||
|
||||
if ( ( listen_sd = socket( AF_INET, SOCK_STREAM, 0 ) ) < 0 )
|
||||
|
|
@ -241,7 +241,7 @@ void do_daemon()
|
|||
}
|
||||
|
||||
memcpy( &addr, &sa_cli.sin_addr.s_addr, 4 );
|
||||
sprintf( buf, "%u.%u.%u.%u", addr[0], addr[1], addr[2], addr[3] );
|
||||
sprintf( (char *) buf, "%u.%u.%u.%u", addr[0], addr[1], addr[2], addr[3] );
|
||||
#ifdef CYGWIN
|
||||
message( "Started tunnel pid=%d for connection from %s",
|
||||
pid, buf );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue