Fix CVE-2017-6386 (memory leak introduced by fix for CVE-2017-5994). https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-5994 Patch copied from upstream source repository: https://cgit.freedesktop.org/virglrenderer/commit/?id=737c3350850ca4dbc5633b3bdb4118176ce59920 From 737c3350850ca4dbc5633b3bdb4118176ce59920 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Tue, 28 Feb 2017 14:52:09 +1000 Subject: renderer: fix memory leak in vertex elements state create Reported-by: Li Qiang Free the vertex array in error path. This was introduced by this commit: renderer: fix heap overflow in vertex elements state create. I rewrote the code to not require the allocation in the first place if we have an error, seems nicer. Signed-off-by: Dave Airlie diff --git a/src/vrend_renderer.c b/src/vrend_renderer.c index 1bca7ad..e5d9f5c 100644 --- a/src/vrend_renderer.c +++ b/src/vrend_renderer.c @@ -1648,18 +1648,19 @@ int vrend_create_vertex_elements_state(struct vrend_context *ctx, unsigned num_elements, const struct pipe_vertex_element *elements) { - struct vrend_vertex_element_array *v = CALLOC_STRUCT(vrend_vertex_element_array); + struct vrend_vertex_element_array *v; const struct util_format_description *desc; GLenum type; int i; uint32_t ret_handle; - if (!v) - return ENOMEM; - if (num_elements > PIPE_MAX_ATTRIBS) return EINVAL; + v = CALLOC_STRUCT(vrend_vertex_element_array); + if (!v) + return ENOMEM; + v->count = num_elements; for (i = 0; i < num_elements; i++) { memcpy(&v->elements[i].base, &elements[i], sizeof(struct pipe_vertex_element)); -- cgit v0.10.2 e'>range
AgeCommit message (Expand)Author
2024-08-31gnu: guix: Remove unnecessary dependencies....This reverts 0fda0486523d67c2c464386c07a0c2800d8d8c20, instead moving the dependencies needed for ‘make dist’ to ‘manifest.scm’. Removing this extra dependencies make it simpler to build the ‘guix’ package in particular on less-capable systems like i586-gnu. * gnu/packages/package-management.scm (guix)[native-inputs]: Remove IMAGEMAGICK and PERL. Use GRAPHVIZ-MINIMAL instead of GRAPHVIZ. * manifest.scm: Use the full-blown ‘graphviz’ package; add ‘imagemagick’ and ‘perl’. Reported-by: Janneke Nieuwenhuizen <janneke@gnu.org> Change-Id: Ia9d05c699e3cc2f9a9235a67f8ec840c26b66a82 Ludovic Courtès
2024-06-24manifest: Streamline; add packages useful for patch review/submission....* manifest.scm: Fix alternate command line invocation (which would not consider 'manifest.scm'). Use specifications instead of packages. Remove perl (now in the guix package's native inputs). Add b4, git, git:send-email, mumi, nss-certs, openssl and patman to the manifest. Change-Id: I49d92dda059856ce217cea9054a466a1754dcf94 Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Maxim Cournoyer
2024-04-02maint: Add perl to the manifest....* manifest.scm: Add perl. Change-Id: Ie70cea1eb4d62f2a649292209391a92abdae2288 Janneke Nieuwenhuizen
2024-01-31maint: Add gnupg to the manifest....* manifest.scm: Add gnupg. Change-Id: Id5e90f87e5c3a07aa3e49afa97cc0b6d3ce71b41 Ludovic Courtès