ONNX
security
malware-detection
File size: 352 Bytes
d2507b5
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//go:build unix

package compactscan

import (
	"os"
	"syscall"
)

// O_NONBLOCK prevents an attacker racing a validated regular member into a
// FIFO or device from hanging preflight while the descriptor is opened.
func openPreflightFile(root *os.Root, name string) (*os.File, error) {
	return root.OpenFile(name, os.O_RDONLY|syscall.O_NONBLOCK, 0)
}