fix obvious off-by-one memory access as reported on misc@; ok mcbride

This commit is contained in:
pvalchev 2005-09-06 04:59:58 +00:00
parent 991bc728f6
commit 9fd4dd42db
2 changed files with 14 additions and 2 deletions

View File

@ -1,9 +1,9 @@
# $OpenBSD: Makefile,v 1.16 2004/12/17 15:03:18 alek Exp $
# $OpenBSD: Makefile,v 1.17 2005/09/06 04:59:58 pvalchev Exp $
COMMENT= "X11 trippy color-cycling toy"
DISTNAME= xtacy114
PKGNAME= xtacy-1.14
PKGNAME= xtacy-1.14p0
CATEGORIES= x11
MASTER_SITES= ftp://sidehack.gweep.net/pub/software/ \

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-color_c,v 1.1 2005/09/06 04:59:58 pvalchev Exp $
--- color.c.orig Thu Sep 3 23:40:45 1998
+++ color.c Mon Sep 5 19:37:03 2005
@@ -938,7 +938,7 @@ allocPhatColors()
{
fprintf(stderr,"Aieeee.. memory problem alloc'ing HC\n");
}
- for(i=0;i<=numcolors;i++)
+ for(i=0;i<numcolors;i++)
{
colors[i]=(long*)calloc(3,sizeof(long));
}