# HG changeset patch # User Jayakara Kini # Date 1232515965 -19800 # Node ID c2ef2f9a3ec097206432dd486424bc98cddf0823 # Parent d56635da4e5c2f820f7ad960d5e3338f0a96c282 4804022 ucb sed has an off-by-one error in its label length check Portions contributed by Ashwin Bhat diff -r d56635da4e5c -r c2ef2f9a3ec0 usr/src/ucbcmd/sed/sed0.c --- 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 #include #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';