The ipc messages get truncated with binary data
Bug #603409 reported by
Matt Jones
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Rootin Tootin |
Fix Released
|
Critical
|
Unassigned |
Bug Description
When sending binary data over ipc, it sometimes gets truncated.
Changed in rester: | |
status: | Confirmed → Fix Committed |
Changed in rester: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
This was caused by us using tango.stdc. stringz. toStringz to convert from a D string to a C string. The C Stringz is terminated by a null character "\0". The problem is that binary data can have "\0" anywhere is wants. So it would see these and think the string was shorter than it actually was.
The solution is to use .prt to convert char[] to char*, and send the length.