resolver: fixed few bugs
Fixed a bug which caused resolver to return a wrong target name with a missed ".". The bug was in the part of message_name_get() where a pointer is handled. Added checks for buffer overflow. Added 2 test cases to check a corner case and error handling.
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "ostypes.h"
|
||||
|
||||
/* TODO evaluate x and y only once */
|
||||
#define xmpp_min(x, y) ((x) < (y) ? (x) : (y))
|
||||
|
||||
/* string functions */
|
||||
char *xmpp_strtok_r(char *s, const char *delim, char **saveptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user