Bug 37801 - x11 tests xi2 init_window calls memset with sizeof instead of sizeof*
Summary: x11 tests xi2 init_window calls memset with sizeof instead of sizeof*
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/Input/Core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-31 14:29 UTC by Andre Klapper
Modified: 2011-06-11 03:40 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Andre Klapper 2011-05-31 14:29:05 UTC
Upstreaming from https://bugs.meego.com/show_bug.cgi?id=16212 .

Still applies to current git master codebase in
http://cgit.freedesktop.org/xorg/xserver/tree/test/xi2/protocol-common.c

122 void init_window(WindowPtr window, WindowPtr parent, int id)
123 {
124     memset(window, 0, sizeof(window));

WindowPtr is a parent, you want to use sizeof *window or sizeof Window...
Comment 1 Alan Coopersmith 2011-05-31 14:34:45 UTC
lib/xi is for the client-side libXi, not the code in the Xserver,
reassigning.
Comment 2 Peter Hutterer 2011-05-31 17:31:01 UTC
http://patchwork.freedesktop.org/patch/5657/
Comment 3 Julien Cristau 2011-06-11 03:40:33 UTC
commit 62f1bf96e1ea27e1eff137cb9333f3dd3b014dd0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Jun 1 10:22:44 2011 +1000

    test: fix memset size for WindowRec (#37801)
    
    X.Org Bug 37801 <http://bugs.freedesktop.org/show_bug.cgi?id=37801>
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    Reviewed-by: Daniel Stone <daniel@fooishbar.org>
    Reviewed-by: Cyril Brulebois <kibi@debian.org>


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.