Группа :: Обучение
Пакет: nightfall
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: nightfall-1.82-buffoverflow.patch
Скачать
Скачать
--- 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 */