Crashes when methods are called with wrong arguments

Bug #1385341 reported by Roberto Alsina
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
go-dbus
Fix Released
Undecided
Unassigned
ubuntu-push (Ubuntu)
New
Undecided
Unassigned

Bug Description

A method that takes zero or more strings was being called with an empty array instead, crashing inside AllArgs:

panic: Buffer too small

goroutine 37 [running]:
runtime.panic(0x6fafc0, 0xc210036880)
        /usr/lib/go/src/pkg/runtime/panic.c:266 +0xb6
launchpad.net/go-dbus/v1.(*Message).AllArgs(0xc2100eb840, 0x11, 0x7b4110, 0x11)
        /home/ralsina/canonical/ubuntu-push/src/launchpad.net/go-dbus/v1/message.go:217 +0x224
launchpad.net/ubuntu-push/bus.func·001()
        /home/ralsina/canonical/ubuntu-push/src/launchpad.net/ubuntu-push/bus/endpoint.go:266 +0x1a9
created by launchpad.net/ubuntu-push/bus.(*endpoint).WatchMethod
        /home/ralsina/canonical/ubuntu-push/src/launchpad.net/ubuntu-push/bus/endpoint.go:296 +0x105

goroutine 1 [select]:
launchpad.net/ubuntu-push/client.(*PushClient).doLoop(0xc21006a000, 0x7f9acc21de28, 0x7f9acc21de08, 0x7f9acc21de48, 0x7f9acc21de38, ...)
        /home/ralsina/canonical/ubuntu-push/src/launchpad.net/ubuntu-push/client/client.go:481 +0x35c
launchpad.net/ubuntu-push/client.(*PushClient).Loop(0xc21006a000)
        /home/ralsina/canonical/ubuntu-push/src/launchpad.net/ubuntu-push/client/client.go:519 +0x13d
main.main()
        /home/ralsina/canonical/ubuntu-push/src/launchpad.net/ubuntu-push/ubuntu-push-client.go:42 +0x36c

Related branches

Revision history for this message
John Lenton (chipaca) wrote :

“doctor, it panics when I do this”

Well don't do that then.

Revision history for this message
Roberto Alsina (ralsina) wrote :

but doctor, I panic if people in the street look at me funny, and I am a police officer

Revision history for this message
John Lenton (chipaca) wrote :

Get down from the streetlamp, officer. They've gone home already.

Changed in go-dbus:
status: New → In Progress
Changed in go-dbus:
status: In Progress → Fix Committed
Changed in ubuntu-push:
status: New → In Progress
Changed in go-dbus:
status: Fix Committed → Fix Released
Changed in ubuntu-push:
status: In Progress → New
affects: ubuntu-push → ubuntu-push (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.