| 681 |
|
{ |
| 682 |
|
char *p; |
| 683 |
|
|
| 684 |
< |
if ((p = strchr(yylval.string, ' ')) != NULL) |
| 684 |
> |
if ((p = strchr(yylval.string, ' '))) |
| 685 |
|
p = '\0'; |
| 686 |
|
|
| 687 |
|
MyFree(ServerInfo.network_name); |
| 714 |
|
ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", yylval.string); |
| 715 |
|
else |
| 716 |
|
{ |
| 717 |
< |
assert(res != NULL); |
| 717 |
> |
assert(res); |
| 718 |
|
|
| 719 |
|
memcpy(&ServerInfo.ip, res->ai_addr, res->ai_addrlen); |
| 720 |
|
ServerInfo.ip.ss.ss_family = res->ai_family; |
| 743 |
|
ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost6(%s)", yylval.string); |
| 744 |
|
else |
| 745 |
|
{ |
| 746 |
< |
assert(res != NULL); |
| 746 |
> |
assert(res); |
| 747 |
|
|
| 748 |
|
memcpy(&ServerInfo.ip6, res->ai_addr, res->ai_addrlen); |
| 749 |
|
ServerInfo.ip6.ss.ss_family = res->ai_family; |
| 763 |
|
|
| 764 |
|
if ($3 < MAXCLIENTS_MIN) |
| 765 |
|
{ |
| 766 |
< |
char buf[IRCD_BUFSIZE]; |
| 766 |
> |
char buf[IRCD_BUFSIZE] = ""; |
| 767 |
|
|
| 768 |
|
snprintf(buf, sizeof(buf), "MAXCLIENTS too low, setting to %d", MAXCLIENTS_MIN); |
| 769 |
|
conf_error_report(buf); |
| 771 |
|
} |
| 772 |
|
else if ($3 > MAXCLIENTS_MAX) |
| 773 |
|
{ |
| 774 |
< |
char buf[IRCD_BUFSIZE]; |
| 774 |
> |
char buf[IRCD_BUFSIZE] = ""; |
| 775 |
|
|
| 776 |
|
snprintf(buf, sizeof(buf), "MAXCLIENTS too high, setting to %d", MAXCLIENTS_MAX); |
| 777 |
|
conf_error_report(buf); |
| 793 |
|
} |
| 794 |
|
else if ($3 > NICKLEN) |
| 795 |
|
{ |
| 796 |
< |
char buf[IRCD_BUFSIZE]; |
| 796 |
> |
char buf[IRCD_BUFSIZE] = ""; |
| 797 |
|
|
| 798 |
|
snprintf(buf, sizeof(buf), "max_nick_length too high, setting to %d", NICKLEN); |
| 799 |
|
conf_error_report(buf); |
| 815 |
|
} |
| 816 |
|
else if ($3 > TOPICLEN) |
| 817 |
|
{ |
| 818 |
< |
char buf[IRCD_BUFSIZE]; |
| 818 |
> |
char buf[IRCD_BUFSIZE] = ""; |
| 819 |
|
|
| 820 |
|
snprintf(buf, sizeof(buf), "max_topic_length too high, setting to %d", TOPICLEN); |
| 821 |
|
conf_error_report(buf); |
| 2108 |
|
ilog(LOG_TYPE_IRCD, "Invalid netmask for server vhost(%s)", block_state.bind.buf); |
| 2109 |
|
else |
| 2110 |
|
{ |
| 2111 |
< |
assert(res != NULL); |
| 2111 |
> |
assert(res); |
| 2112 |
|
|
| 2113 |
|
memcpy(&conf->bind, res->ai_addr, res->ai_addrlen); |
| 2114 |
|
conf->bind.ss.ss_family = res->ai_family; |
| 2163 |
|
|
| 2164 |
|
if ($3[0] == ':') |
| 2165 |
|
conf_error_report("Server passwords cannot begin with a colon"); |
| 2166 |
< |
else if (strchr($3, ' ') != NULL) |
| 2166 |
> |
else if (strchr($3, ' ')) |
| 2167 |
|
conf_error_report("Server passwords cannot contain spaces"); |
| 2168 |
|
else |
| 2169 |
|
strlcpy(block_state.spass.buf, yylval.string, sizeof(block_state.spass.buf)); |
| 2176 |
|
|
| 2177 |
|
if ($3[0] == ':') |
| 2178 |
|
conf_error_report("Server passwords cannot begin with a colon"); |
| 2179 |
< |
else if (strchr($3, ' ') != NULL) |
| 2179 |
> |
else if (strchr($3, ' ')) |
| 2180 |
|
conf_error_report("Server passwords cannot contain spaces"); |
| 2181 |
|
else |
| 2182 |
|
strlcpy(block_state.rpass.buf, yylval.string, sizeof(block_state.rpass.buf)); |