On Fri, Oct 28, 2016 at 11:44:37AM +0100, Ard Biesheuvel wrote: > Get rid of calls to unsafe string functions. These are deprecated and may > be removed in the future. > > Contributed-under: TianoCore Contribution Agreement 1.0 > Signed-off-by: Ard Biesheuvel <[email protected]>
Reviewed-by: Leif Lindholm <[email protected]> (I also agree with Laszlo's comment regarding the commit message.) > --- > EmbeddedPkg/Universal/MmcDxe/Diagnostics.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c > b/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c > index 783e548d2aed..7d6a5a0dde01 100644 > --- a/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c > +++ b/EmbeddedPkg/Universal/MmcDxe/Diagnostics.c > @@ -42,9 +42,9 @@ DiagnosticLog ( > ) > { > UINTN len = StrLen (Str); > - if (len <= mLogRemainChar) { > + if (len < mLogRemainChar) { > + StrCpyS (mLogBuffer, mLogRemainChar, Str); > mLogRemainChar -= len; > - StrCpy (mLogBuffer, Str); > mLogBuffer += len; > return len; > } else { > -- > 2.7.4 > _______________________________________________ edk2-devel mailing list [email protected] https://lists.01.org/mailman/listinfo/edk2-devel

