mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-05 14:17:36 +03:00
Update deps; this fixes something related to Windows registry
This commit is contained in:
parent
0dfd4b70fc
commit
66d93da954
3 changed files with 7 additions and 9 deletions
4
Gopkg.lock
generated
4
Gopkg.lock
generated
|
@ -130,7 +130,7 @@
|
||||||
"poly1305",
|
"poly1305",
|
||||||
"salsa20/salsa"
|
"salsa20/salsa"
|
||||||
]
|
]
|
||||||
revision = "432090b8f568c018896cd8a0fb0345872bbac6ce"
|
revision = "beaf6a35706e5032ae4c3fcf342c663c069f44d2"
|
||||||
|
|
||||||
[[projects]]
|
[[projects]]
|
||||||
branch = "master"
|
branch = "master"
|
||||||
|
@ -154,7 +154,7 @@
|
||||||
"windows/svc/eventlog",
|
"windows/svc/eventlog",
|
||||||
"windows/svc/mgr"
|
"windows/svc/mgr"
|
||||||
]
|
]
|
||||||
revision = "37707fdb30a5b38865cfb95e5aab41707daec7fd"
|
revision = "f6cff0780e542efa0c8e864dc8fa522808f6a598"
|
||||||
|
|
||||||
[solve-meta]
|
[solve-meta]
|
||||||
analyzer-name = "dep"
|
analyzer-name = "dep"
|
||||||
|
|
10
vendor/golang.org/x/sys/windows/registry/key.go
generated
vendored
10
vendor/golang.org/x/sys/windows/registry/key.go
generated
vendored
|
@ -113,12 +113,10 @@ func OpenRemoteKey(pcname string, k Key) (Key, error) {
|
||||||
// The parameter n controls the number of returned names,
|
// The parameter n controls the number of returned names,
|
||||||
// analogous to the way os.File.Readdirnames works.
|
// analogous to the way os.File.Readdirnames works.
|
||||||
func (k Key) ReadSubKeyNames(n int) ([]string, error) {
|
func (k Key) ReadSubKeyNames(n int) ([]string, error) {
|
||||||
ki, err := k.Stat()
|
names := make([]string, 0)
|
||||||
if err != nil {
|
// Registry key size limit is 255 bytes and described there:
|
||||||
return nil, err
|
// https://msdn.microsoft.com/library/windows/desktop/ms724872.aspx
|
||||||
}
|
buf := make([]uint16, 256) //plus extra room for terminating zero byte
|
||||||
names := make([]string, 0, ki.SubKeyCount)
|
|
||||||
buf := make([]uint16, ki.MaxSubKeyLen+1) // extra room for terminating zero byte
|
|
||||||
loopItems:
|
loopItems:
|
||||||
for i := uint32(0); ; i++ {
|
for i := uint32(0); ; i++ {
|
||||||
if n > 0 {
|
if n > 0 {
|
||||||
|
|
2
vendor/golang.org/x/sys/windows/registry/registry_test.go
generated
vendored
2
vendor/golang.org/x/sys/windows/registry/registry_test.go
generated
vendored
|
@ -29,7 +29,7 @@ func randKeyName(prefix string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestReadSubKeyNames(t *testing.T) {
|
func TestReadSubKeyNames(t *testing.T) {
|
||||||
k, err := registry.OpenKey(registry.CLASSES_ROOT, "TypeLib", registry.ENUMERATE_SUB_KEYS|registry.QUERY_VALUE)
|
k, err := registry.OpenKey(registry.CLASSES_ROOT, "TypeLib", registry.ENUMERATE_SUB_KEYS)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue