Mir

mir_surface_is_valid(NULL) crashes instead of returning false

Bug #1248474 reported by Daniel van Vugt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Medium
Chris Halse Rogers
mir (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I have a test case where I encountered:
    mir_surface_is_valid(NULL)
and it crashes with SIGSEGV. Obviously the surface is not valid and we should be returning false instead of crashing.

The cause is:
int mir_surface_is_valid(MirSurface* surface)
{
    return surface->is_valid();
}

Tags: clientapi

Related branches

summary: - mir_surface_is_valid crashes if passed an invalid pointer
+ mir_surface_is_valid(NULL) crashes instead of returning false
tags: added: clientapi
Changed in mir:
status: Triaged → In Progress
assignee: nobody → Chris Halse Rogers (raof)
milestone: none → 0.2.0
Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
status: Fix Committed → Fix Released
Changed in mir (Ubuntu):
importance: Undecided → Medium
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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