SHA256
1
0
forked from pool/systemd
systemd/0003-sd-journal-properly-convert-object-size-on-big-endia.patch
Stephan Kulow 77593c6f2f Accepting request 246717 from Base:System
- Add upstream patches
  0001-login-fix-memory-leak-on-DropController.patch
  0002-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch
  0003-sd-journal-properly-convert-object-size-on-big-endia.patch
  0004-sd-journal-verify-that-object-start-with-the-field-n.patch
- Add upstream patch
  1064-udev-hwdb-do-not-look-at-usb_device-parents.patch
  to avoid that hwdb ID's for unrecognised USB device are taken
  from the USB hub.

- Add upstream patches
  0001-systemctl-Correct-error-message-printed-when-bus_pro.patch
  0002-units-order-systemd-fsck-.service-after-local-fs-pre.patch
  0003-keymap-Adjust-for-more-Samsung-900X4-series.patch

- Add patch use-rndaddentropy-ioctl-to-load-random-seed.patch to
  use RNDADDENTROPY ioctl to load random-seed and to increase
  entropy count as well (bnc#892096)

- Add upstream patches
  0001-login-fix-memory-leak-on-DropController.patch
  0002-util-fix-minimal-race-where-we-might-miss-SIGTERMs-w.patch
  0003-sd-journal-properly-convert-object-size-on-big-endia.patch
  0004-sd-journal-verify-that-object-start-with-the-field-n.patch
- Add upstream patch
  1064-udev-hwdb-do-not-look-at-usb_device-parents.patch
  to avoid that hwdb ID's for unrecognised USB device are taken
  from the USB hub.

- Add upstream patches

OBS-URL: https://build.opensuse.org/request/show/246717
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=202
2014-08-29 15:43:00 +00:00

40 lines
1.6 KiB
Diff

From 57cd09acf2c63a414aa2131c00a2b3f600eb0133 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Sat, 23 Aug 2014 22:35:03 -0400
Subject: [PATCH] sd-journal: properly convert object->size on big endian
mmap code crashes when attempting to map an object of zero size.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758392
https://bugs.freedesktop.org/show_bug.cgi?id=82894
---
src/journal/journal-file.h | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git src/journal/journal-file.h src/journal/journal-file.h
index 3d41682..da2ef3b 100644
--- src/journal/journal-file.h
+++ src/journal/journal-file.h
@@ -214,14 +214,15 @@ static unsigned type_to_context(int type) {
static inline int journal_file_object_keep(JournalFile *f, Object *o, uint64_t offset) {
unsigned context = type_to_context(o->object.type);
+ uint64_t s = le64toh(o->object.size);
return mmap_cache_get(f->mmap, f->fd, f->prot, context, true,
- offset, o->object.size, &f->last_stat, NULL);
+ offset, s, &f->last_stat, NULL);
}
static inline int journal_file_object_release(JournalFile *f, Object *o, uint64_t offset) {
unsigned context = type_to_context(o->object.type);
+ uint64_t s = le64toh(o->object.size);
- return mmap_cache_release(f->mmap, f->fd, f->prot, context,
- offset, o->object.size);
+ return mmap_cache_release(f->mmap, f->fd, f->prot, context, offset, s);
}
--
1.7.9.2