Commit Graph

322 Commits

Author SHA1 Message Date
luporl 7e142cb2a8 xserver: fix RGB mask handling
On FreeBSD 13.0-CURRENT for PowerPC64 big-endian (BE), X was
crashing in some cases. For instance, when twm was started
and the background was clicked to open its menu, X crashed
with a segmentation fault, trying to dereference a null pointer
at CreatePicture().

There were 2 issues with xorg-server handling of RGB masks that
caused the pointer above to be null and thus the crash:
- wrong use of ffs() to get the RGB offsets from the masks
- overflow when shifting a 16-bit integer

This change fixes both issues. They happen when the system is BE
but has a video adapter using a little-endian (LE) ARGB32
framebuffer. In order to display the correct colors, this setup
requires a BE RGBA32 color format to be used by X, by setting
the RGB masks appropriately, that didn't work properly because of
the issues above.
2021-04-16 14:40:49 +00:00
Jan Beich 376eaadde3 meson: hide C API if Xorg is disabled (like autotools)
When building only Xwayland using Meson some files are always installed.
This causes package conflict if Xwayland is built separately from Xorg.

  include/xorg/compositeext.h
  include/xorg/damage.h
  include/xorg/damagestr.h
  include/xorg/dbestruct.h
  include/xorg/dri3.h
  include/xorg/fb.h
  include/xorg/fboverlay.h
  include/xorg/fbpict.h
  include/xorg/fbrop.h
  include/xorg/geext.h
  include/xorg/geint.h
  include/xorg/glyphstr.h
  include/xorg/mi.h
  include/xorg/micmap.h
  include/xorg/micoord.h
  include/xorg/migc.h
  include/xorg/miline.h
  include/xorg/mioverlay.h
  include/xorg/mipict.h
  include/xorg/mipointer.h
  include/xorg/mipointrst.h
  include/xorg/mistruct.h
  include/xorg/misync.h
  include/xorg/misyncfd.h
  include/xorg/misyncshm.h
  include/xorg/misyncstr.h
  include/xorg/mizerarc.h
  include/xorg/panoramiX.h
  include/xorg/panoramiXsrv.h
  include/xorg/picture.h
  include/xorg/picturestr.h
  include/xorg/present.h
  include/xorg/presentext.h
  include/xorg/randrstr.h
  include/xorg/rrtransform.h
  include/xorg/shadow.h
  include/xorg/shmint.h
  include/xorg/syncsdk.h
  include/xorg/vndserver.h
  include/xorg/wfbrename.h
  include/xorg/xace.h
  include/xorg/xacestr.h
  include/xorg/xorg-server.h
  include/xorg/xvdix.h
  include/xorg/xvmcext.h
  share/aclocal/xorg-server.m4

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2021-03-11 00:22:36 +00:00
Adam Jackson 516e75dbb6 dix: Call SourceValidate before GetImage
This ensures that any prep work for the drawable we're about to read
from is already done before we call down to GetImage. This should be no
functional change as most of the callers with a non-trivial
SourceValidate are already wrapping GetImage and doing the equivalent
thing, but we'll be simplifying that shortly.

More importantly this ensures that if any of that prep work would
generate events - like automatic compositing flushing rendering to a
parent pixmap which then triggers damage - then it happens entirely
before we start writing the GetImage reply header.

Note that we do not do the same for GetSpans, but that's okay. The only
way to get to GetSpans is through miCopyArea or miCopyPlane - where the
callers must already call SourceValidate - or miGetImage - which this
commit now protects with SourceValidate.

Fixes: xorg/xserver#902
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2019-10-30 16:26:01 +00:00
Adam Jackson ff310903f3 mi: Add a default no-op miSourceValidate
Slightly simplifies the callers since they don't need to check for
non-NULL anymore.

I do extremely hate the workarounds here to suppress misprite taking the
cursor down though. Surely there's a better way.

Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
2019-10-30 16:26:01 +00:00
Adam Jackson 55482c1caf render: Fix undefined shift in xRenderColorToCard32
Delightfully this is undefined even though CARD16 is an "unsigned" type,
because it's an unsigned short, which C promotes to signed int because
everything is stupid.
2019-10-15 14:06:56 -04:00
Adam Jackson 436fd7e8b4 render: Break PICT_a4
The Render protocol requires this format, but it is wrong to do so. We
are not aware of any hardware with a real 4bpp implementation of this
format. Some GL hardware may have GL_LUMINANCE4_ALPHA4_EXT, and may also
be able to wire L to 1, but that would win you none of memory, quality,
or (likely) performance over A8. Any attempt to use this format is
therefore likely a (painful) software fallback.

Pleasantly (and given the above, unsurprisingly) it seems to be unused
in the wild. None of the major toolkits will try to use it, and
rendercheck does not in fact validate that all of the "standard" picture
formats exist.

Drop the explicit A4 setup from picture format initialization. Note that
the DDXes are not changed and still expose a depth-4 pixmap format, but
we only add picture formats for True/DirectColor-credible depths (i.e.
depth >= 15).

Implements: xorg/proto/xorgproto!1
Signed-off-by: Adam Jackson <ajax@redhat.com>
2019-08-23 15:10:21 +00:00
Adam Jackson 9d5af632fd animcur: Fix crash when removing a master device
Reproducer:

$ Xvfb -ac -noreset :1 &
$ DISPLAY=:1 xinput create-master touch1
$ DISPLAY=:1 xinput remove-master "touch1 pointer"

Bugzilla: https://bugs.freedesktop.org/105761
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2018-04-24 14:28:27 -04:00
Thierry Reding 88c7b8bf4b meson: Distribute more SDK headers
Install missing headers to the SDK directory to allow external modules
to properly build against the SDK. After this commit, the list of files
installed in the SDK include directory is the same as the list of files
installed by the autotools-based build.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
2018-04-02 13:42:08 -04:00
Adam Jackson 8171d4c2d6 render: Store and use all 16bpc of precision for solid pixels (v2.1)
This plumbs the full width color for solid pictures through to fb, exa,
and glamor. External drivers and acceleration code may wish to make a
similar change for sufficiently new servers.

v2: Don't break ABI (Michel Dänzer)
v2.1: Use the (correct) full color in fb too (Michel Dänzer)

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-26 16:46:34 -05:00
Adam Jackson 701f3a206d render: Simplify miCompositeRects
Make a solid-fill picture for this instead of a 1x1 pixmap. In principle
the backend can accelerate this directly, and we also get to preserve
all the bits of the fill color.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-26 10:02:24 -05:00
Adam Jackson 9339fa87d0 render: Cosmetic cleanup to default format creation
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-23 13:15:31 -05:00
Adam Jackson ddf752eafe render: Remove some 24bpp handling
This can't happen anymore.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
2018-02-23 13:15:31 -05:00
Adam Jackson 0b7a5700ad animcur: Change which CursorPtr we save in external state
Formerly spriteInfo->anim.pCursor would point to the animated cursor (or
NULL if not animated). That value would also be available in
spriteInfo->sprite->current, so instead lets use anim.pCursor to point
to the current animation element.

Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-02-14 13:52:45 -05:00
Adam Jackson 4d82a150b2 animcur: Handle allocation failure for the animation timer
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
2018-01-09 14:39:07 -05:00
Adam Jackson de60245e05 animcur: Fix transitions between animated cursors
We weren't cancelling the old timer when changing cursors, making things
go all crashy. Logically we could always cancel the timer first, but
then we'd have to call TimerSet to re-arm ourselves, and GetTimeInMillis
is potentially expensive.

Reported-by: https://devtalk.nvidia.com/default/topic/1028172/linux/titan-v-ubuntu-16-04lts-and-387-34-driver-crashes-badly/post/5230967/#5230967
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Tested-by: Aaron Plattner <aplattner@nvidia.com>
2018-01-09 14:38:45 -05:00
Adam Jackson ab54bc295c animcur: Stop tracking the last display time in the SpriteInfoRec
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Tested-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-08 14:36:49 -05:00
Adam Jackson 094a63d56f animcur: Run the timer from the device, not the screen
This is very slightly more efficient since the callback now doesn't need
to walk every input device, instead we know exactly which device's
cursor is being updated. AnimCurTimerNotify() gets outdented nicely as a
result. A more important side effect is that we can stop using the
TimerAbsolute mode and just pass in the relative delay.

In AnimCurSetCursorPosition, we no longer need to rearm the timer with
the new screen; it is enough to update the device's state. In
AnimCurDisplayCursor we need to notice when we're switching from
animated cursor to regular and cancel the existing timer.

Reviewed-by: Robert Morell <rmorell@nvidia.com>
Tested-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-08 14:36:49 -05:00
Adam Jackson cc3241a712 animcur: Return the next interval directly from the timer callback
If the return value is non-zero here, DoTimer() will automatically rearm
the timer for the new (relative) delay. 'soonest' is in absolute time,
so subtract off 'now' and return that.

Reviewed-by: Robert Morell <rmorell@nvidia.com>
Tested-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-08 14:36:49 -05:00
Adam Jackson 3abbdb7318 animcur: Use fixed-size screen private
Reviewed-by: Robert Morell <rmorell@nvidia.com>
Tested-by: Robert Morell <rmorell@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2018-01-08 14:36:33 -05:00
Daniel Martin d5379b350f Use ARRAY_SIZE all over the tree
Roundhouse kick replacing the various (sizeof(foo)/sizeof(foo[0])) with
the ARRAY_SIZE macro from dix.h when possible. A semantic patch for
coccinelle has been used first. Additionally, a few macros have been
inlined as they had only one or two users.

Signed-off-by: Daniel Martin <consume.noise@gmail.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-10-30 13:45:20 -04:00
Nathan Kidd cad5a1050b Unvalidated lengths
v2: Add overflow check and remove unnecessary check (Julien Cristau)

This addresses:
CVE-2017-12184 in XINERAMA
CVE-2017-12185 in MIT-SCREEN-SAVER
CVE-2017-12186 in X-Resource
CVE-2017-12187 in RENDER

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Julien Cristau <jcristau@debian.org>
Signed-off-by: Nathan Kidd <nkidd@opentext.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2017-10-10 23:33:34 +02:00
Eric Anholt 1549e30372 Add a Meson build system alongside autotools.
This is a work in progress that builds Xvfb, Xephyr, Xwayland, Xnest,
and Xdmx so far.  The outline of Xquartz/Xwin support is in tree, but
hasn't been built yet.  The unit tests are also not done.

The intent is to build this as a complete replacement for the
autotools system, then eventually replace autotools.  meson is faster
to generate the build, faster to run the bulid, shorter to write the
build files in, and less error-prone than autotools.

v2: Fix indentation nits, move version declaration to project(), use
    existing meson_options for version-config.h's vendor name/web.

Signed-off-by: Eric Anholt <eric@anholt.net>
Acked-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 15:25:27 -07:00
Tobias Stoeckmann ac15d4cecc render: Fix out of boundary heap access
ProcRenderCreateRadialGradient and ProcRenderCreateConicalGradient must
be protected against an integer overflow during length check. This is
already included in ProcRenderCreateLinearGradient since the fix for
CVE-2008-2362.

This can only be successfully exploited on a 32 bit system for an
out of boundary read later on. Validated by using ASAN.

Reviewed-by: Adam Jackson <ajax@redhat.com>
2017-03-13 16:54:20 -04:00
Adam Jackson dc7ceda90f dispatch: Mark swapped dispatch as _X_COLD
This touches everything that ends up in the Xorg binary; the big missing
part is GLX since that's all generated code. Cuts about 14k from the
binary on amd64.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2017-03-01 10:16:20 -05:00
Maarten Lankhorst c6511d0142 exa: only draw valid trapezoids
Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484

If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly.
A similar fix should also be applied to pixman.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-06-17 11:21:30 +02:00
Adam Jackson f523ebb549 dix: Remove pointless client-state callbacks
Private storage is pre-zeroed by the private system itself.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2016-05-11 11:21:08 -04:00
Julien Cristau 4217db89ec render: free already allocated formats in PictureInit failure case
Probably pointless, if this fails you're not likely to get far...

Reviewed-by: Rémi Cardona <remi@gentoo.org>
Signed-off-by: Julien Cristau <jcristau@debian.org>
2016-03-08 10:20:10 -05:00
Keith Packard e51ea53b26 render: Use OsTimer for animated cursor timing
This replaces the block/wakeup handlers with an OsTimer. This also
avoids problems with performing rendering during the wakeup handler.

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2015-12-01 13:56:12 -05:00
Chris Wilson 211d4c2d35 render: Propagate allocation failure from createSourcePicture()
All the callers were already checking for failure, except that
createSourcePicture() itself was failing to check whether it
successfully allocated the Picture.

[ajax: Rebase, fix line wrap of preceding line]

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
2015-10-06 13:18:22 -04:00
Chris Wilson c7f84c880b render: Fix leak of filter params
==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719
==11097==    at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11097==    by 0x225EF3: SetPicturePictFilter (filter.c:339)
==11097==    by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773)
==11097==    by 0x15D25D: Dispatch (dispatch.c:432)
==11097==    by 0x14C7B9: main (main.c:298)

[ajax: Fixed whitespace]

Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2015-09-23 14:11:37 -04:00
Andrea Canciani 7ed0c3912e render: Allow single-stop gradients
The Render specification allows single-stop gradients and pixman 0.22
(X server requires >= 0.27.2 now) can rasterize them correctly.

[ajax: update commit message]

Signed-off-by: Andrea Canciani <ranma42@gmail.com>
Reviewed-by: Soren Sandmann <ssp@redhat.com>
2015-09-23 10:34:43 -04:00
Adam Jackson 67dd34fa73 render: Simplify SProcRenderScale
Since ProcRenderScale throws BadImplementation anyway it's pointless to
waste time carefully swapping the request.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2015-09-21 12:27:11 -04:00
Adam Jackson 70b402be26 render: Hide/unexport some implementation details
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2015-07-08 16:40:57 -04:00
Alan Coopersmith 1c56ac63c0 Convert top level extensions to new *allocarray functions
v2: remove now useless parentheses

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Matt Turner <mattst88@gmail.com>
2015-04-21 16:57:08 -07:00
Alan Coopersmith 5d3a788aeb render: unvalidated lengths in Render extn. swapped procs [CVE-2014-8100 2/2]
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-12-08 18:09:48 -08:00
Julien Cristau b5f9ef03df render: check request size before reading it [CVE-2014-8100 1/2]
Otherwise we may be reading outside of the client request.

Signed-off-by: Julien Cristau <jcristau@debian.org>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
2014-12-08 18:09:48 -08:00
Adam Jackson 802932d112 render: fix ChangePicture when Xinerama is active (v2) (#49170)
ChangePicture takes wire XIDs, but didn't do any Xinerama translation,
which meant setting a clip pixmap or a separate alpha picture would
result in those elements pointing at the instance of the pixmap on
screen 0.  Which is, you know, bad.

v2: This one actually builds.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=49170
Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-11-30 11:37:23 -08:00
Peter Hutterer 732fd7e571 Drop trailing whitespaces
sed -i "s/[ ]\+$//g" **/*.(c|h)

happy reviewing...
git diff -w is an empty diff.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2014-11-12 10:25:00 +10:00
Adam Jackson 462bf87c4d render: Always store client clip as a region
This does have one semantic change.  FixesCreateRegionFromPicture used to
throw BadImplementation if you tried to create a region from a picture
with no client clip.  I changed that to BadMatch here since that more
honestly describes what's going on.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-10-23 14:35:49 -07:00
Adam Jackson dd0e8491f7 render: Remove unused CopyPicture
Arguably this would be useful API, but it's never called, and a careful
reading of the CPClipMask path reveals that callers would be fairly
disappointed.

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
2014-07-29 09:52:19 -04:00
Adam Jackson ba2432a020 xfixes: Forbid manipulating clip for source-only pictures (#28968)
Just throw BadPicture instead of crashing.  It's not currently a
meaningful thing to do anyway, RenderSetPictureRectangles would error if
you tried (which this patch changes to BadPicture as well for
consistency).  The problem with trying to do it is if the clip is
specified as a pixmap then we try to convert it to a region, and
->BitmapToRegion requires a ScreenPtr, and source-only pictures don't
have one.

I can imagine a use for client clip on source-only pictures, so if we
really wanted to allow this, probably the way forward is to always store
the clip as a region internally, and when setting the clip _from_ a
pixmap, look up BitmapToRegion relative to the pixmap not the picture.
But since clearly nobody can be relying on it working...

Signed-off-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
2014-04-22 07:50:17 -07:00
Keith Packard 60014a4a98 Replace 'pointer' type with 'void *'
This lets us stop using the 'pointer' typedef in Xdefs.h as 'pointer'
is used throughout the X server for other things, and having duplicate
names generates compiler warnings.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
2014-01-12 10:24:11 -08:00
Peter Hutterer 9a5ad65330 Abstract cursor refcounting
Too many callers relied on the refcnt being handled correctly. Use a simple
wrapper to handle that case.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-05-15 19:17:57 +10:00
Carlos Garnacho df746a7341 render: Unwrap early on the animated cursor BlockHandler
The loop above the previous call may end up triggering other
handlers attaching to the same function slot, so unwrapping
the handler after that could leave the just attached handler
in a dangling but not unset state.

This issue was most visible on the XO, where destroying a
window with an animated cursor set and running  would trigger
this inconsistent state, never calling the miSpriteBlockHandler
again after the animated cursor is unset.

Signed-off-by: Carlos Garnacho <carlosg@gnome.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2013-01-09 11:23:12 +10:00
Yaakov Selkowitz 7f1d74e8a9 render: fix shadow warnings
Signed-off-by: Yaakov Selkowitz <yselkowitz@users.sourceforge.net>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
2012-11-05 13:25:04 -06:00
Keith Packard 19772670e3 Only free Render filter names on last screen close
Hotplugging screens causes the render filter names to get freed while
still in use; wait for the last core screen to be closed before
freeing them. That only happens at server reset, when we want them to
be freed.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
2012-08-14 17:12:21 -07:00
Daniel Stone 7cef23a6dd Render: Remove unused glyphDepths
No-one has used this since 0a71e154.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Acked-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-10 00:42:09 -07:00
Daniel Stone a1d41e311c Move extension initialisation prototypes into extinit.h
Create extinit.h (and xf86Extensions.h, for Xorg-specific extensions) to
hold all our extension initialisation prototypes, rather than
duplicating them everywhere.

Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Keith Packard <keithp@keithp.com>
2012-07-09 23:06:41 -07:00
Alan Coopersmith cc5f09c86f Use C99 designated initializers in various extension Replies
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:30 -07:00
Alan Coopersmith cdf5bcd420 Use calloc to zero fill buffers being allocated for replies & events
Ensures padding bytes are zero-filled

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Keith Packard <keithp@keithp.com>
Tested-by: Daniel Stone <daniel@fooishbar.org>
2012-07-09 19:58:29 -07:00