-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sanity check for GUIDs in SupportedOS directives (#30)
Thanks go to @jpbro for reporting the issue
- Loading branch information
Showing
3 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,17 @@ Path32=".." | |
Command32="" | ||
Name="Ummm" | ||
HelpContextID="0" | ||
Description="Unattended MMM 1.0.15" | ||
Description="Unattended MMM 1.0.16" | ||
CompatibleMode="0" | ||
MajorVer=1 | ||
MinorVer=0 | ||
RevisionVer=15 | ||
RevisionVer=16 | ||
AutoIncrementVer=0 | ||
ServerSupportFiles=0 | ||
VersionComments="Unattended MMM" | ||
VersionCompanyName="Unicontsoft" | ||
VersionFileDescription="Unattended MMM 1.0.15" | ||
VersionLegalCopyright="Copyright (c) 2009-2020 by [email protected]" | ||
VersionFileDescription="Unattended MMM 1.0.16" | ||
VersionLegalCopyright="Copyright (c) 2009-2021 by [email protected]" | ||
CompilationType=0 | ||
OptimizationType=0 | ||
FavorPentiumPro(tm)=0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ Attribute VB_Name = "mdUmmm" | |
'========================================================================= | ||
' | ||
' Unattended Make My Manifest Project | ||
' Copyright (c) 2009-2020 [email protected] | ||
' Copyright (c) 2009-2021 [email protected] | ||
' | ||
'========================================================================= | ||
Option Explicit | ||
|
@@ -614,8 +614,11 @@ Private Function pvDumpSupportedOs(vRow As Variant, cOutput As Collection) As Bo | |
Case "win10" | ||
sGuid = "{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" | ||
Case Else | ||
'--- this has to be properly escaped attribute value | ||
sGuid = At(vRow, lIdx) | ||
If pvIsGuid(At(vRow, lIdx)) Then | ||
sGuid = At(vRow, lIdx) | ||
Else | ||
sGuid = vbNullString | ||
End If | ||
End Select | ||
If LenB(sGuid) <> 0 Then | ||
cOutput.Add Printf(" <supportedOS Id=""%1"" />", sGuid) | ||
|
@@ -957,3 +960,9 @@ Private Function pvGetProgID(sClsID As String) As String | |
Call CoTaskMemFree(lPtr) | ||
End If | ||
End Function | ||
|
||
Private Function pvIsGuid(ByVal sValue As String) As Boolean | ||
Const EMPTY_GUID As String = "{00000000-0000-0000-0000-000000000000}" | ||
pvIsGuid = sValue Like Replace(EMPTY_GUID, "0", "[0-9a-fA-F]") | ||
End Function | ||
|