changeset 8591:c2ef2f9a3ec0 onnv_ onnv_107

4804022 ucb sed has an off-by-one error in its label length check Portions contributed by Ashwin Bhat <ashwinbhatks@gmail.com>
author Jayakara Kini <Jayakara.Kini@Sun.COM>
date Wed, 21 Jan 2009 11:02:45 +0530
parents d56635da4e5c
children 0c46eb0c1725
files usr/src/ucbcmd/sed/sed0.c
diffstat 1 files changed, 5 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/usr/src/ucbcmd/sed/sed0.c	Tue Jan 20 21:15:01 2009 -0800
+++ b/usr/src/ucbcmd/sed/sed0.c	Wed Jan 21 11:02:45 2009 +0530
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,16 +19,13 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
 /*	Copyright (c) 1984 AT&T	*/
 /*	  All Rights Reserved  	*/
 
-
-#pragma ident	"%Z%%M%	%I%	%E% SMI"
-
 #include <stdio.h>
 #include <sys/param.h>
 #include "sed.h"
@@ -291,7 +287,7 @@
 
 				tp = lab->asc;
 				while((*tp++ = *cp++))
-					if(tp >= &(lab->asc[8]))
+					if(tp >= &(lab->asc[9]))
 						comperr(LTL);
 				*--tp = '\0';
 
@@ -378,7 +374,7 @@
 				}
 				tp = lab->asc;
 				while((*tp++ = *cp++))
-					if(tp >= &(lab->asc[8]))
+					if(tp >= &(lab->asc[9]))
 						comperr(LTL);
 				cp--;
 				*--tp = '\0';