Hello community,

here is the log from the commit of package util-linux for openSUSE:Factory 
checked in at 2011-11-02 12:19:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/util-linux (Old)
 and      /work/SRC/openSUSE:Factory/.util-linux.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "util-linux", Maintainer is "[email protected]"

Changes:
--------
--- /work/SRC/openSUSE:Factory/util-linux/util-linux.changes    2011-10-21 
16:44:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.util-linux.new/util-linux.changes       
2011-11-02 12:19:59.000000000 +0100
@@ -1,0 +2,6 @@
+Wed Nov  2 09:37:12 UTC 2011 - [email protected]
+
+- add util-linux-dmesg-fix-printing-of-multibyte-characters.patch
+  (bnc#725993)
+
+-------------------------------------------------------------------

New:
----
  util-linux-dmesg-fix-printing-of-multibyte-characters.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ util-linux.spec ++++++
--- /var/tmp/diff_new_pack.mFiy4H/_old  2011-11-02 12:20:05.000000000 +0100
+++ /var/tmp/diff_new_pack.mFiy4H/_new  2011-11-02 12:20:05.000000000 +0100
@@ -87,6 +87,7 @@
 # crypto patch
 Patch2:         util-linux-2.17.1-mount_losetup_crypto.patch
 Patch5:         util-linux-2.20-libmount-deps.patch
+Patch6:         util-linux-dmesg-fix-printing-of-multibyte-characters.patch
 
 ##
 ## adjtimex
@@ -189,6 +190,7 @@
 %patch1 -p1
 %patch2 -p1
 %patch5 -p1
+%patch6 -p1
 
 #
 cd adjtimex-*

++++++ util-linux-dmesg-fix-printing-of-multibyte-characters.patch ++++++
>From 131b477b61c7eb82aef913bae5aec63f019b7076 Mon Sep 17 00:00:00 2001
From: Petr Uzel <[email protected]>
Date: Tue, 1 Nov 2011 16:17:57 +0100
Subject: [PATCH] dmesg: fix printing of multibyte characters

Also make it compile if HAVE_WIDECHAR is not defined.

Addresses: https://bugzilla.novell.com/show_bug.cgi?id=725993
Reported-by: Harald Koenig <[email protected]>
Signed-off-by: Petr Uzel <[email protected]>
---
 sys-utils/dmesg.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

Index: util-linux-2.20.1/sys-utils/dmesg.c
===================================================================
--- util-linux-2.20.1.orig/sys-utils/dmesg.c
+++ util-linux-2.20.1/sys-utils/dmesg.c
@@ -391,10 +391,11 @@ static void safe_fwrite(const char *buf,
        for (i = 0; i < size; i++) {
                const char *p = buf + i;
                int rc, hex = 0;
+        size_t len = 1;
 
 #ifdef HAVE_WIDECHAR
                wchar_t wc;
-               size_t len = mbrtowc(&wc, p, size - i, &s);
+               len = mbrtowc(&wc, p, size - i, &s);
 
                if (len == 0)                           /* L'\0' */
                        return;
@@ -402,16 +403,15 @@ static void safe_fwrite(const char *buf,
                if (len == (size_t)-1 || len == (size_t)-2) {           /* 
invalid sequence */
                        memset(&s, 0, sizeof (s));
                        len = hex = 1;
-
                } else if (len > 1 && !iswprint(wc)) {  /* non-printable 
multibyte */
                        hex = 1;
-               } else
-#endif
-               {
+               }
+               i += len - 1;
+#else
                        if (!isprint((unsigned int) *p) &&
                            !isspace((unsigned int) *p))                /* 
non-printable */
                                hex = 1;
-               }
+#endif
                if (hex)
                        rc = fwrite_hex(p, len, out);
                else
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to