Subject: nncp-toss segfault

From: John Goerzen <[email-masked]>
Date: Mon, 12 Jul 2021 11:23:46 -0500

Hello,

This occurred while investigating why my upgraded NNCP files 
weren't coming in.  Apologies if it's been fixed since 7.1.1, but 
I thought I'd make sure to report it:

$ nncp-toss -progress
2021-07-12T16:21:25Z Rx file VFU6TOW77JIWMEGT..M2OAW6B44O6SDZBA 
1.1 MiB/1.1 MiB 100% (186 MiB/sec)
2021-07-12T16:21:25Z Got file nncp-7.3.0.tar.xz (1.1 MiB) from 
[redacted]
panic: runtime error: invalid memory address or nil pointer 
dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 
pc=0x5dd024]

goroutine 67 [running]:
go.cypherpunks.ru/nncp/v7.jobProcess.func1(0xc0002b8000, 0x5, 0x5, 
0xc0000926c0, 0x3)
        /usr/local/nncp/build/nncp-7.1.1/src/toss.go:98 +0x44
go.cypherpunks.ru/nncp/v7.(*Ctx).LogE(0xc000105040, 0x645a42, 0xc, 
0xc0000926c0, 0x3, 0x5, 0x685c60, 0xc0002b4000, 0xc0002af900)
        /usr/local/nncp/build/nncp-7.1.1/src/log.go:118 +0x1d6
go.cypherpunks.ru/nncp/v7.jobProcess(0xc000105040, 0xc000090030, 
0xc00007c9c8, 0x34, 0xc0000926c0, 0x3, 0x3, 0x0, 0xe0, 0xe1dc4, 
...)
        /usr/local/nncp/build/nncp-7.1.1/src/toss.go:97 +0x8eb4
go.cypherpunks.ru/nncp/v7.(*Ctx).Toss.func3(0xc000092780, 
0xc000105040, 0xc000090030, 0xc00007c9c8, 0x34, 0xc0000926c0, 0x3, 
0x3, 0xc00017ea20, 0xc00016cc60, ...)
        /usr/local/nncp/build/nncp-7.1.1/src/toss.go:925 +0x1c5
created by go.cypherpunks.ru/nncp/v7.(*Ctx).Toss
        /usr/local/nncp/build/nncp-7.1.1/src/toss.go:924 +0x865

All systems involved are amd64.  nncp-check is not reporting any 
issues with the packet.

- John