Commit ce35c27
ioc: getArrayValue() size output buffer based on final_type only
Handle some incorrectly defined dbChannel, to at least not crash.
getArrayValue sized the read buffer from dbChannelFinalFieldSize, but dbGet
writes dbValueSize(final_type) bytes per element — MAX_STRING_SIZE for a
DBR_STRING request, regardless of the field's own size — so a DBF_STRING field
with field_size < MAX_STRING_SIZE (synApps scalcout PAA..PLL) overflowed the
heap. Size by dbValueSize(final_type): unchanged for numeric fields and
type-changing filters (dbValueSize == field_size there), MAX_STRING_SIZE for
strings.1 parent a2828d0 commit ce35c27
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
| |||
0 commit comments