This repository was archived by the owner on Jun 5, 2019. It is now read-only.
Commit d41dd6b
Martin Calsyn
Fix array range exception during WriteConfig
In WriteConfig at line 878, a temp buffer is allocated at line 878 to include the current config plus the addition.
When the length of the current config plus the new data is larger than the current size of the m_cfg_all_data array,
the temp array should be enlarged to accomodate the new data. In the existing code, the allocation uses m_lastCfgInd
instead of m_lastCfgIndex+data.Length and so under-allocates space when m_lastCfgIndex+data.Length would exceed the
current size of m_all_cfg_data.Length. This fix corrects the under-allocation and resulting exception on line 881.1 parent 8d1e5cf commit d41dd6b
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
| 878 | + | |
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
| |||
0 commit comments