Commit 49dee1f2 authored by Steve Becker's avatar Steve Becker Committed by Commit Bot

DCHECK failure win_util.cc(456)] Check failed: lstrlenW(app_id) < 64

Increases the Win32 app user model ID max length assert from 64 to 128.
128 is the documented limit that applies to Win7, Win8 and Win10. See
https://docs.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid

Bug: 1096850
Change-Id: I42ed9e211421fb5837b1f6ecfcb3b0e57e285502
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2280591Reviewed-by: default avatarGabriel Charette <gab@chromium.org>
Commit-Queue: Steve Becker <stevebe@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#789142}
parent 3d677a19
...@@ -448,10 +448,11 @@ bool SetClsidForPropertyStore(IPropertyStore* property_store, ...@@ -448,10 +448,11 @@ bool SetClsidForPropertyStore(IPropertyStore* property_store,
bool SetAppIdForPropertyStore(IPropertyStore* property_store, bool SetAppIdForPropertyStore(IPropertyStore* property_store,
const wchar_t* app_id) { const wchar_t* app_id) {
// App id should be less than 64 chars and contain no space. And recommended // App id should be less than 128 chars and contain no space. And recommended
// format is CompanyName.ProductName[.SubProduct.ProductNumber]. // format is CompanyName.ProductName[.SubProduct.ProductNumber].
// See http://msdn.microsoft.com/en-us/library/dd378459%28VS.85%29.aspx // See
DCHECK_LT(lstrlen(app_id), 64); // https://docs.microsoft.com/en-us/windows/win32/shell/appids#how-to-form-an-application-defined-appusermodelid
DCHECK_LT(lstrlen(app_id), 128);
DCHECK_EQ(wcschr(app_id, L' '), nullptr); DCHECK_EQ(wcschr(app_id, L' '), nullptr);
return SetStringValueForPropertyStore(property_store, PKEY_AppUserModel_ID, return SetStringValueForPropertyStore(property_store, PKEY_AppUserModel_ID,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment