Hi Neels,
I don't quite get why is 32 used there. Also documentation and implementation look wrong to me: * doc talks about static buffer. That makes no sense to me, line should be removed. * Case of in_len=-1 is not correctly handled there.
I'd change it to:
char *osmo_quote_str_c(const void *ctx, const char *str, int in_len) { size_t len = in_len == -1 ? strlen(str) : in_len; len += 2; char *buf = talloc_size(ctx, len); if (!buf) return NULL; return osmo_quote_str_buf2(buf, len, str, in_len); }