Bug 172259

Summary: Remote Inspector: Be stricter about checking message types
Product: WebKit Reporter: Joseph Pecoraro <joepeck>
Component: Web InspectorAssignee: Joseph Pecoraro <joepeck>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, buildbot, inspector-bugzilla-changes, joepeck, keith_miller, mark.lam, msaboff, saam, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix
none
[PATCH] Proposed Fix bburg: review+

Joseph Pecoraro
Reported 2017-05-17 20:54:31 PDT
Be stricter about checking message types for incoming remote inspector messages. The type of things inside the RemoteInspector::received*Message() dictionaries.
Attachments
[PATCH] Proposed Fix (12.45 KB, patch)
2017-05-17 20:58 PDT, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (12.51 KB, patch)
2017-05-17 21:01 PDT, Joseph Pecoraro
no flags
[PATCH] Proposed Fix (12.54 KB, patch)
2017-05-17 21:05 PDT, Joseph Pecoraro
bburg: review+
Radar WebKit Bug Importer
Comment 1 2017-05-17 20:55:03 PDT
Joseph Pecoraro
Comment 2 2017-05-17 20:58:21 PDT
Created attachment 310480 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 3 2017-05-17 21:00:49 PDT
Comment on attachment 310480 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=310480&action=review > Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:651 > + unsigned rejectionIdentifier = targetIdentifierNumber.unsignedIntValue; Interesting. All of the others are `unsignedIntegerValue`, I will update this one.
Joseph Pecoraro
Comment 4 2017-05-17 21:01:59 PDT
Created attachment 310482 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 5 2017-05-17 21:03:06 PDT
Comment on attachment 310482 [details] [PATCH] Proposed Fix View in context: https://bugs.webkit.org/attachment.cgi?id=310482&action=review > Source/JavaScriptCore/inspector/remote/cocoa/RemoteInspectorCocoa.mm:-498 > - unsigned targetIdentifier = [[userInfo objectForKey:WIRTargetIdentifierKey] unsignedIntegerValue]; On second thought, these should all be `unsignedIntValue` which returns a `unsigned` type not `NSUInteger`.
Joseph Pecoraro
Comment 6 2017-05-17 21:05:03 PDT
Created attachment 310483 [details] [PATCH] Proposed Fix
Blaze Burg
Comment 7 2017-05-18 10:13:18 PDT
Comment on attachment 310483 [details] [PATCH] Proposed Fix r=me
Joseph Pecoraro
Comment 8 2017-05-18 11:09:55 PDT
Note You need to log in before you can comment on or make changes to this bug.