[gnome-color-manager] Check that the EDID data address is not NULL to avoid a segfault
- From: Richard Hughes <rhughes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] Check that the EDID data address is not NULL to avoid a segfault
- Date: Mon, 2 Nov 2009 10:34:55 +0000 (UTC)
commit 59895b1a509350bd2bcff4184b42d9fb4c469d16
Author: Richard Hughes <richard hughsie com>
Date: Mon Nov 2 10:31:00 2009 +0000
Check that the EDID data address is not NULL to avoid a segfault
src/gcm-edid.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/gcm-edid.c b/src/gcm-edid.c
index c217828..a3cd0d7 100644
--- a/src/gcm-edid.c
+++ b/src/gcm-edid.c
@@ -75,8 +75,9 @@ gcm_edid_parse (GcmEdid *edid, const guint8 *data, GError **error)
GcmEdidPrivate *priv = edid->priv;
g_return_val_if_fail (GCM_IS_EDID (edid), FALSE);
+ g_return_val_if_fail (data != NULL, FALSE);
- /* chekc header */
+ /* check header */
if (data[0] != 0x00 || data[1] != 0xff) {
if (error != NULL)
*error = g_error_new (1, 0, "failed to parse header");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]