From 96825f3c2bcd08dc37698809b6585077162d8dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Wed, 23 Jan 2019 17:27:25 +0100 Subject: [PATCH] Cleaned object ids beyond the updated part An earlier patch enabled updating a file proper id without changing the other id (birth, volume, domain). However the first time the id is set, these other ids have to be zeroed. --- libntfs-3g/object_id.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libntfs-3g/object_id.c b/libntfs-3g/object_id.c index b7cc77cc..090070f3 100644 --- a/libntfs-3g/object_id.c +++ b/libntfs-3g/object_id.c @@ -3,7 +3,7 @@ * * This module is part of ntfs-3g library * - * Copyright (c) 2009-2017 Jean-Pierre Andre + * Copyright (c) 2009-2019 Jean-Pierre Andre * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -333,7 +333,7 @@ static int update_object_id(ntfs_inode *ni, ntfs_index_context *xo, na = ntfs_attr_open(ni, AT_OBJECT_ID, AT_UNNAMED, 0); if (na) { - + memset(&old_attr, 0, sizeof(OBJECT_ID_ATTR)); /* remove the existing index entry */ oldsize = remove_object_id_index(na,xo,&old_attr); if (oldsize < 0)