Hello community,

here is the log from the commit of package s390-tools for openSUSE:Factory 
checked in at 2018-04-10 09:52:57
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/s390-tools (Old)
 and      /work/SRC/openSUSE:Factory/.s390-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "s390-tools"

Tue Apr 10 09:52:57 2018 rev:18 rq:594083 version:2.1.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/s390-tools/s390-tools.changes    2018-03-26 
12:32:33.907346843 +0200
+++ /work/SRC/openSUSE:Factory/.s390-tools.new/s390-tools.changes       
2018-04-10 09:53:04.626928698 +0200
@@ -1,0 +2,7 @@
+Fri Apr  6 17:44:55 UTC 2018 - mp...@suse.com
+
+- Added s390-tools-sles15-hmcdrvfs-fix-parsing-of-link-count.patch
+  (bsc#1087452)
+  * hmcdrvfs: fix parsing of link count >= 1000
+
+-------------------------------------------------------------------

New:
----
  s390-tools-sles15-hmcdrvfs-fix-parsing-of-link-count.patch

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

Other differences:
------------------
++++++ s390-tools.spec ++++++
--- /var/tmp/diff_new_pack.M7FqJh/_old  2018-04-10 09:53:06.330866951 +0200
+++ /var/tmp/diff_new_pack.M7FqJh/_new  2018-04-10 09:53:06.334866807 +0200
@@ -140,6 +140,7 @@
 Patch30:        
s390-tools-sles15-lsluns-complement-alternative-tools-with-lszdev.patch
 Patch31:        
s390-tools-sles15-zdev-Enable-running-chzdev-from-unknown-root-devices.patch
 Patch32:        
s390-tools-sles15-zdev-Fix-zdev-dracut-module-aborting-on-unknown-root.patch
+Patch33:        s390-tools-sles15-hmcdrvfs-fix-parsing-of-link-count.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 ExclusiveArch:  s390 s390x
@@ -228,6 +229,7 @@
 %patch30 -p1
 %patch31 -p1
 %patch32 -p1
+%patch33 -p1
 
 cp -vi %{S:22} CAUTION
 

++++++ s390-tools-sles15-hmcdrvfs-fix-parsing-of-link-count.patch ++++++
Subject: [PATCH] [BZ 164881] hmcdrvfs: fix parsing of link count >= 1000
From: Gerald Schaefer <gerald.schae...@de.ibm.com>

Description:  hmcdrvfs: fix parsing of link count >= 1000
Symptom:      hmcdrvfs will ignore files with a link count >= 1000
Problem:      The parsing code relies on having spaces between the different
              fields in its input data. When a file has a link count >= 1000,
              there will be no space, and the "link count" field will be
              placed directly after the previous "mode" field. This will
              confuse the parser, and all such files will not be accesible.
Solution:     The "mode" field will never contain digits, so the parser can
              recognize the "link count" field by the presence of a digit.
Reproduction: Use a medium containing files with link count >= 1000 in
              hmcdrvfs, and try to access/list them.
Upstream-ID:  -
Problem-ID:   164881

Signed-off-by: Gerald Schaefer <gerald.schae...@de.ibm.com>
---
 hmcdrvfs/hmcdrvfs.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/hmcdrvfs/hmcdrvfs.c
+++ b/hmcdrvfs/hmcdrvfs.c
@@ -821,10 +821,13 @@ static char *hmcdrv_parse_line(char *lin
                if ((*line != '\0') && (*line != '\n')) {
                        field = hmcdrv_parse_ntoken(field, line, &attr);
 
-                       while ((*line != '\0') &&
-                              (*line != '\n') &&
-                              !isspace(*line))
+                       while ((*line != '\0') && (*line != '\n')) {
+                               if (isspace(*line))
+                                       break;
+                               if (field == 1 && isdigit(*line))
+                                       break;
                                ++line; /* search end of field */
+                       }
                }
        } /* while */
 

Reply via email to