Skip to content

Commit 384b795

Browse files
authored
dll_windows.go: update docs about secure way to load system DLLs
Before this change, the documentation of the `syscall.LazyDLL` states to use `windows.LazyDLL` for secure loading of system DLLs. However, this is only secure if the user does it through the `windows.NewLazySystemDLL` function or if they use `windows.NewLazyDLL` with an absolute path. Given all this, I think it is better to point to `windows.NewLazySystemDLL` instead of `windows.LazyDLL` in here.
1 parent 53af292 commit 384b795

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/syscall/dll_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ func (p *Proc) Call(a ...uintptr) (uintptr, uintptr, error) {
175175
// LazyDLL is subject to the same DLL preloading attacks as documented
176176
// on [LoadDLL].
177177
//
178-
// Use LazyDLL in golang.org/x/sys/windows for a secure way to
178+
// Use NewLazySystemDLL in golang.org/x/sys/windows for a secure way to
179179
// load system DLLs.
180180
type LazyDLL struct {
181181
mu sync.Mutex

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy