Fix a vulnerability. Patch from Ben Collver in PR 22165.

Bump PKGREVISION.
This commit is contained in:
wiz 2003-07-28 16:03:19 +00:00
parent 09e959ee41
commit f0dda7d927
3 changed files with 21 additions and 3 deletions

View file

@ -1,9 +1,9 @@
# $NetBSD: Makefile,v 1.8 2003/07/26 21:41:16 jmmv Exp $
# $NetBSD: Makefile,v 1.9 2003/07/28 16:03:19 wiz Exp $
#
DISTNAME= nethack_source_331_jtp_193
PKGNAME= falcons-eye-1.9.3
PKGREVISION= 2
PKGREVISION= 3
WRKSRC= ${WRKDIR}
CATEGORIES= games
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=falconseye/}

View file

@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.1.1.1 2002/01/21 11:56:16 pooka Exp $
$NetBSD: distinfo,v 1.2 2003/07/28 16:03:19 wiz Exp $
SHA1 (nethack_source_331_jtp_193.zip) = 8e002c7f7ca039de875b3c797b2584a517aad6ce
Size (nethack_source_331_jtp_193.zip) = 8405675 bytes
@ -17,3 +17,4 @@ SHA1 (patch-be) = 632a256780e80c8127635080df5112ce7678d4df
SHA1 (patch-bf) = b58009fe635389483c34b50afca6aba9cb75fc72
SHA1 (patch-bh) = 65bf424d1e60b0ee9b9acc8b04359f2f4621e605
SHA1 (patch-bi) = 6b3d0d1eca3a23c3086155c1da3c2965d7092d5f
SHA1 (patch-bj) = 281f1d3b8d9eafe7fbe7ca729861d4bdccea5a41

View file

@ -0,0 +1,17 @@
$NetBSD: patch-bj,v 1.1 2003/07/28 16:03:21 wiz Exp $
--- src/topten.c.orig Sun Jun 24 18:57:18 2001
+++ src/topten.c
@@ -855,6 +855,12 @@ char **argv;
else {
if (playerct > 1) Strcat(pbuf, "any of ");
for (i = 0; i < playerct; i++) {
+ /* stop printing players if there are too many to fit */
+ if (strlen(pbuf) + strlen(players[i]) + 2 >= BUFSZ) {
+ if (strlen(pbuf) < BUFSZ-4) Strcat(pbuf, "...");
+ else Strcpy(pbuf+strlen(pbuf)-4, "...");
+ break;
+ }
Strcat(pbuf, players[i]);
if (i < playerct-1) Strcat(pbuf, ":");
}