- Use g_malloc* functions instead of malloc, so we don't continue on
failed allocations unless we test for NULL.
- Make sure we don't iterate past the known number of control points (ncps).
- Safely allocate, initialize and free points. Since points seems to be
used uninitialized, we use g_malloc0 to set everything to 0.
Thanks to a report by Stefan Cornelius, we became aware that the flame
plug-in does no checking for correct input when loading a pre-saved
settings file.
I reworked the parser to read one or more values based on the type of
token, making sure we also don't read past the end of our token buffer.
All int values have a min and max value set. If any unexpected input is
encountered, we will give a warning.
The flame plug-in can read stored settings from a file. The expected
input is that a ; signifies the end of input.
However, with user input we cannot depend on this to be true, so we need
to make sure that we do not read past the end of our input buffer.
To do so, we add a length check.
2009-01-17 Michael Natterer <mitch@gimp.org>
* all files with a GPL header and all COPYING files:
Change licence to GPLv3 (and to LGPLv3 for libgimp).
Cleaned up some copyright headers and regenerated the parsers in
the ImageMap plugin.
svn path=/trunk/; revision=27913
2008-04-26 Martin Nordholts <martinn@svn.gnome.org>
* plug-ins/flame/libifs.c: Applied patch from Aurimas Juška. Use
the standard rand() instead of random().
svn path=/trunk/; revision=25534
2008-04-26 Martin Nordholts <martinn@svn.gnome.org>
* plug-ins/flame/flame.c
* plug-ins/flame/libifs.[ch]: Applied
modified patch by Luis Barrancos that adds 22 new variations to
the flame plugin (bug #389004).
svn path=/trunk/; revision=25527
2007-02-18 Michael Natterer <mitch@gimp.org>
* app/text/gimptext-parasite.c
* plug-ins/flame/libifs.c: use g_strtod() instead of atof()
because these files have to parse strings that never had a clearly
specified format.
* plug-ins/script-fu/tinyscheme/scheme.c
* plug-ins/imagemap/imap_cern.l
* plug-ins/imagemap/imap_csim.l
* plug-ins/imagemap/imap_csim.y
* plug-ins/imagemap/imap_ncsa.l: use g_ascii_strtod() instead of
atof() because scheme code and imagemap files with wrong decimal
separators are clearly broken and should be rejected.
* plug-ins/imagemap/imap_cern_lex.c
* plug-ins/imagemap/imap_csim_lex.c
* plug-ins/imagemap/imap_csim_parse.c
* plug-ins/imagemap/imap_ncsa_lex.c: regenerated.
* plug-ins/common/sample_colorize.c: round numbers using sane code
instead of sprintf() and atod().
* plug-ins/Lighting/lighting_ui.c: removed some dead code.
svn path=/trunk/; revision=21942
2002-11-20 Dave Neary <bolsh@gimp.org>
* configure.in
* app/core/gimpbrushpipe.c
* app/gui/about-dialog.c
* app/paint-funcs/paint-funcs-generic.h
* app/paint-funcs/paint-funcs.c
* libgimpmath/gimpmath.h
* libgimpwidgets/gimpwidgets.c
* plug-ins/common/CML_explorer.c
* plug-ins/common/blur.c
* plug-ins/common/cubism.c
* plug-ins/common/gee.c
* plug-ins/common/gee_zoom.c
* plug-ins/common/gqbist.c
* plug-ins/common/jigsaw.c
* plug-ins/common/lic.c
* plug-ins/common/noisify.c
* plug-ins/common/nova.c
* plug-ins/common/papertile.c
* plug-ins/common/plasma.c
* plug-ins/common/randomize.c
* plug-ins/common/sample_colorize.c
* plug-ins/common/scatter_hsv.c
* plug-ins/common/shift.c
* plug-ins/common/sinus.c
* plug-ins/common/smooth_palette.c
* plug-ins/common/snoise.c
* plug-ins/common/sparkle.c
* plug-ins/common/spheredesigner.c
* plug-ins/common/spread.c
* plug-ins/common/warp.c
* plug-ins/common/wind.c
* plug-ins/flame/cmap.c
* plug-ins/flame/flame.c
* plug-ins/flame/libifs.c
* plug-ins/gflare/gflare.c
* plug-ins/gimpressionist/gimpressionist.c
* plug-ins/gimpressionist/gimpressionist.h
* plug-ins/gimpressionist/plasma.c
* plug-ins/gimpressionist/repaint.c
* plug-ins/ifscompose/ifscompose_utils.c
* plug-ins/maze/algorithms.c
* plug-ins/maze/maze.c
* plug-ins/maze/maze.h
* plug-ins/mosaic/mosaic.c: Change all occurrences of RAND_MAX,
G_MAXRAND, rand(), srand(), lrand48(), srand48(), random(),
srandom(), RAND_FUNC and SRAND_FUNC to the appropriate g_rand*
equivalent. Programs which require seed setting for reproducible
results, and anything in the core, gets a dedicated GRand * for
the lifetime required. Programs which only ever used random
numbers for tossing a coin, rolling a dice, etc use g_random
functions. For the rest, judgement was used. Where it was easy, a
GRand * object was used and g_rand_* functions were
preferred. This fixes bug #67386 in HEAD.
* libgimp/gimpui.h: include all header files that belong to
libgimpui
* plug-ins/common/compose.c
* plug-ins/common/grid.c
* plug-ins/common/tiff.c
* plug-ins/flame/flame.c
* plug-ins/flame/libifs.c
* plug-ins/gdyntext/charmap.c
* plug-ins/gdyntext/charmap_window.c
* plug-ins/gdyntext/font_selection.c
* plug-ins/gdyntext/message_window.c
* plug-ins/imagemap/imap_preferences.c
* plug-ins/script-fu/script-fu-scripts.c
* plug-ins/sel2path/math.c: out of libgimp only include gimp.h,
gimpui.h and stdplugins-intl.h
--Sven
1999-09-01 Tor Lillqvist <tml@iki.fi>
* app/appenv.h
* libgimp/gimpmath.h: New file. Includes <math.h>. Move G_PI,
RINT(), ROUND() etc from app/appenv.h here, so plug-ins can
use them, too. Remove some commented-out old stuff in appenv.h.
* libgimp/gimp.h: Include gimpmath.h.
* libgimp/gimp.c (gimp_main): Win32: Don't install signal
handlers, we can't do anything useful in the handler ourselves
anyway (it would be nice to print out a backtrace, but that seems
pretty hard to do, even if not impossible). Let Windows inform the
user about the crash. If the plug-in was compiled with MSVC, and
the user also has it, she is offered a chance to start the
debugger automatically anyway.
* app/*several*.c: Include gimpmath.h for G_PI etc. Don't include
<math.h>, as gimpmath.h includes it.
* plug-ins/*/*many*.c: Include config.h. Don't include <math.h>.
Remove all the duplicated definitions of G_PI and rint(). Use
RINT() instead of rint().
* app/app_procs.[ch]: app_exit() takes a gboolean.
* app/batch.c
* app/commands.c
* app/interface.c: Call app_exit() with FALSE or TRUE.
* app/main.c (on_error): Call gimp_fatal_error. (main): Don't
install any signal handler on Win32 here, either.
* app/errors.c (gimp_fatal_error, gimp_terminate): Win32: Format
the message and call MessageBox with it. g_on_error_query doesn't
do anything useful on Win32, and printf'ing a message to stdout or
stderr doesn't do anything, either, in a windowing application.
* Upgraded to libtool 1.2b
* Reversioned libgimp to use gtk-style without a funky soname
* configure.in: craft GLIB_CFLAGS and GLIB_LIBS
* Makefile.am (pretty much all of em): changed to use new library
naming scheme. Only link libgimpui and libgtk et al to the plugins
that actually need them.
* app/gimage_cmds.c: corrected typo that resulted in corrupt PDB
record
* libgimp/gimp.h
* libgimp/gimpwire.h
* libgimp/gimpmenu.[ch]: clean up the callback code
* Removed unecessary inclusion of gtk headers for plugins that
don't use em
* plug-ins/zealouscrop/zealouscrop.c: use gint8 instead of gboolean,
save some mem
* plugged some warnings in animationplay, flame, fp, gee, gfig
* gimptool.in: changes for library reversioning, added --nogimpui
option for not linking in libgimpui
* configure.in: added finnish translation
-Yosh
* app/disp_callbacks.h: add declaration to get interface.c to compile
* autogen.sh: make sure we know about ACLOCAL_FLAGS
* I went on a compiler warning pogrom
-Yosh
random() and add -lucb on systems that need it. Fix for xdelta.h check. Find
xemacs as well as emacs. Properly define settings for print plugin.
app/Makefile.am: ditch -DNDEBUG, since nothing uses it
flame: properly handle random() and friends
pnm: workaround for systems with old sprintfs
print, sgi: fold back in portability fixes
threshold_alpha: properly get params in non-interactive mode
bmp: updated and merged in
-Yosh