Commit 7cf5a6a
committed
vz: fix nil pointer dereference with mountType: reverse-sshfs
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10075a5a4]
goroutine 1 [running]:
github.com/Code-Hex/vz/v3/internal/objc.ConvertToNSMutableArray.func1(0x2?, 0x600000c143f0?)
/Users/suda/gopath/pkg/mod/github.com/!code-!hex/vz/[email protected]/internal/objc/objc.go:134 +0x24
github.com/Code-Hex/vz/v3/internal/objc.ConvertToNSMutableArray({0xc0002c85c0, 0x2, 0xc0001fdb20?})
/Users/suda/gopath/pkg/mod/github.com/!code-!hex/vz/[email protected]/internal/objc/objc.go:134 +0xef
github.com/Code-Hex/vz/v3.(*VirtualMachineConfiguration).SetDirectorySharingDevicesVirtualMachineConfiguration(0xc00012e000?, {0xc0002c85a0, 0x2, 0x1f?})
/Users/suda/gopath/pkg/mod/github.com/!code-!hex/vz/[email protected]/configuration.go:188 +0x77
github.com/lima-vm/lima/pkg/vz.attachFolderMounts(0xc00047e780, 0xb?)
/Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vm_darwin.go:381 +0x214
github.com/lima-vm/lima/pkg/vz.createVM(0x1000811e5?, 0xc00012e040?)
/Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vm_darwin.go:124 +0xf8
github.com/lima-vm/lima/pkg/vz.startVM({0x100b42d30?, 0xc0000da008}, 0xc00047e780)
/Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vm_darwin.go:32 +0x5b
github.com/lima-vm/lima/pkg/vz.(*LimaVzDriver).Start(0xc0004b62b0, {0x100b42d30, 0xc0000da008})
/Users/suda/gopath/src/github.com/lima-vm/lima/pkg/vz/vz_driver_darwin.go:106 +0xf3
github.com/lima-vm/lima/pkg/hostagent.(*HostAgent).Run(0xc0000e0480, {0x100b42d30?, 0xc0000da008})
/Users
```
Signed-off-by: Akihiro Suda <[email protected]>1 parent 45cd9cf commit 7cf5a6a
1 file changed
+5
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
| 367 | + | |
368 | 368 | | |
369 | 369 | | |
370 | 370 | | |
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
382 | 384 | | |
383 | 385 | | |
384 | 386 | | |
| |||
0 commit comments