diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2000-07-11 20:39:00 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2000-07-11 20:39:00 +0000 |
commit | 96943544ba59a36aa83031837caffae772d299f9 (patch) | |
tree | ac6095d761b6107a8e030ea5caa912faced54831 /src/glu/mesa | |
parent | fb88eeee9f9dc759570a1d09ec9a262ae8c3b5c2 (diff) |
allocate 1-larger knot array in explode_knot() (Mesa bug 104881)
Diffstat (limited to 'src/glu/mesa')
-rw-r--r-- | src/glu/mesa/nurbsutl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glu/mesa/nurbsutl.c b/src/glu/mesa/nurbsutl.c index b28825858e..516984b314 100644 --- a/src/glu/mesa/nurbsutl.c +++ b/src/glu/mesa/nurbsutl.c @@ -1,4 +1,4 @@ -/* $Id: nurbsutl.c,v 1.2 2000/07/11 14:11:04 brianp Exp $ */ +/* $Id: nurbsutl.c,v 1.3 2000/07/11 20:39:00 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -373,7 +373,7 @@ GLenum explode_knot(knot_str_type * the_knot) /* alloc space for new_knot */ if ( (new_knot = - (GLfloat *) malloc(sizeof(GLfloat) * (nknots + n_new_knots))) == NULL) { + (GLfloat *) malloc(sizeof(GLfloat) * (nknots + n_new_knots + 1))) == NULL) { return GLU_OUT_OF_MEMORY; } /* fill in new knot */ |