> I used asprintf because I have no idea what the maximum length of the returned
> string from XkbAtomText is. I assume you could fix this issue using a
> corrected maximum size to the local stack buffer. How long can the result
> string be expected to be?
shouldn't something like
--
char* foo = XkbAtomText(..);
char* bar = malloc(strlen(foo));
strcpy(bar, foo);
--
do the same job as asprintf?
> I used asprintf because I have no idea what the maximum length of the returned
> string from XkbAtomText is. I assume you could fix this issue using a
> corrected maximum size to the local stack buffer. How long can the result
> string be expected to be?
shouldn't something like strlen( foo));
--
char* foo = XkbAtomText(..);
char* bar = malloc(
strcpy(bar, foo);
--
do the same job as asprintf?