imfradim-commit Mailing List for Imfradim
Status: Alpha
Brought to you by:
oroz
You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
|---|
|
From: C?sar P?r. T. <or...@us...> - 2002-10-29 18:05:22
|
Update of /cvsroot/imfradim/imfradim/src
In directory usw-pr-cvs1:/tmp/cvs-serv29011/src
Modified Files:
Makefile imfradim.c
Log Message:
Buffer overflow fixed
Index: Makefile
===================================================================
RCS file: /cvsroot/imfradim/imfradim/src/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** Makefile 27 Oct 2002 22:44:59 -0000 1.2
--- Makefile 29 Oct 2002 18:05:14 -0000 1.3
***************
*** 6,17 ****
MANDIR= ${prefix}/man
! OBJS = ncomplejos.o tratImagen.o imfradim.o faleatorias.o autopunto.o muta.o util.o mandelbrot.o precalcular.o
!
CC = gcc $(FLAGS)
NORMAL = -ffast-math -fomit-frame-pointer -Wall -O6 -funroll-loops -s
DEBUG = -ffast-math -fomit-frame-pointer -Wall -O3 -funroll-loops -g -DDEBUG
all:
! make imfradim FLAGS="$(NORMAL)"
debug:
make imfradim FLAGS="$(DEBUG)"
--- 6,26 ----
MANDIR= ${prefix}/man
! SRCS = autopunto.c \
! faleatorias.c \
! imfradim.c \
! mandelbrot.c \
! muta.c \
! ncomplejos.c \
! precalcular.c \
! tratImagen.c \
! util.c
! OBJS = $(SRCS:.c=.o)
CC = gcc $(FLAGS)
NORMAL = -ffast-math -fomit-frame-pointer -Wall -O6 -funroll-loops -s
DEBUG = -ffast-math -fomit-frame-pointer -Wall -O3 -funroll-loops -g -DDEBUG
+ #DEBUG = -march=athlon-tbird -m3dnow -mmmx -ffast-math -fomit-frame-pointer -Wall -O3 -funroll-all-loops -DDEBUG
all:
! make imfradim FLAGS="$(NORMAL)"
debug:
make imfradim FLAGS="$(DEBUG)"
Index: imfradim.c
===================================================================
RCS file: /cvsroot/imfradim/imfradim/src/imfradim.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** imfradim.c 27 Oct 2002 22:44:59 -0000 1.2
--- imfradim.c 29 Oct 2002 18:05:14 -0000 1.3
***************
*** 86,90 ****
#ifndef DEBUG
! //fprintf (stdout, "Content-type: image/png\n\n");
#else
fprintf (stderr, "\n%s.\nFecha compilación: %s %s\n\n", VERSION, __DATE__, __TIME__);
--- 86,90 ----
#ifndef DEBUG
! fprintf (stdout, "Content-type: image/png\n\n");
#else
fprintf (stderr, "\n%s.\nFecha compilación: %s %s\n\n", VERSION, __DATE__, __TIME__);
***************
*** 92,98 ****
for (i = 0; i <= nIntentos; i++) {
#ifdef ALEATORIO
- iniserie ();
ptoAleatorio (-2.2, 1.2, -1.6, 1.6, &x1, &x2, &y1, &y2);
muta (&mutData.factorr, &mutData.opr);
--- 92,98 ----
+ iniserie ();
for (i = 0; i <= nIntentos; i++) {
#ifdef ALEATORIO
ptoAleatorio (-2.2, 1.2, -1.6, 1.6, &x1, &x2, &y1, &y2);
muta (&mutData.factorr, &mutData.opr);
***************
*** 115,120 ****
// información para insertar en la imagen que permita
// volver a calcular la imagen
! // ¡OJO! el tamaño de la cadena es el justo
! sprintf (informacion, "\nAncho: %i, Altura: %i.\nEsquina superior izquierda: (%f,%f)\nEsquina inferior derecha: (%f,%f)\nMutaciones:\nReal: factor %f, operación %i.\nImaginario: factor %f, operación %i.\n",ancho, altura, x1, y1, x2, y2, mutData.factorr, mutData.opr, mutData.factori, mutData.opi);
inicializaImagen (&Picture, stdout, altura, ancho, informacion);
--- 115,123 ----
// información para insertar en la imagen que permita
// volver a calcular la imagen
! if (snprintf (informacion, strlen(informacion), "\nAncho: %i, Altura: %i.\nEsquina superior izquierda: (%f,%f)\nEsquina inferior derecha: (%f,%f)\nMutaciones:\nReal: factor %f, operación %i.\nImaginario: factor %f, operación %i.\n",ancho, altura, x1, y1, x2, y2, mutData.factorr, mutData.opr, mutData.factori, mutData.opi) == -1) {
! #ifdef DEBUG
! fprintf (stderr, "%s(%i): Tamaño de la cadena informacion insuficiente\n", __FILE__, __LINE__);
! #endif
! }
inicializaImagen (&Picture, stdout, altura, ancho, informacion);
***************
*** 136,140 ****
// crear la imagen y mostrarla
calcularMandelbrot (&Picture, ancho, altura, x1, x2, y1, y2, mutData);
! mostrarImagen (&Picture);
#ifdef DEBUG
--- 139,143 ----
// crear la imagen y mostrarla
calcularMandelbrot (&Picture, ancho, altura, x1, x2, y1, y2, mutData);
! //mostrarImagen (&Picture);
#ifdef DEBUG
|
|
From: C?sar P?r. T. <or...@us...> - 2002-10-27 22:45:03
|
Update of /cvsroot/imfradim/imfradim/src
In directory usw-pr-cvs1:/tmp/cvs-serv10672
Modified Files:
Makefile imfradim.c imfradim.h muta.c
Log Message:
Minor fixes
Index: Makefile
===================================================================
RCS file: /cvsroot/imfradim/imfradim/src/Makefile,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** Makefile 26 Apr 2001 17:02:24 -0000 1.1.1.1
--- Makefile 27 Oct 2002 22:44:59 -0000 1.2
***************
*** 10,14 ****
CC = gcc $(FLAGS)
NORMAL = -ffast-math -fomit-frame-pointer -Wall -O6 -funroll-loops -s
! DEBUG = -ffast-math -fomit-frame-pointer -Wall -O3 -funroll-loops -g -DDEBUG
all:
--- 10,14 ----
CC = gcc $(FLAGS)
NORMAL = -ffast-math -fomit-frame-pointer -Wall -O6 -funroll-loops -s
! DEBUG = -ffast-math -fomit-frame-pointer -Wall -O3 -funroll-loops -g -DDEBUG
all:
Index: imfradim.c
===================================================================
RCS file: /cvsroot/imfradim/imfradim/src/imfradim.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** imfradim.c 26 Apr 2001 17:02:24 -0000 1.1.1.1
--- imfradim.c 27 Oct 2002 22:44:59 -0000 1.2
***************
*** 32,35 ****
--- 32,36 ----
#include <stdio.h>
+ #include <stdlib.h>
//#include <cgi.h>
#include "tratImagen.h"
***************
*** 43,51 ****
#ifndef NOALEATORIO
#define ALEATORIO
#endif
- #ifdef ALEATORIO
- #include "autopunto.h"
- #endif
#ifdef DEBUG
#include <unistd.h>
--- 44,50 ----
#ifndef NOALEATORIO
#define ALEATORIO
+ #include "autopunto.h"
#endif
#ifdef DEBUG
#include <unistd.h>
***************
*** 86,94 ****
nIntentos = NINTENTOS;
- #ifndef NOALT
- iniserie ();
- #endif
#ifndef DEBUG
! fprintf (stdout, "Content-type: image/png\n\n");
#else
fprintf (stderr, "\n%s.\nFecha compilación: %s %s\n\n", VERSION, __DATE__, __TIME__);
--- 85,90 ----
nIntentos = NINTENTOS;
#ifndef DEBUG
! //fprintf (stdout, "Content-type: image/png\n\n");
#else
fprintf (stderr, "\n%s.\nFecha compilación: %s %s\n\n", VERSION, __DATE__, __TIME__);
***************
*** 98,105 ****
for (i = 0; i <= nIntentos; i++) {
#ifdef ALEATORIO
ptoAleatorio (-2.2, 1.2, -1.6, 1.6, &x1, &x2, &y1, &y2);
- #endif ALEATORIO
muta (&mutData.factorr, &mutData.opr);
muta (&mutData.factori, &mutData.opi);
// comprobar si la imagen será interesante
--- 94,102 ----
for (i = 0; i <= nIntentos; i++) {
#ifdef ALEATORIO
+ iniserie ();
ptoAleatorio (-2.2, 1.2, -1.6, 1.6, &x1, &x2, &y1, &y2);
muta (&mutData.factorr, &mutData.opr);
muta (&mutData.factori, &mutData.opi);
+ #endif
// comprobar si la imagen será interesante
***************
*** 119,123 ****
// volver a calcular la imagen
// ¡OJO! el tamaño de la cadena es el justo
! sprintf (informacion, "\nAncho: %i, Altura: %i.\nEsquina superior izquierda: (%f,%f)\nEsquina inferior derecha: (%f,%f)\nMutaciones:\n\tReal: factor %f, operación %i.\n\tImaginario: factor %f, operación %i.\n",ancho, altura, x1, y1, x2, y2, mutData.factorr, mutData.opr, mutData.factori, mutData.opi);
inicializaImagen (&Picture, stdout, altura, ancho, informacion);
--- 116,120 ----
// volver a calcular la imagen
// ¡OJO! el tamaño de la cadena es el justo
! sprintf (informacion, "\nAncho: %i, Altura: %i.\nEsquina superior izquierda: (%f,%f)\nEsquina inferior derecha: (%f,%f)\nMutaciones:\nReal: factor %f, operación %i.\nImaginario: factor %f, operación %i.\n",ancho, altura, x1, y1, x2, y2, mutData.factorr, mutData.opr, mutData.factori, mutData.opi);
inicializaImagen (&Picture, stdout, altura, ancho, informacion);
Index: imfradim.h
===================================================================
RCS file: /cvsroot/imfradim/imfradim/src/imfradim.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** imfradim.h 26 Apr 2001 17:02:24 -0000 1.1.1.1
--- imfradim.h 27 Oct 2002 22:44:59 -0000 1.2
***************
*** 39,44 ****
// para buscar una imagen interesante
! #define ANCHO 1024/2
! #define ALTURA 768/2
#define VERSION "Imfradim 0.6ß Copyright (C) 2000-2001 César Pérez"
--- 39,44 ----
// para buscar una imagen interesante
! #define ANCHO 1024/4
! #define ALTURA 768/4
#define VERSION "Imfradim 0.6ß Copyright (C) 2000-2001 César Pérez"
Index: muta.c
===================================================================
RCS file: /cvsroot/imfradim/imfradim/src/muta.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** muta.c 26 Apr 2001 17:02:24 -0000 1.1.1.1
--- muta.c 27 Oct 2002 22:44:59 -0000 1.2
***************
*** 54,58 ****
*factor = naleatorio (3.5);
break;
! default:
}
#ifdef DEBUG
--- 54,58 ----
*factor = naleatorio (3.5);
break;
! // default:
}
#ifdef DEBUG
|