Skip to content

Commit

Permalink
QuarkSocPkg/QNCSmmDispatcher: Fix use after free issue #2
Browse files Browse the repository at this point in the history
As part of commit 5f82e02, ActiveRecordInDb was introduced as a copy
of RecordInDb as latter may be freed by the callback function. This
commit replaces an access of RecordInDb after the callback function
has been executed with an access to ActiveRecordInDb.

Cc: Michael D Kinney <[email protected]>
Cc: Kelly Steele <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marvin Haeuser <[email protected]>
Reviewed-by: Michael D Kinney <[email protected]>
  • Loading branch information
Marvin H?user authored and mdkinney committed Aug 17, 2017
1 parent 6619cf3 commit 4e33ff7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
This driver is responsible for the registration of child drivers
and the abstraction of the QNC SMI sources.
Copyright (c) 2013-2016 Intel Corporation.
Copyright (c) 2013-2017 Intel Corporation.
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
Expand Down Expand Up @@ -758,7 +758,7 @@ QNCSmmCoreDispatcher (
}
}

if (RecordInDb->ClearSource == NULL) {
if (ActiveRecordInDb.ClearSource == NULL) {
//
// Clear the SMI associated w/ the source using the default function
//
Expand Down

0 comments on commit 4e33ff7

Please sign in to comment.