From ced2589c4d92f9f06ec6714a58083014f4c39e07 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 18 Feb 2014 00:05:00 +0000 Subject: [PATCH] [iso] libcdio is temperamental when it comes to NULL pointers * Fixes a crash when opening the latest gparted and probably other ISOs --- src/libcdio/udf/udf_fs.c | 7 ++++--- src/rufus.rc | 12 ++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/libcdio/udf/udf_fs.c b/src/libcdio/udf/udf_fs.c index 77cc6849..50a57ff0 100644 --- a/src/libcdio/udf/udf_fs.c +++ b/src/libcdio/udf/udf_fs.c @@ -289,18 +289,19 @@ unicode16_decode(const uint8_t *data, int i_len) switch (data[0]) { case 8: - r = (char*)malloc(i_len); + r = (char*)calloc(i_len, 1); if (r == NULL) return r; for (i=0; i