]> xenbits.xensource.com Git - pvdrivers/win/xeniface.git/commit
Replace UTF8_STRING with OEM_STRING
authorOwen Smith <owen.smith@citrix.com>
Tue, 21 Sep 2021 10:45:52 +0000 (11:45 +0100)
committerPaul Durrant <pdurrant@amazon.com>
Wed, 22 Sep 2021 10:00:02 +0000 (11:00 +0100)
commita9e80c28a3c520986cbb64d93031aa957240b376
tree7d5362f25a628096dc761cf19a02366f74b7d0ca
parentb44a6cb8bbe95514f89c244aa7a59444124096aa
Replace UTF8_STRING with OEM_STRING

The UTF8 conversion functions treat UTF8_STRING as:
  struct {
      USHORT  Length;
      CHAR    Buffer[ANYSIZE_ARRAY];
  } UTF8_STRING;

But UTF8_STRING is defined by later WDKs as:
  struct {
      USHORT  Length;
      USHORT  MaximumLength;
      PCHAR   Buffer;
  } UTF8_STRING;

This difference leads to an 0x3B BSOD when anything attempts to use any WMI
method that deals with strings.

Replace UTF8_STRING with OEM_STRING which is available in all WDKs, and has
the same definition as UTF8_STRING from later WDKs, simplifying the usage
of retrieving strings from, or putting strings into, WMI buffers.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/xeniface/wmi.c