From 07696eb34778643de5730ddbbf7c2e46f12cea62 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 2 Mar 2009 10:07:55 +0000 Subject: [PATCH] don't dereference uninitialized pointer * src/storage_conf.c (virStoragePoolDefParsePerms): Initialize "ptr" to NULL. --- ChangeLog | 6 ++++++ src/storage_conf.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 12715f5ce0..5675b082f1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Mon Mar 2 10:16:04 +0100 2009 Jim Meyering + + don't dereference uninitialized pointer + * src/storage_conf.c (virStoragePoolDefParsePerms): Initialize + "ptr" to NULL. + Fri Feb 27 17:15:00 CET 2009 Chris Lalancette * src/qemu_driver.c: If there is a failure during offline migrate, diff --git a/src/storage_conf.c b/src/storage_conf.c index 70107a287a..4a53ff49b5 100644 --- a/src/storage_conf.c +++ b/src/storage_conf.c @@ -381,7 +381,7 @@ virStoragePoolDefParsePerms(virConnectPtr conn, if (!mode) { perms->mode = 0700; } else { - char *end; + char *end = NULL; perms->mode = strtol(mode, &end, 8); if (*end || perms->mode < 0 || perms->mode > 0777) { virStorageReportError(conn, VIR_ERR_XML_ERROR,