diff --git a/dlls/wbemprox/table.c b/dlls/wbemprox/table.c index 34b09bc872f..ab386efa06b 100644 --- a/dlls/wbemprox/table.c +++ b/dlls/wbemprox/table.c @@ -178,7 +178,7 @@ BSTR get_value_bstr( const struct table *table, UINT row, UINT column ) if (!val) return NULL; len = lstrlenW( (const WCHAR *)(INT_PTR)val ) + 2; if (!(ret = SysAllocStringLen( NULL, len ))) return NULL; - swprintf( ret, len, L"\"%s\"", (const WCHAR *)(INT_PTR)val ); + swprintf( ret, len + 1, L"\"%s\"", (const WCHAR *)(INT_PTR)val ); return ret; case CIM_SINT16: