Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package tint for openSUSE:Factory checked in 
at 2022-04-30 00:45:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tint (Old)
 and      /work/SRC/openSUSE:Factory/.tint.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tint"

Sat Apr 30 00:45:49 2022 rev:4 rq:973842 version:0.07

Changes:
--------
--- /work/SRC/openSUSE:Factory/tint/tint.changes        2021-04-25 
21:29:00.668545108 +0200
+++ /work/SRC/openSUSE:Factory/.tint.new.1538/tint.changes      2022-04-30 
00:46:18.098991143 +0200
@@ -1,0 +2,9 @@
+Mon Apr 18 13:00:49 UTC 2022 - Ferdinand Thiessen <[email protected]>
+
+- Update to version 0.07
+  * Sanitize input after fgets()
+  * Fix deprecated function usage
+  * Make room for printing a 32 bit integer
+- Rebased tint-0.04-per-user-highscore.patch
+
+-------------------------------------------------------------------

Old:
----
  tint_0.06.tar.xz

New:
----
  tint_0.07.tar.xz

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

Other differences:
------------------
++++++ tint.spec ++++++
--- /var/tmp/diff_new_pack.ke8oAb/_old  2022-04-30 00:46:18.742991702 +0200
+++ /var/tmp/diff_new_pack.ke8oAb/_new  2022-04-30 00:46:18.746991705 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package tint
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 # Copyright (c) 2010 Guido Berhoerster <[email protected]>.
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,7 +18,7 @@
 
 
 Name:           tint
-Version:        0.06
+Version:        0.07
 Release:        0
 Summary:        A Clone of the Original Tetris Game
 License:        BSD-3-Clause

++++++ tint-0.04-per-user-highscore.patch ++++++
--- /var/tmp/diff_new_pack.ke8oAb/_old  2022-04-30 00:46:18.790991743 +0200
+++ /var/tmp/diff_new_pack.ke8oAb/_new  2022-04-30 00:46:18.794991746 +0200
@@ -1,6 +1,6 @@
-diff -urN tint-0.04.orig/tint.c tint-0.04/tint.c
---- tint-0.04.orig/tint.c      2010-06-23 13:16:32.000000000 +0200
-+++ tint-0.04/tint.c   2010-07-21 19:25:49.000000000 +0200
+diff -Nur tint-0.07/tint.c new/tint.c
+--- tint-0.07/tint.c   2022-02-06 17:57:02.000000000 +0100
++++ new/tint.c 2022-04-18 15:02:10.167998669 +0200
 @@ -32,13 +32,13 @@
  #include <string.h>
  #include <time.h>
@@ -16,9 +16,9 @@
  #include "engine.h"
  
  /*
-@@ -69,10 +69,14 @@
- /* This calculates the real (displayed) value of the score */
- #define GETSCORE(score) ((score) / SCOREFACTOR)
+@@ -76,10 +76,14 @@
+       while (((ch = getchar()) != EOF) && (ch != '\n')); \
+    }
  
 +/* Name of the scorefile */
 +#define SCOREFILENAME "tint.scores"
@@ -31,7 +31,7 @@
  
  /*
   * Functions
-@@ -568,8 +572,21 @@
+@@ -582,8 +586,21 @@
     bool finished;
     int ch;
     engine_t engine;
@@ -53,7 +53,7 @@
     engine_init (&engine,score_function);      /* must be called before using 
engine.curshape */
     finished = shownext = FALSE;
     memset (shapecount,0,NUMSHAPES * sizeof (int));
-@@ -678,6 +695,7 @@
+@@ -693,6 +710,7 @@
                showplayerstats (&engine);
                savescores (GETSCORE (engine.score));
         }
@@ -61,9 +61,9 @@
     exit (EXIT_SUCCESS);
  }
  
-diff -urN tint-0.04.orig/utils.c tint-0.04/utils.c
---- tint-0.04.orig/utils.c     2001-12-07 16:49:19.000000000 +0100
-+++ tint-0.04/utils.c  2010-07-21 19:26:42.000000000 +0200
+diff -Nur tint-0.07/utils.c new/utils.c
+--- tint-0.07/utils.c  2022-02-06 17:57:02.000000000 +0100
++++ new/utils.c        2022-04-18 15:02:10.167998669 +0200
 @@ -28,6 +28,7 @@
   */
  
@@ -115,9 +115,9 @@
 +   return scorefile_path;
 +}
 +
-diff -urN tint-0.04.orig/utils.h tint-0.04/utils.h
---- tint-0.04.orig/utils.h     2001-12-07 16:49:35.000000000 +0100
-+++ tint-0.04/utils.h  2010-07-21 19:00:45.000000000 +0200
+diff -Nur tint-0.07/utils.h new/utils.h
+--- tint-0.07/utils.h  2022-02-06 17:57:02.000000000 +0100
++++ new/utils.h        2022-04-18 15:02:10.167998669 +0200
 @@ -47,4 +47,10 @@
   */
  bool str2int (int *i,const char *str);

++++++ tint_0.06.tar.xz -> tint_0.07.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tint-0.06/debian/changelog 
new/tint-0.07/debian/changelog
--- old/tint-0.06/debian/changelog      2020-09-22 01:20:17.000000000 +0200
+++ new/tint-0.07/debian/changelog      2022-02-06 17:57:02.000000000 +0100
@@ -1,3 +1,13 @@
+tint (0.07) unstable; urgency=medium
+
+  * Sanitize input after fgets() (Closes: #948025)
+  * Fix deprecated function usage
+  * Make room for printing a 32 bit integer
+  * Update copytight years
+  * Bump Stantards-Version to 4.6.0 (no other changes)
+
+ -- Ricardo Mones <[email protected]>  Sun, 06 Feb 2022 17:57:02 +0100
+
 tint (0.06) unstable; urgency=medium
 
   * Bump Stantards-Version to 4.5.0 (no other changes)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tint-0.06/debian/control new/tint-0.07/debian/control
--- old/tint-0.06/debian/control        2020-09-22 01:20:17.000000000 +0200
+++ new/tint-0.07/debian/control        2022-02-06 17:57:02.000000000 +0100
@@ -4,7 +4,7 @@
 Maintainer: Debian Games Team <[email protected]>
 Uploaders: Ricardo Mones <[email protected]>
 Build-Depends: debhelper-compat (= 13), libncurses5-dev
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
 Rules-Requires-Root: binary-targets
 Vcs-Git: https://salsa.debian.org/games-team/tint.git
 Vcs-Browser: https://salsa.debian.org/games-team/tint
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tint-0.06/debian/copyright 
new/tint-0.07/debian/copyright
--- old/tint-0.06/debian/copyright      2020-09-22 01:20:17.000000000 +0200
+++ new/tint-0.07/debian/copyright      2022-02-06 17:57:02.000000000 +0100
@@ -12,7 +12,7 @@
  2001-2005 Abraham vd Merwe <[email protected]>
  2010      Mario Lang <[email protected]>
  2010      Sebastian Reichel <[email protected]>
- 2019      Ricardo Mones <[email protected]>
+ 2019-2022 Ricardo Mones <[email protected]>
 License: BSD-3-clause
 
 License: BSD-3-clause
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tint-0.06/io.c new/tint-0.07/io.c
--- old/tint-0.06/io.c  2020-09-22 01:20:17.000000000 +0200
+++ new/tint-0.07/io.c  2022-02-06 17:57:02.000000000 +0100
@@ -142,7 +142,7 @@
 {
    va_list ap;
    va_start (ap,format);
-   vwprintw (stdscr,format,ap);
+   vw_printw(stdscr, format, ap);
    va_end (ap);
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/tint-0.06/tint.c new/tint-0.07/tint.c
--- old/tint-0.06/tint.c        2020-09-22 01:20:17.000000000 +0200
+++ new/tint-0.07/tint.c        2022-02-06 17:57:02.000000000 +0100
@@ -51,7 +51,7 @@
 
 /* Maximum digits in a number (i.e. number of digits in score, */
 /* number of blocks, etc. should not exceed this value */
-#define MAXDIGITS 5
+#define MAXDIGITS 11
 
 /* Number of levels in the game */
 #define MINLEVEL       1
@@ -69,6 +69,13 @@
 /* This calculates the real (displayed) value of the score */
 #define GETSCORE(score) ((score) / SCOREFACTOR)
 
+/* Remove extra input after fgets if needed */
+#define ENDFGETS(buffer) \
+   if (!strchr(buffer, '\n')) { \
+      int ch; \
+      while (((ch = getchar()) != EOF) && (ch != '\n')); \
+   }
+
 static bool shownext;
 static bool dottedlines;
 static int level = MINLEVEL - 1,shapecount[NUMSHAPES];
@@ -329,7 +336,9 @@
    fprintf (stderr,"Congratulations! You have a new high score.\n");
    fprintf (stderr,"Enter your name [%s]: ",pw != NULL ? pw->pw_name : "");
 
-   fgets (name,NAMELEN - 1,stdin);
+   memset(name, 0, NAMELEN);
+   fgets(name, NAMELEN - 1, stdin);
+   ENDFGETS(name)
    name[strlen (name) - 1] = '\0';
 
    if (!strlen (name) && pw != NULL)
@@ -553,7 +562,12 @@
    do
         {
                fprintf (stderr,"Choose a level to start [%d-%d]: 
",MINLEVEL,MAXLEVEL);
-               fgets (buf,NAMELEN - 1,stdin);
+               if (NULL == fgets(buf, NAMELEN - 1, stdin)) {
+                       fprintf(stderr, "\nGoodbye!\n");
+                       level = -1;
+                       break;
+               }
+               ENDFGETS(buf)
                buf[strlen (buf) - 1] = '\0';
         }
    while (!str2int (&level,buf) || level < MINLEVEL || level > MAXLEVEL);
@@ -576,6 +590,7 @@
    shapecount[engine.curshape]++;
    parse_options (argc,argv);                          /* must be called after 
initializing variables */
    if (level < MINLEVEL) choose_level ();
+   if (level < 0) exit (EXIT_SUCCESS);
    io_init ();
    drawbackground ();
    in_timeout (DELAY);

Reply via email to