stricklandrbls commented on PR #1668:
URL: https://github.com/apache/daffodil-vscode/pull/1668#issuecomment-4362052992

   @scholarsmate 
   In `dataEditorClient.ts` for the `'profile'` switch within the 
`messageReceiver()`, the length needs bounds checks like this:
   
   ```ts
   
   const DATA_PROFILE_MAX_LENGTH = 10_000_000
   const startOffset: number = message.data.startOffset
   let length: number = message.data.length
   length = length <= 0 ? DATA_PROFILE_MAX_LENGTH : length
   ```
   
   I added this and the profile request no longer threw an API error and 
crashed.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to