dedis/prifi

Equivocation / Communication bug

lbarman opened this issue · 0 comments

panic: runtime error: integer divide by zero

goroutine 37 [running]:
github.com/lbarman/prifi/prifi-lib/dcnet.(*EquivocationProtection).RelayDecode(0xc4201af260, 0xc42028c000, 0x1388, 0x1388, 0xc420286520, 0x1, 0x1, 0xc420286500, 0x1, 0x1, ...)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/dcnet/equivocation.go:148 +0x56c
github.com/lbarman/prifi/prifi-lib/dcnet.(*DCNetEntity).DecodeCell(0xc4201f21b0, 0xc400000001, 0xc42028eb18, 0x13b0)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/dcnet/dcnet.go:311 +0xb3
github.com/lbarman/prifi/prifi-lib/relay.(*PriFiLibRelayInstance).upstreamPhase2a_extractOCMap(0xc4201aa560, 0x1, 0x5, 0xc42027eaf8)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/relay/relay.go:325 +0x171
github.com/lbarman/prifi/prifi-lib/relay.(*PriFiLibRelayInstance).upstreamPhase1_processCiphers(0xc4201aa560, 0xc400000001)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/relay/relay.go:271 +0x2ca
github.com/lbarman/prifi/prifi-lib/relay.(*PriFiLibRelayInstance).Received_TRU_REL_DC_CIPHER(0xc4201aa560, 0x1, 0x0, 0xc42028eb18, 0x13b0, 0x13b0, 0x0, 0x0)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/relay/relay.go:233 +0xbb
github.com/lbarman/prifi/prifi-lib/relay.(*PriFiLibRelayInstance).ReceivedMessage(0xc4201aa560, 0x89c280, 0xc4202803f0, 0x0, 0x0)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/relay/init.go:209 +0x682
github.com/lbarman/prifi/prifi-lib.(*PriFiLibInstance).ReceivedMessage(0xc4201ae510, 0x89c280, 0xc4202803f0, 0xc4202803f0, 0xa0000000020)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/prifi-lib/prifi.go:90 +0x4c
github.com/lbarman/prifi/sda/protocols.(*PriFiSDAProtocol).Received_TRU_REL_DC_CIPHER(0xc4201ee000, 0xc4201b6460, 0x1, 0x0, 0xc42028eb18, 0x13b0, 0x13b0, 0xc4201856f0, 0x41357c)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/sda/protocols/message_binders.go:42 +0x80
github.com/lbarman/prifi/sda/protocols.(*PriFiSDAProtocol).Received_TRU_REL_DC_CIPHER-fm(0xc4201b6460, 0x1, 0x0, 0xc42028eb18, 0x13b0, 0x13b0, 0x0, 0x0)
	/home/jwhite/d/go/src/github.com/lbarman/prifi/sda/protocols/protocol.go:205 +0x47
reflect.Value.call(0x853fa0, 0xc4201b0cb0, 0x13, 0x8f42b1, 0x4, 0xc420185c20, 0x1, 0x1, 0xc4202803c0, 0xc4202803c8, ...)
	/usr/lib/golang/src/reflect/value.go:434 +0x905
reflect.Value.Call(0x853fa0, 0xc4201b0cb0, 0x13, 0xc420185c20, 0x1, 0x1, 0x199, 0xc420185b48, 0x412367)
	/usr/lib/golang/src/reflect/value.go:302 +0xa4
gopkg.in/dedis/onet%2ev1.(*TreeNodeInstance).dispatchHandler(0xc4201d0410, 0xc42000e118, 0x1, 0x1, 0x3, 0x1)
	/home/jwhite/d/go/src/gopkg.in/dedis/onet.v1/treenode.go:336 +0x3be
gopkg.in/dedis/onet%2ev1.(*TreeNodeInstance).dispatchMsgToProtocol(0xc4201d0410, 0xc4200732c0, 0x3, 0xc42027eaf0)
	/home/jwhite/d/go/src/gopkg.in/dedis/onet.v1/treenode.go:456 +0x50d
gopkg.in/dedis/onet%2ev1.(*TreeNodeInstance).dispatchMsgReader(0xc4201d0410)
	/home/jwhite/d/go/src/gopkg.in/dedis/onet.v1/treenode.go:424 +0x205
created by gopkg.in/dedis/onet%2ev1.newTreeNodeInstance
	/home/jwhite/d/go/src/gopkg.in/dedis/onet.v1/treenode.go:86 +0x2fe
exit status 2