/***********************************************************************
X3 ChangeLog
+2012-01-26 Matthew Beeching <jobe@mdbnet.co.uk>
+
+ * src/dict-splay.c: Fix for possible crash bugs in dict_splay()
+ and dict_remove2();
+
+ * src/tools.c: Fix for crash bug in irccasecmp();
+
2012-01-24 Matthew Beeching <jobe@mdbnet.co.uk>
* src/proto-p10.c: Fixed irc_topic() to honour server/hidden_host_type
int res;
if (!node) return NULL;
+ if (!key) return NULL;
N.l = N.r = NULL;
l = r = &N;
if (!dict->root)
return 0;
+ if (!key) return 0;
verify(dict);
dict->root = dict_splay(dict->root, key);
if (irccasecmp(key, dict->root->key))
int
irccasecmp(const char *stra, const char *strb) {
+ if (!stra)
+ return -1;
+ if (!strb)
+ return 1;
while (*stra && (tolower(*stra) == tolower(*strb)))
stra++, strb++;
return tolower(*stra) - tolower(*strb);