• Patrick Mezard's avatar
    internal/syscall/windows/registry: fix read overrun in GetStringsValue · 335e44d2
    Patrick Mezard authored
    According to MSDN RegQueryValueEx page:
    
      If the data has the REG_SZ, REG_MULTI_SZ or REG_EXPAND_SZ type, the
      string may not have been stored with the proper terminating null
      characters. Therefore, even if the function returns ERROR_SUCCESS, the
      application should ensure that the string is properly terminated before
      using it; otherwise, it may overwrite a buffer. (Note that REG_MULTI_SZ
      strings should have two terminating null characters.)
    
    Test written by Alex Brainman <alex.brainman@gmail.com>
    
    Change-Id: I8c0852e0527e27ceed949134ed5e6de944189986
    Reviewed-on: https://go-review.googlesource.com/9806Reviewed-by: 's avatarAlex Brainman <alex.brainman@gmail.com>
    Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
    335e44d2
Name
Last commit
Last update
..
export_test.go Loading commit data...
key.go Loading commit data...
registry_test.go Loading commit data...
syscall.go Loading commit data...
value.go Loading commit data...
zsyscall_windows.go Loading commit data...