From c759699dba49ace90ca9367a65512e61859d7fa4 Mon Sep 17 00:00:00 2001 From: jylam Date: Wed, 27 Aug 2008 13:25:42 +0000 Subject: [PATCH] * Fixed the second part of the previous buffer overflow. No comment. git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2783 92316355-f0b4-4df1-b90c-862c8a59935f --- examples/line.c | 2 +- pipi/paint/aline_template.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/line.c b/examples/line.c index 5d63201..899713b 100644 --- a/examples/line.c +++ b/examples/line.c @@ -11,7 +11,7 @@ int main(int argc, char *argv[]) { char *srcname = NULL, *dstname = NULL; pipi_image_t *img, *newimg; - int count = 1000; + int count = 10000; int ret = 0; if(argc < 2) { diff --git a/pipi/paint/aline_template.h b/pipi/paint/aline_template.h index c26aaba..7b36e73 100644 --- a/pipi/paint/aline_template.h +++ b/pipi/paint/aline_template.h @@ -45,7 +45,7 @@ if (fabsf(xd) > fabsf(yd)) { val2 = fractf(yend)*xgap; PLOT(ix1, iy1, val1); - PLOT(ix1, iy1+1, val2); + PLOT(ix1, (iy1+1) fabsf(yd)) { val2 = fractf(yend)*xgap; PLOT(ix2, iy2, val1); - PLOT(ix2, iy2+1, val2); + PLOT(ix2, iy2+1