Skip to content

Commit

Permalink
nits
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc committed Jul 21, 2023
1 parent 93abd60 commit 568ef74
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
WARN_CLANG=-Wformat-nonliteral -Wstrncat-size -Wformat-security -Wsign-conversion -Wconversion -Wfloat-conversion -Wshorten-64-to-32 -Wuninitialized -Wmissing-variable-declarations -Wmissing-declarations
WARN_GCC=-Wformat=2 -Wformat-overflow=2 -Wformat-nonliteral -Wformat-truncation=2 -Wnull-dereference -Wstrict-overflow=2 -Wstringop-overflow=4 -Walloca-larger-than=4096 -Wtype-limits -Wconversion -Wtrampolines -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fno-common -Wcast-align
CFLAGS ?= -g
OPTS=-I. -O3 $(CFLAGS) -fcommon
OPTS=-I. -O3 $(CFLAGS) -fcommon -Wno-deprecated-declarations
CPPFLAGS += -D_GNU_SOURCE
# -Wall -g -pedantic
LIBS=-lm
Expand Down
5 changes: 2 additions & 3 deletions hydra-http-form.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,7 @@ void hdrrep(ptr_header_node *ptr_head, char *oldvalue, char *newvalue) {
char *p = strstr(cur_ptr->value, oldvalue);
memmove(p + newlen, p + oldlen, strlen(p + oldlen) + 1);
memcpy(p, newvalue, newlen);
}
else {
} else {
hydra_report(stderr, "[ERROR] Out of memory (hddrep).\n");
hydra_child_exit(0);
}
Expand Down Expand Up @@ -805,7 +804,7 @@ int32_t start_http_form(int32_t s, char *ip, int32_t port, unsigned char options
if (hydra_send(s, http_request, strlen(http_request), 0) < 0) {
free(cookie_header);
return 1;
}
}
} else {
if (header_exists(&ptr_head, "Content-Length", HEADER_TYPE_DEFAULT))
hdrrepv(&ptr_head, "Content-Length", "0");
Expand Down
2 changes: 1 addition & 1 deletion hydra-mod.c
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ char *hydra_get_next_pair() {
// if (debug) hydra_dump_data(pair, __fck, "CHILD READ PAIR");
if (pair[0] == 0 || __fck <= 0)
return HYDRA_EMPTY;
if (__fck >= sizeof(HYDRA_EXIT) && memcmp(&HYDRA_EXIT, &pair, sizeof(HYDRA_EXIT)) == 0)
if (__fck >= sizeof(HYDRA_EXIT) && memcmp(&HYDRA_EXIT, &pair, sizeof(HYDRA_EXIT)) == 0)
return HYDRA_EXIT;
}
return pair;
Expand Down
2 changes: 1 addition & 1 deletion hydra-smb2.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ bool smb2_run_test(creds_t *cr, const char *server, uint16_t port) {
*/
switch (errno) {
case 0:
case 0:
// maybe false positive? unclear ... :( ... needs more testing
smbc_free_context(ctx, 1);
return true;
Expand Down
2 changes: 2 additions & 0 deletions hydra-svn.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
#ifdef LIBSVN

/* needed on openSUSE */
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
#endif

#if !defined PATH_MAX && defined HAVE_SYS_PARAM_H
#include <sys/param.h>
Expand Down

0 comments on commit 568ef74

Please sign in to comment.