Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(864)

Unified Diff: util/win/module_version.h

Issue 1475023004: Get module versions and types from in-memory images (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Address review feedback (2) Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « util/numeric/checked_address_range.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/win/module_version.h
diff --git a/util/win/module_version.h b/util/win/module_version.h
index be56eb9df9a2785c257b8880bee1c3a6509f4b10..afc2a508b7011918565248883f3896b1ddc1284e 100644
--- a/util/win/module_version.h
+++ b/util/win/module_version.h
@@ -24,9 +24,15 @@ namespace crashpad {
//! \brief Retrieve the type and version information from a given module (exe,
//! dll, etc.)
//!
+//! This function calls `GetFileVersionInfo()`, which can implicitly call
+//! `LoadLibrary()` to load \a path into the calling process. Do not call this
+//! function on an untrusted module, because there is a risk of executing the
+//! module’s code.
+//!
//! \param[in] path The path to the module to be inspected.
-//! \param[out] vs_fixedfileinfo The `VS_FIXEDFILEINFO` on success.
-//! `dwFileFlags` will have been masked with `dwFileFlagsMask` already.
+//! \param[out] vs_fixedfileinfo The VS_FIXEDFILEINFO on success.
+//! VS_FIXEDFILEINFO::dwFileFlags will have been masked with
+//! VS_FIXEDFILEINFO::dwFileFlagsMask already.
//!
//! \return `true` on success, or `false` on failure with a message logged. If
//! the module has no `VERSIONINFO` resource, `false` will be returned
« no previous file with comments | « util/numeric/checked_address_range.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698