diff options
author | Matt Turner <[email protected]> | 2015-06-29 15:05:19 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-11-12 11:00:10 -0800 |
commit | 238877207eda2d7513cb0d2b415f8fc7ac821d0e (patch) | |
tree | 9526a1c82af7019b3640cd7e851ccff7d82c5b09 /src | |
parent | 903050694bd42b658145b96e501c803c3c21127e (diff) |
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 <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/util/ralloc.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/ralloc.c b/src/util/ralloc.c index e07fce74f23..bb4cf9612eb 100644 --- a/src/util/ralloc.c +++ b/src/util/ralloc.c @@ -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; } |