diff options
author | Juha-Pekka Heikkila <[email protected]> | 2015-11-13 13:36:43 +0200 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-11-13 12:06:11 -0800 |
commit | 8b145d6a3de381a568d8001131e48257611a542a (patch) | |
tree | a9d0907b236efb764a5cbbe3c00bc155144b144e | |
parent | 0eb3db117b56b081ee2674cc8940c193ffc3c41b (diff) |
i965: Don't write beyond allocated memory.
Reviewed-by: Eduardo Lima Mitev <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Signed-off-by: Juha-Pekka Heikkila <[email protected]>
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_eu_validate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_eu_validate.c b/src/mesa/drivers/dri/i965/brw_eu_validate.c index eb57962bea3..2de2ea1babc 100644 --- a/src/mesa/drivers/dri/i965/brw_eu_validate.c +++ b/src/mesa/drivers/dri/i965/brw_eu_validate.c @@ -39,7 +39,7 @@ cat(struct string *dest, const struct string src) { dest->str = realloc(dest->str, dest->len + src.len + 1); memcpy(dest->str + dest->len, src.str, src.len); - dest->str[dest->len + src.len + 1] = '\0'; + dest->str[dest->len + src.len] = '\0'; dest->len = dest->len + src.len; } #define CAT(dest, src) cat(&dest, (struct string){src, strlen(src)}) |