mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
plug two config-parsing leaks
* src/storage_conf.c (virStoragePoolDefParsePerms): Free mode string. (virStorageVolDefParsePerms): Likewise. * AUTHORS: Update. Patch by Ryota Ozaki.
This commit is contained in:
parent
07696eb347
commit
0fe3340ed9
1
AUTHORS
1
AUTHORS
@ -59,6 +59,7 @@ Patches have also been contributed by:
|
||||
Itamar Heim <iheim@redhat.com>
|
||||
Dave Allan <dallan@redhat.com>
|
||||
Markus Armbruster <armbru@redhat.com>
|
||||
Ryota Ozaki <ozaki.ryota@gmail.com>
|
||||
|
||||
[....send patches to get your name here....]
|
||||
|
||||
|
@ -1,5 +1,11 @@
|
||||
Mon Mar 2 10:16:04 +0100 2009 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
plug two config-parsing leaks
|
||||
* src/storage_conf.c (virStoragePoolDefParsePerms): Free mode string.
|
||||
(virStorageVolDefParsePerms): Likewise.
|
||||
Patch by Ryota Ozaki.
|
||||
* AUTHORS: Update.
|
||||
|
||||
don't dereference uninitialized pointer
|
||||
* src/storage_conf.c (virStoragePoolDefParsePerms): Initialize
|
||||
"ptr" to NULL.
|
||||
|
@ -383,6 +383,7 @@ virStoragePoolDefParsePerms(virConnectPtr conn,
|
||||
} else {
|
||||
char *end = NULL;
|
||||
perms->mode = strtol(mode, &end, 8);
|
||||
VIR_FREE(mode);
|
||||
if (*end || perms->mode < 0 || perms->mode > 0777) {
|
||||
virStorageReportError(conn, VIR_ERR_XML_ERROR,
|
||||
"%s", _("malformed octal mode"));
|
||||
@ -812,6 +813,7 @@ virStorageVolDefParsePerms(virConnectPtr conn,
|
||||
} else {
|
||||
char *end = NULL;
|
||||
perms->mode = strtol(mode, &end, 8);
|
||||
VIR_FREE(mode);
|
||||
if (*end || perms->mode < 0 || perms->mode > 0777) {
|
||||
virStorageReportError(conn, VIR_ERR_XML_ERROR,
|
||||
"%s", _("malformed octal mode"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user