epicsStrnEscapedFromRaw may print inclomplete escape sequences
Bug #1943245 reported by
Dirk Zimoch
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
New
|
Undecided
|
Doug Murray |
Bug Description
When epicsStrnEscape
For example printing "\xff" (1 byte 0xff) into a buffer that is too short may result in `\`, `\x`, or `\xf`. In particular a stray `\` at the end may be misinterpreted for example when the escaped string itself is printed in quotes and then the outer ending quote gets "escaped".
Instead of printing incomplete sequences it should rather not print the sequence at all.
Related branches
~dougmurray/epics-base:fix-1943245
Ready for review
for merging
into
~epics-core/epics-base/+git/epics-base:7.0
- Andrew Johnson: Needs Fixing
-
Diff: 168 lines (+94/-35)2 files modifiedmodules/libcom/src/misc/epicsString.c (+85/-33)
modules/libcom/test/epicsStringTest.c (+9/-2)
tags: | added: codeathon |
Changed in epics-base: | |
assignee: | nobody → Doug Murray (dougmurray) |
To post a comment you must log in.