SOURCES: BillardGL-config_buffer_overflows.patch (NEW), BillardGL-...
cactus
cactus at pld-linux.org
Sun Jan 27 00:09:54 CET 2008
Author: cactus Date: Sat Jan 26 23:09:54 2008 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- initial
---- Files affected:
SOURCES:
BillardGL-config_buffer_overflows.patch (NONE -> 1.1) (NEW), BillardGL-depracted.patch (NONE -> 1.1) (NEW), BillardGL-starting-resolution.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/BillardGL-config_buffer_overflows.patch
diff -u /dev/null SOURCES/BillardGL-config_buffer_overflows.patch:1.1
--- /dev/null Sun Jan 27 00:09:54 2008
+++ SOURCES/BillardGL-config_buffer_overflows.patch Sun Jan 27 00:09:49 2008
@@ -0,0 +1,38 @@
+diff -ruN billard-gl-1.75.orig/src/KommandoZeilenParameter.cpp billard-gl-1.75/src/KommandoZeilenParameter.cpp
+--- billard-gl-1.75.orig/src/KommandoZeilenParameter.cpp 2002-04-23 18:04:13.000000000 +0200
++++ billard-gl-1.75/src/KommandoZeilenParameter.cpp 2005-01-22 12:33:22.000000000 +0100
+@@ -8,8 +8,8 @@
+ void SchreibeKonfiguration(){
+ FILE *f;
+ #ifndef _WIN32
+- char dateiname[40];
+- sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
++ char dateiname[512];
++ snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",getenv("HOME"));
+ f=fopen(dateiname,"w+");
+ #endif
+ #ifdef _WIN32
+@@ -65,8 +65,8 @@
+ void LeseKonfiguration(){
+ FILE *f;
+ #ifndef _WIN32
+- char dateiname[40];
+- sprintf(dateiname,"%s/.BillardGL.conf.v7",getenv("HOME"));
++ char dateiname[512];
++ snprintf(dateiname,sizeof(dateiname),"%s/.BillardGL.conf.v7",getenv("HOME"));
+ f=fopen(dateiname,"r");
+ #endif
+ #ifdef _WIN32
+@@ -95,9 +95,9 @@
+ fscanf(f,"%i",&GrueneLampe);
+ fscanf(f,"%f",&EffektLautstaerke);
+ fscanf(f,"%f",&MusikLautstaerke);
+- fscanf(f,"%s",Spieler1temp);
+- fscanf(f,"%s",Spieler2temp);
+- fscanf(f,"%s",NetzwerkSpielertemp);
++ fscanf(f,"%9s",Spieler1temp);
++ fscanf(f,"%9s",Spieler2temp);
++ fscanf(f,"%9s",NetzwerkSpielertemp);
+ for (int i=0;i<10;i++) {
+ if (Spieler1temp[i]=='%') {
+ Spieler1[i]=' ';
================================================================
Index: SOURCES/BillardGL-depracted.patch
diff -u /dev/null SOURCES/BillardGL-depracted.patch:1.1
--- /dev/null Sun Jan 27 00:09:54 2008
+++ SOURCES/BillardGL-depracted.patch Sun Jan 27 00:09:49 2008
@@ -0,0 +1,46 @@
+diff -ruN billard-gl-1.75.orig/src/BillardGL.cpp billard-gl-1.75/src/BillardGL.cpp
+--- billard-gl-1.75.orig/src/BillardGL.cpp 2002-04-23 18:17:42.000000000 +0200
++++ billard-gl-1.75/src/BillardGL.cpp 2005-01-23 03:50:58.000000000 +0100
+@@ -35,8 +35,6 @@
+
+ #include "BillardGL.h"
+
+-#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
+-
+ //Tabellen
+ GLfloat Bewegungstabelle[2000][16][3];
+ GLint Soundtabelle[1000];
+diff -ruN billard-gl-1.75.orig/src/bmp.cpp billard-gl-1.75/src/bmp.cpp
+--- billard-gl-1.75.orig/src/bmp.cpp 2002-04-22 12:31:24.000000000 +0200
++++ billard-gl-1.75/src/bmp.cpp 2005-01-23 03:50:43.000000000 +0100
+@@ -4,14 +4,16 @@
+ // Modified by Volker Blanz, 25.4.2001
+ //
+
+-#include <iostream.h>
+-#include <fstream.h>
++#include <iostream>
++#include <fstream>
+ #include <stdio.h>
+ #include <string.h>
+ #include "LA.h"
+ #include "Namen.h"
+ #include "bmp.h"
+
++using namespace std;
++
+ // from ioutil:
+
+ WORDX readWord(FILE *f) {
+diff -ruN billard-gl-1.75.orig/src/Kugel.cpp billard-gl-1.75/src/Kugel.cpp
+--- billard-gl-1.75.orig/src/Kugel.cpp 2002-04-22 12:58:08.000000000 +0200
++++ billard-gl-1.75/src/Kugel.cpp 2005-01-31 04:03:54.000000000 +0100
+@@ -123,7 +123,7 @@
+ glBindTexture(GL_TEXTURE_2D,Texturen[TG]);
+ sprintf(Name,"Texturen/%i/%i.bmp",TG,Nr);
+ loadBMP(tex_r,tex_g,tex_b,Name);
+- GLfloat *texcoord;
++ GLfloat *texcoord = NULL;
+ if (tex_r.nrh!=tex_r.nch) {
+ GLfloat Aspekt=(tex_r.nch+1.0)/(tex_r.nrh+1.0);
+ texcoord = (GLfloat*) malloc (20*(Aufloesung+1)*(Aufloesung+2)*sizeof(GLfloat));
================================================================
Index: SOURCES/BillardGL-starting-resolution.patch
diff -u /dev/null SOURCES/BillardGL-starting-resolution.patch:1.1
--- /dev/null Sun Jan 27 00:09:54 2008
+++ SOURCES/BillardGL-starting-resolution.patch Sun Jan 27 00:09:49 2008
@@ -0,0 +1,21 @@
+diff -ruN billard-gl-1.75.orig/src/KommandoZeilenParameter.cpp billard-gl-1.75/src/KommandoZeilenParameter.cpp
+--- billard-gl-1.75.orig/src/KommandoZeilenParameter.cpp 2002-04-23 18:04:13.000000000 +0200
++++ billard-gl-1.75/src/KommandoZeilenParameter.cpp 2005-01-22 12:42:31.000000000 +0100
+@@ -144,7 +144,7 @@
+ BandenFaktor = 0.4;
+ KollisionsFaktor = 0.95;
+ ZBufferLoeschen = 1;
+- BildschirmAufloesung = 800;
++ BildschirmAufloesung = 640;
+ Farbtiefe = 16;
+ Reflektionen = 0;
+ Sprache = 0;
+@@ -154,7 +154,7 @@
+ TischLampen = 2;
+ GrueneLampe = 0;
+
+- FullScreen = 1;
++ FullScreen = 0;
+
+ EffektLautstaerke = .5;
+ MusikLautstaerke = .5;
================================================================
More information about the pld-cvs-commit
mailing list