nouveau/pushbuf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit bcb55c0bb8182f4ec7206bce4eef19fb63a5a02e
Author: Maarten Lankhorst <[email protected]>
Date:   Thu Nov 7 13:30:19 2013 +0100

    nouveau: prevent undefined behavior in nouveau_pushbuf_reloc with gcc-4.8
    
    Reported-by: [email protected]
    Bisected-by (gcc): Andreas Radke <[email protected]>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71116
    Signed-off-by: Maarten Lankhorst <[email protected]>

diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 0fd0c47..4f77881 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -739,7 +739,8 @@ void
 nouveau_pushbuf_reloc(struct nouveau_pushbuf *push, struct nouveau_bo *bo,
                      uint32_t data, uint32_t flags, uint32_t vor, uint32_t tor)
 {
-       *push->cur++ = pushbuf_krel(push, bo, data, flags, vor, tor);
+       *push->cur = pushbuf_krel(push, bo, data, flags, vor, tor);
+       push->cur++;
 }
 
 int


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to