Sisyphus repositório
Última atualização: 1 outubro 2023 | SRPMs: 18631 | Visitas: 37891462
en ru br
ALT Linux repositórios
S:1.92-alt1
5.0: 1.68-alt1

Group :: Educação
RPM: nightfall

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs e FR  Repocop 

Patch: nightfall-1.82-buffoverflow.patch
Download


--- nightfall-1.82/Light.c.orig	2014-07-04 01:25:08.000000000 +0200
+++ nightfall-1.82/Light.c	2014-07-04 01:26:04.000000000 +0200
@@ -147,7 +147,7 @@
 {
 
   double Merit = 0;  /* the merit for (observed-computed)              */
-  int    i;          /* a loop variable                                */
+  int    i,j;          /* a loop variable                                */
 
 #ifdef _WITH_GTK
   char   * args[24];
@@ -265,6 +265,14 @@
 
   Spot[0]       = malloc(N_SPOT * sizeof(SpotLight));
   Spot[1]       = malloc(N_SPOT * sizeof(SpotLight));
+  for (i=0; i<2; i++) {
+    for (j=0; j < N_SPOT; j++) {
+      Spot[i][j].longitude    = 0.0;            
+      Spot[i][j].latitude     = 0.0;            
+      Spot[i][j].radius       = 0.0;            
+      Spot[i][j].dimfactor    = 0.0;
+    }
+  }
   FluxOut       = malloc(PHASESTEPS * sizeof(PhotoOut));
   FluxOutFull   = NULL;
   N_FluxOutFull = 0;
--- nightfall-1.82/LightGtk.c.orig	2014-07-04 01:26:24.000000000 +0200
+++ nightfall-1.82/LightGtk.c	2014-07-04 01:27:21.000000000 +0200
@@ -308,8 +308,9 @@
   gchar *info_str;                     /* OpenGL hardware information */
 #endif 
 
-
-  char        InitString[64];          /* init string for entry field */
+/* Set this string to something large since initialized doubles can
+     generate huge strings */
+  char        InitString[1024];          /* init string for entry field */
   int         i;                       /* misc                        */
   char        top_title[256];          /* title string                */
 
 
projeto & código: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
mantenedor atual: Michael Shigorin
mantenedor da tradução: Fernando Martini aka fmartini © 2009