I was thinking putting a new function in aux/convenient that takes a string in a reply and returns a new string with a terminating null. Something like: char *XCBAuxExtractString(char *s, int n) { char *str; str = (char *)malloc(sizeof(char) * (n+1)); strncpy(str, s, n); str[n] = '\0'; return str; } Good/bad/ugly/thoughts? Jeremy