[libvirt] [PATCH v2] Fix dbus message reading code on big endian hosts
Daniel P. Berrange
berrange at redhat.com
Mon Jul 29 16:57:55 UTC 2013
On Mon, Jul 29, 2013 at 10:46:25AM -0600, Eric Blake wrote:
> On 07/29/2013 10:40 AM, Daniel P. Berrange wrote:
> > From: "Daniel P. Berrange" <berrange at redhat.com>
> >
> > The way we were casting small (<32bit) integers was broken
> > on big endian hosts, causing stack smashing. This was detected
> > in the test suite either by test failures due to incorrect
> > results, or by libc/gcc abort'ing with its stack canary
> > triggered.
> >
> > In v2:
> >
> > - Added missing change to virdbus.c
>
> The v2 designation can be trimmed before you push; it helps review, but
> doesn't need to live in libvirt.git.
Yep, this was only added when composing the email.
> > case DBUS_TYPE_UINT16:
> > - GET_NEXT_VAL(dbus_uint16_t, unsigned int, "%d");
> > + GET_NEXT_VAL(dbus_uint16_t, short unsigned, "%d");
>
> Works, but 'unsigned short' is a bit more typical.
Ok, will change it.
> ACK.
Waiting for Jiri to confirm that it builds on all other architectures
before pushing.
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :|
More information about the libvir-list
mailing list