remove bad strncmp() conversion

This commit is contained in:
naddy 2005-11-20 18:17:14 +00:00
parent 6c82ee581d
commit 697b54ec3c
2 changed files with 3 additions and 15 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.9 2005/11/20 18:03:25 naddy Exp $
# $OpenBSD: Makefile,v 1.10 2005/11/20 18:17:14 naddy Exp $
COMMENT= "OpenGL Utility Toolkit"
DISTNAME= glut-3.7
PKGNAME= ${DISTNAME}p0
CATEGORIES= graphics devel
MASTER_SITES= http://www.opengl.org/resources/libraries/glut/
@ -20,8 +21,7 @@ NO_REGRESS= Yes
post-extract:
@perl -i -p -e 's/3GLUT/3/;' ${WRKSRC}/man/glut/*.man
@perl -i -p -e 's/\r//;' ${WRKSRC}/man/glut/*.man \
${WRKSRC}/lib/glut/strokegen.y \
${WRKSRC}/lib/glut/strokelex.l
${WRKSRC}/lib/glut/strokegen.y
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/include/GL

View File

@ -1,12 +0,0 @@
$OpenBSD: patch-lib_glut_strokelex_l,v 1.2 2005/11/20 18:03:25 naddy Exp $
--- lib/glut/strokelex.l.orig Sun Nov 20 18:53:41 2005
+++ lib/glut/strokelex.l Sun Nov 20 18:52:58 2005
@@ -103,7 +103,7 @@ char str[];
reserved = res_table;
do
- if (!strcmp(str, reserved->word))
+ if (!strncmp(str, reserved->word, sizeof(str)))
break;
while ((++reserved)->word != 0);
return reserved->token;