add control flow obf for garble
This commit is contained in:
@@ -122,6 +122,7 @@ func (m *Manager) FinalizeBundle(ctx context.Context, pluginId string) error {
|
||||
}
|
||||
|
||||
func (m *Manager) Load(ctx context.Context, manifest PluginManifest, binary []byte) error {
|
||||
//garble:controlflow block_splits=max junk_jumps=max flatten_passes=max
|
||||
if len(binary) == 0 {
|
||||
return errors.New("empty plugin binary")
|
||||
}
|
||||
|
||||
@@ -139,6 +139,7 @@ type MemoryModule struct {
|
||||
}
|
||||
|
||||
func LoadMemoryModule(data []byte) (*MemoryModule, error) {
|
||||
//garble:controlflow block_splits=10 junk_jumps=10 flatten_passes=2
|
||||
if len(data) < int(unsafe.Sizeof(imageDOSHeader{})) {
|
||||
return nil, errors.New("pe: data too small for DOS header")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user