win-pvdrivers

changeset 358:c85311cc1aec

fix bug in RtlStringCbPrintfW.
author Andy Grover <andy.grover@oracle.com>
date Wed Jul 02 11:40:56 2008 -0700 (2008-07-02)
parents 25166765975f
children c50047d5950a 2dfaca251422
files xenpci/mingw_extras.c
line diff
     1.1 --- a/xenpci/mingw_extras.c	Wed Jul 02 11:35:56 2008 -0700
     1.2 +++ b/xenpci/mingw_extras.c	Wed Jul 02 11:40:56 2008 -0700
     1.3 @@ -35,7 +35,8 @@ RtlStringCbPrintfW(
     1.4    if (len >= (dest_size * sizeof(win_wchar_t))) {
     1.5      /* output buffer truncated */
     1.6      status = STATUS_BUFFER_OVERFLOW;
     1.7 -    tmp_buf[sizeof(tmp_buf)-1] = '\0';
     1.8 +    len = sizeof(tmp_buf) - 1;
     1.9 +    tmp_buf[len] = '\0';
    1.10    }
    1.11  
    1.12    /* copy byte-string to short_string, incl NULL */