if (Chan && Chan->HasNames() != 0) {
char *Nicks = (char *)malloc(1);
+
+ if (Nicks == NULL) {
+ Kill("CClientConnection::ParseLineArgV: malloc() failed. Please reconnect.");
+
+ return false;
+ }
+
Nicks[0] = '\0';
const CHashtable<CNick *, false> *H = Chan->GetNames();
continue;
}
- Size = (Nicks ? strlen(Nicks) : 0) + strlen(outPref) + strlen(Nick) + 2;
+ Size = strlen(Nicks) + strlen(outPref) + strlen(Nick) + 2;
Nicks = (char *)realloc(Nicks, Size);
if (Nicks == NULL) {
}
char *Feats = (char *)malloc(1);
+
+ if (Feats == NULL) {
+ Kill("CClientConnection::ParseLineArgV: malloc() failed. Please reconnect.");
+
+ return false;
+ }
+
Feats[0] = '\0';
int a = 0, i = 0;
char *Name = Feat->Name;
char *Value = Feat->Value;
- Size = (Feats ? strlen(Feats) : 0) + strlen(Name) + 1 + strlen(Value) + 2;
+ Size = strlen(Feats) + strlen(Name) + 1 + strlen(Value) + 2;
Feats = (char *)realloc(Feats, Size);
if (Feats == NULL) {
strmcat(Feats, Name, Size);
- if (Value != NULL && Value[0] != '\0') {
+ if (Value[0] != '\0') {
strmcat(Feats, "=", Size);
strmcat(Feats, Value, Size);
}
Server = "bouncer.shroudbnc.info";
}
- if (Client != NULL) {
+ if (Nick != NULL) {
Client->WriteLine(":%s 372 %s :%s", Server, Nick, Line);
}
}
m_File = NULL;
}
- if (Type == Log_Motd && Client != NULL && Nick != NULL && Server != NULL) {
+ if (Type == Log_Motd && Nick != NULL && Server != NULL) {
Client->WriteLine(":%s 376 %s :End of /MOTD command.", Server, Nick);
}
}