Browse Source

fix for loop variable initialization

https://github.com/TeamSpeak-Systems/ts3init_linux_netfilter_module/issues/3
Thanks to hunterpl for reporting this
pull/6/head
Niels Werensteijn 8 years ago
parent
commit
1c800643d4
  1. 3
      src/libxt_TS3INIT_SET_COOKIE.c
  2. 3
      src/libxt_ts3init_get_puzzle.c

3
src/libxt_TS3INIT_SET_COOKIE.c

@ -81,6 +81,7 @@ static int ts3init_set_cookie_tg_parse(int c, char **argv, @@ -81,6 +81,7 @@ static int ts3init_set_cookie_tg_parse(int c, char **argv,
static void ts3init_set_cookie_tg_save(const void *ip, const struct xt_entry_target *target)
{
int i;
const struct xt_ts3init_set_cookie_tginfo *info = (const void *)target->data;
if (info->specific_options & TARGET_SET_COOKIE_ZERO_RANDOM_SEQUENCE)
{
@ -89,7 +90,7 @@ static void ts3init_set_cookie_tg_save(const void *ip, const struct xt_entry_tar @@ -89,7 +90,7 @@ static void ts3init_set_cookie_tg_save(const void *ip, const struct xt_entry_tar
if (info->specific_options & TARGET_SET_COOKIE_RANDOM_SEED_FROM_ARGUMENT)
{
printf("--random-seed ");
for (int i = 0; i < RANDOM_SEED_LEN; i++)
for (i = 0; i < RANDOM_SEED_LEN; i++)
{
printf("%02X", info->random_seed[i]);
}

3
src/libxt_ts3init_get_puzzle.c

@ -99,6 +99,7 @@ static int ts3init_get_puzzle_parse(int c, char **argv, int invert, unsigned int @@ -99,6 +99,7 @@ static int ts3init_get_puzzle_parse(int c, char **argv, int invert, unsigned int
static void ts3init_get_puzzle_save(const void *ip, const struct xt_entry_match *match)
{
int i;
const struct xt_ts3init_get_puzzle_mtinfo *info = (const void *)match->data;
if (info->common_options & CHK_COMMON_CLIENT_VERSION)
{
@ -111,7 +112,7 @@ static void ts3init_get_puzzle_save(const void *ip, const struct xt_entry_match @@ -111,7 +112,7 @@ static void ts3init_get_puzzle_save(const void *ip, const struct xt_entry_match
if (info->specific_options & CHK_GET_PUZZLE_RANDOM_SEED_FROM_ARGUMENT)
{
printf("--random-seed ");
for (int i = 0; i < RANDOM_SEED_LEN; i++)
for (i = 0; i < RANDOM_SEED_LEN; i++)
{
printf("%02X", info->random_seed[i]);
}

Loading…
Cancel
Save