From 57b46ee6ea62f233b20d20aabedbacd814a15697 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 11 Jun 2001 19:44:01 +0000 Subject: check for PB overflow in general_flat_rgba_line() --- src/mesa/swrast/s_lines.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mesa/swrast/s_lines.c') diff --git a/src/mesa/swrast/s_lines.c b/src/mesa/swrast/s_lines.c index c5523a432c..c17d6fbef3 100644 --- a/src/mesa/swrast/s_lines.c +++ b/src/mesa/swrast/s_lines.c @@ -1,4 +1,4 @@ -/* $Id: s_lines.c,v 1.18 2001/05/21 18:13:43 brianp Exp $ */ +/* $Id: s_lines.c,v 1.19 2001/06/11 19:44:01 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -548,6 +548,7 @@ static void general_flat_rgba_line( GLcontext *ctx, { struct pixel_buffer *PB = SWRAST_CONTEXT(ctx)->PB; const GLchan *color = vert1->color; + GLuint count; PB_SET_COLOR( PB, color[0], color[1], color[2], color[3] ); if (ctx->Line.StippleFlag) { @@ -557,7 +558,10 @@ static void general_flat_rgba_line( GLcontext *ctx, #define INTERP_FOG 1 #define WIDE 1 #define STIPPLE 1 -#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, Z, fog0); +#define PLOT(X,Y) \ + PB_WRITE_PIXEL(PB, X, Y, Z, fog0); \ + count = PB->count; \ + CHECK_FULL(count); #include "s_linetemp.h" } else { @@ -579,7 +583,10 @@ static void general_flat_rgba_line( GLcontext *ctx, #define INTERP_Z 1 #define INTERP_FOG 1 #define WIDE 1 -#define PLOT(X,Y) PB_WRITE_PIXEL(PB, X, Y, Z, fog0); +#define PLOT(X,Y) \ + PB_WRITE_PIXEL(PB, X, Y, Z, fog0); \ + count = PB->count; \ + CHECK_FULL(count); #include "s_linetemp.h" } } -- cgit v1.2.3