[PATCH 1/9] screenshooter: Abandon recording rather than use unitialised format

Rob Bradford robert.bradford at intel.com
Wed Dec 5 10:47:03 PST 2012


From: Rob Bradford <rob at linux.intel.com>

Abandon the recording if the format is not known - this prevents the use of an
unitialised member is the header struct.
---
 src/screenshooter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/screenshooter.c b/src/screenshooter.c
index 422c2a9..24999f3 100644
--- a/src/screenshooter.c
+++ b/src/screenshooter.c
@@ -418,7 +418,7 @@ weston_recorder_create(struct weston_output *output, const char *filename)
 		break;
 	default:
 		weston_log("unknown recorder format\n");
-		break;
+		return;
 	}
 
 	header.width = output->current->width;
-- 
1.7.11.7



More information about the wayland-devel mailing list