From 7f95a47243bbf7e5500bbb10650d118b72845b10 Mon Sep 17 00:00:00 2001 From: didg Date: Mon, 2 Feb 2009 10:24:28 +0000 Subject: [PATCH 1/1] check buffer size --- etc/papd/ppd.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/papd/ppd.c b/etc/papd/ppd.c index 786ee9c6..e80b4a77 100644 --- a/etc/papd/ppd.c +++ b/etc/papd/ppd.c @@ -1,5 +1,5 @@ /* - * $Id: ppd.c,v 1.14 2009-01-21 04:04:20 didg Exp $ + * $Id: ppd.c,v 1.15 2009-02-02 10:24:28 didg Exp $ * * Copyright (c) 1995 Regents of The University of Michigan. * All Rights Reserved. See COPYRIGHT. @@ -289,6 +289,9 @@ struct ppd_feature *ppd_feature( feature, len ) } #endif /* SHOWPPD */ + if (len > sizeof(ppd_feature_main) -1) + return( NULL ); + for ( end = feature + len, p = feature, q = ppd_feature_main; (p <= end) && (*p != '\n') && (*p != '\r'); p++, q++ ) { *q = *p; -- 2.39.2