diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2018-06-18 13:21:24 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2018-09-18 13:12:38 +0200 |
commit | 11f033da6255593986fa5566ab8a36d9678f7d46 (patch) | |
tree | ac66ec06c42e44a109751b12b9a8ba4d62a00e05 | |
parent | 975fd8853a71db461e9e4e50eb592402df6bcc67 (diff) |
fbo-drawbuffers-maxtargets: fix a warning
Ensure that the allocated buffer is guaranteed to be big enough.
Acked-by: Timothy Arceri <tarceri@itsqueeze.com>
-rw-r--r-- | tests/fbo/fbo-drawbuffers-maxtargets.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/fbo/fbo-drawbuffers-maxtargets.c b/tests/fbo/fbo-drawbuffers-maxtargets.c index f5e2a48ed..5d5a09f62 100644 --- a/tests/fbo/fbo-drawbuffers-maxtargets.c +++ b/tests/fbo/fbo-drawbuffers-maxtargets.c @@ -144,7 +144,7 @@ generate_and_display_drawbuffers(int count) /* Build the shader that writes different color to each buffer. */ vs = piglit_compile_shader_text(GL_VERTEX_SHADER, vs_source); - fs_count_source = malloc(strlen(fs_source) + 5); + fs_count_source = malloc(strlen(fs_source) + 10); sprintf(fs_count_source, fs_source, count); fs = piglit_compile_shader_text(GL_FRAGMENT_SHADER, fs_count_source); free(fs_count_source); |