From f9b3f8f869d5332cec22d44586d6dd1bff2f880c Mon Sep 17 00:00:00 2001 From: Tom Yu Date: Wed, 2 Jun 2004 21:56:02 +0000 Subject: [PATCH] fix missing braces in an_to_ln.c security patch * an_to_ln.c (do_replacement): Patch from Bill Dodd to fix missing braces in previous security patch. ticket: new tags: pullup target_version: 1.3.4 version_reported: 1.3.4 component: krb5-libs git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16384 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/os/ChangeLog | 5 +++++ src/lib/krb5/os/an_to_ln.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 790bc2f2b..a0d649655 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ +2004-06-02 Tom Yu + + * an_to_ln.c (do_replacement): Patch from Bill Dodd to fix missing + braces in previous security patch. + 2004-06-01 Sam Hartman * an_to_ln.c (rule_an_to_ln): Fix buffer overflow when parsing diff --git a/src/lib/krb5/os/an_to_ln.c b/src/lib/krb5/os/an_to_ln.c index c134cafcf..2430b27e2 100644 --- a/src/lib/krb5/os/an_to_ln.c +++ b/src/lib/krb5/os/an_to_ln.c @@ -340,9 +340,10 @@ do_replacement(char *regexp, char *repl, int doall, char *in, char *out) strncpy(op, repl, MAX_FORMAT_BUFFER - 1 - (op - out)); op += strlen(repl); cp += edispl; - if (!doall) + if (!doall) { use_bytes(strlen(cp)); strncpy(op, cp, MAX_FORMAT_BUFFER - 1 - (op - out)); + } matched = 1; } else { -- 2.26.2