Skip to content

Commit

Permalink
stored: fix use-after-free in bextract
Browse files Browse the repository at this point in the history
  • Loading branch information
arogge committed Feb 24, 2022
1 parent 3b651fd commit 63254e9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/stored/bextract.cc
Expand Up @@ -3,7 +3,7 @@
Copyright (C) 2000-2011 Free Software Foundation Europe e.V.
Copyright (C) 2011-2012 Planets Communications B.V.
Copyright (C) 2013-2021 Bareos GmbH & Co. KG
Copyright (C) 2013-2022 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
Expand Down Expand Up @@ -680,7 +680,7 @@ static bool RecordCb(DeviceControlRecord* dcr, DeviceRecord* rec)
case STREAM_ACL_HURD_DEFAULT_ACL:
case STREAM_ACL_HURD_ACCESS_ACL:
if (extract) {
PmStrcpy(acl_data.last_fname, attr->fname);
PmStrcpy(acl_data.last_fname, attr->ofname);
PushDelayedDataStream(rec->maskedStream, rec->data, rec->data_len);
}
break;
Expand All @@ -697,7 +697,7 @@ static bool RecordCb(DeviceControlRecord* dcr, DeviceRecord* rec)
case STREAM_XATTR_LINUX:
case STREAM_XATTR_NETBSD:
if (extract) {
PmStrcpy(xattr_data.last_fname, attr->fname);
PmStrcpy(xattr_data.last_fname, attr->ofname);
PushDelayedDataStream(rec->maskedStream, rec->data, rec->data_len);
}
break;
Expand Down

0 comments on commit 63254e9

Please sign in to comment.