smb: fix compilation warnings.

This commit is contained in:
Dario Lombardo 2017-08-17 22:23:40 +02:00
commit 28d6531b29
4 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
CC?=gcc
CC=clang
STRIP=strip
XDEFINES= -DHAVE_MYSQL_MYSQL_H -DLIBOPENSSL -DLIBNCURSES -DLIBIDN -DHAVE_PR29_H -DHAVE_PCRE -DLIBMYSQLCLIENT -DLIBSSH -DHAVE_ZLIB -DHAVE_GCRYPT -DHAVE_MATH_H
XLIBS= -lgcrypt -lz -lcurses -lssl -lidn -lpcre -lmysqlclient -lssh -lcrypto

View file

@ -1151,7 +1151,7 @@ void hydra_tobase64(unsigned char *buf, uint32_t buflen, uint32_t bufsize) {
strcpy((char *) buf, (char *) bof); /* can not overflow */
}
void hydra_dump_asciihex(char *string, int32_t length) {
void hydra_dump_asciihex(const char *string, int32_t length) {
unsigned char *p = (unsigned char *) string;
unsigned char lastrow_data[16];
int32_t rows = length / HYDRA_DUMP_ROWS;

View file

@ -31,7 +31,7 @@ extern int32_t hydra_send(int32_t socket, char *buf, uint32_t size, int32_t opti
extern int32_t make_to_lower(char *buf);
extern unsigned char hydra_conv64(unsigned char in);
extern void hydra_tobase64(unsigned char *buf, uint32_t buflen, uint32_t bufsize);
extern void hydra_dump_asciihex(char *string, int32_t length);
extern void hydra_dump_asciihex(const char *string, int32_t length);
extern void hydra_set_srcport(int32_t port);
extern char *hydra_address2string(char *address);
extern char *hydra_address2string_beautiful(char *address);

View file

@ -119,7 +119,7 @@ static size_t UTF8_UTF16LE(unsigned char *in, int32_t insize, unsigned char *out
uint64_t ch;
if (debug) {
hydra_report(stderr, "[DEBUG] UTF8_UTF16LE in:\n");
hydra_dump_asciihex(in, insize);
hydra_dump_asciihex((char *)in, insize);
}
for (i = 0; i < insize; i++) {
if (in[i] < 128) { // one byte
@ -149,7 +149,7 @@ static size_t UTF8_UTF16LE(unsigned char *in, int32_t insize, unsigned char *out
}
if (debug) {
hydra_report(stderr, "[DEBUG] UTF8_UTF16LE out:\n");
hydra_dump_asciihex(out,j);
hydra_dump_asciihex((char *)out,j);
}
return j;
}