Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package mcstrans for openSUSE:Factory 
checked in at 2024-07-12 17:04:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/mcstrans (Old)
 and      /work/SRC/openSUSE:Factory/.mcstrans.new.17339 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "mcstrans"

Fri Jul 12 17:04:23 2024 rev:34 rq:1185749 version:3.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/mcstrans/mcstrans.changes        2024-01-08 
23:43:55.931410794 +0100
+++ /work/SRC/openSUSE:Factory/.mcstrans.new.17339/mcstrans.changes     
2024-07-12 17:04:29.707792333 +0200
@@ -1,0 +2,10 @@
+Mon Jul  1 08:04:02 UTC 2024 - Cathy Hu <cathy...@suse.com>
+
+- Update to version 3.7
+  https://github.com/SELinuxProject/selinux/releases/tag/3.7
+  * Bugfixes:
+    * mcstrans: free constraint in error branch
+    * mcstrans: ensure transitivity in compare functions
+    * mcstrans: check memory allocations
+
+-------------------------------------------------------------------

Old:
----
  mcstrans-3.6.tar.gz
  mcstrans-3.6.tar.gz.asc

New:
----
  mcstrans-3.7.tar.gz
  mcstrans-3.7.tar.gz.asc

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

Other differences:
------------------
++++++ mcstrans.spec ++++++
--- /var/tmp/diff_new_pack.zkrbm5/_old  2024-07-12 17:04:32.075879341 +0200
+++ /var/tmp/diff_new_pack.zkrbm5/_new  2024-07-12 17:04:32.079879487 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package mcstrans
 #
-# Copyright (c) 2023 SUSE LLC
+# Copyright (c) 2024 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           mcstrans
-Version:        3.6
+Version:        3.7
 Release:        0
 Summary:        SELinux Translation Daemon
 License:        GPL-2.0-or-later

++++++ mcstrans-3.6.tar.gz -> mcstrans-3.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.6/VERSION new/mcstrans-3.7/VERSION
--- old/mcstrans-3.6/VERSION    2023-12-13 15:46:22.000000000 +0100
+++ new/mcstrans-3.7/VERSION    2024-06-26 17:30:41.000000000 +0200
@@ -1 +1 @@
-3.6
+3.7
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.6/src/mcstrans.c 
new/mcstrans-3.7/src/mcstrans.c
--- old/mcstrans-3.6/src/mcstrans.c     2023-12-13 15:46:22.000000000 +0100
+++ new/mcstrans-3.7/src/mcstrans.c     2024-06-26 17:30:41.000000000 +0200
@@ -477,6 +477,7 @@
                }
                if (asprintf(&constraint->text, "%s%c%s", raw, op, tok) < 0) {
                        log_error("asprintf failed %s", strerror(errno));
+                       free(constraint);
                        return -1;
                }
                constraint->op = op;
@@ -952,9 +953,13 @@
        return trans;
 }
 
+#define spaceship_cmp(a, b) (((a) > (b)) - ((a) < (b)))
+
 static int
 string_size(const void *p1, const void *p2) {
-       return strlen(*(char **)p2) - strlen(*(char **)p1);
+       size_t len1 = strlen(*(const char *const *)p2);
+       size_t len2 = strlen(*(const char *const *)p1);
+       return spaceship_cmp(len1, len2);
 }
 
 static int
@@ -965,7 +970,7 @@
        int w2_len=strlen(w2->text);
        if (w1_len == w2_len)
                return strcmp(w1->text, w2->text);
-       return (w2_len - w1_len);
+       return spaceship_cmp(w2_len, w1_len);
 }
 
 static void
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/mcstrans-3.6/src/mls_level.c 
new/mcstrans-3.7/src/mls_level.c
--- old/mcstrans-3.6/src/mls_level.c    2023-12-13 15:46:22.000000000 +0100
+++ new/mcstrans-3.7/src/mls_level.c    2024-06-26 17:30:41.000000000 +0200
@@ -13,6 +13,8 @@
        }
 
        l = (mls_level_t *) calloc(1, sizeof(mls_level_t));
+       if (!l)
+               return NULL;
 
        /* Extract low sensitivity. */
        scontextp = p = mls_context;
@@ -124,6 +126,9 @@
        if (len == 0)
                return NULL;
        char *result = (char *)malloc(len + 1);
+       if (!result)
+               return NULL;
+
        char *p = result;
 
        p += sprintf(p, "s%d", l->sens);

Reply via email to