ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.
We were leaving it undefined, even though we were writing a string to *str. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
@@ -499,6 +499,7 @@ ralloc_vasprintf_rewrite_tail(char **str, size_t *start, const char *fmt,
|
||||
if (unlikely(*str == NULL)) {
|
||||
// Assuming a NULL context is probably bad, but it's expected behavior.
|
||||
*str = ralloc_vasprintf(NULL, fmt, args);
|
||||
*start = strlen(*str);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user