[Mesa-dev] [PATCH 1/9] ralloc: Set *start in ralloc_vasprintf_rewrite_tail() if str is NULL.
Kenneth Graunke
kenneth at whitecape.org
Wed Oct 21 17:58:29 PDT 2015
On Wednesday, October 21, 2015 03:58:09 PM Matt Turner wrote:
> We were leaving it undefined, even though we were writing a string to
> *str.
> ---
> src/util/ralloc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/src/util/ralloc.c b/src/util/ralloc.c
> index e07fce7..bb4cf96 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;
> }
This patch is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
Thanks for fixing my cheesy string library :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151021/442db348/attachment.sig>
More information about the mesa-dev
mailing list