[nautilus] file-operations: zero-initialize pointer
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] file-operations: zero-initialize pointer
- Date: Mon, 22 Aug 2016 18:01:16 +0000 (UTC)
commit 7f91af56d812997c26fccc75437f2ea78c99fb0f
Author: Ernestas Kulik <ernestask src gnome org>
Date: Mon Aug 22 19:43:24 2016 +0300
file-operations: zero-initialize pointer
The file_info autoptr in transfer_add_file_to_count() is not
zero-initialized and the function conditionally returns early, which
could result in a crash. This commit fixes that.
https://bugzilla.gnome.org/show_bug.cgi?id=769383
src/nautilus-file-operations.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
index 0801b7c..804a1c7 100644
--- a/src/nautilus-file-operations.c
+++ b/src/nautilus-file-operations.c
@@ -2016,7 +2016,7 @@ transfer_add_file_to_count (GFile *file,
CommonJob *job,
TransferInfo *transfer_info)
{
- g_autoptr (GFileInfo) file_info;
+ g_autoptr (GFileInfo) file_info = NULL;
if (g_cancellable_is_cancelled (job->cancellable)) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]