Commit 673939f2 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

fixed range check of blur type parameter (bug #142965).

2004-05-24  Sven Neumann  <sven@gimp.org>

	* plug-ins/common/mblur.c: fixed range check of blur type
	parameter (bug #142965).
parent 1c860eb1
2004-05-24 Sven Neumann <sven@gimp.org>
* plug-ins/common/mblur.c: fixed range check of blur type
parameter (bug #142965).
2004-05-24 Sven Neumann <sven@gimp.org>
* plug-ins/maze/maze_face.c: fixed a compiler warning.
......
......@@ -65,11 +65,14 @@
#define PLUG_IN_VERSION "Sep 1997, 1.2"
#define HELP_ID "plug-in-mblur"
#define MBLUR_LINEAR 0
#define MBLUR_RADIAL 1
#define MBLUR_ZOOM 2
typedef enum
{
MBLUR_LINEAR,
MBLUR_RADIAL,
MBLUR_ZOOM,
MBLUR_MAX = MBLUR_ZOOM
} MBlurType;
#define MBLUR_MAX MBLUR_ZOOM
typedef struct
{
......@@ -221,7 +224,7 @@ run (const gchar *name,
mbvals.angle = param[5].data.d_int32;
}
if ((mbvals.mblur_type < 0) && (mbvals.mblur_type > MBLUR_ZOOM))
if ((mbvals.mblur_type < 0) || (mbvals.mblur_type > MBLUR_MAX))
status= GIMP_PDB_CALLING_ERROR;
break;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment