[infinispan-issues] [JBoss JIRA] (HRJS-10) Buffers and String offsets not updated when writing length
Galder Zamarreño (JIRA)
issues at jboss.org
Tue May 3 06:16:00 EDT 2016
[ https://issues.jboss.org/browse/HRJS-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Galder Zamarreño updated HRJS-10:
---------------------------------
Description:
When encoding a String, there's a chance that there's a need to extend the size of the buffer if the String won't fit the buffer. However, when calculating whether extending is required, only the String size is counted without counting the num bytes counter at the start. As a result of that, a String might end up being truncated and lead to operation hanging up.
This happened in executing a Script where the number of bytes sent as message ID was bigger than 27 and the script name being executed was exactly 23 characters.
The actual problem is that after writing the length of String or Buffers, the offset of the underlying buffer is not being updated and hence it could end up truncating data.
was:
When encoding a String, there's a chance that there's a need to extend the size of the buffer if the String won't fit the buffer. However, when calculating whether extending is required, only the String size is counted without counting the num bytes counter at the start. As a result of that, a String might end up being truncated and lead to operation hanging up.
This happened in executing a Script where the number of bytes sent as message ID was bigger than 27 and the script name being executed was exactly 23 characters.
> Buffers and String offsets not updated when writing length
> ----------------------------------------------------------
>
> Key: HRJS-10
> URL: https://issues.jboss.org/browse/HRJS-10
> Project: Infinispan Javascript client
> Issue Type: Bug
> Affects Versions: 0.2.0
> Reporter: Galder Zamarreño
> Priority: Critical
> Fix For: 0.3.0
>
>
> When encoding a String, there's a chance that there's a need to extend the size of the buffer if the String won't fit the buffer. However, when calculating whether extending is required, only the String size is counted without counting the num bytes counter at the start. As a result of that, a String might end up being truncated and lead to operation hanging up.
> This happened in executing a Script where the number of bytes sent as message ID was bigger than 27 and the script name being executed was exactly 23 characters.
> The actual problem is that after writing the length of String or Buffers, the offset of the underlying buffer is not being updated and hence it could end up truncating data.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the infinispan-issues
mailing list