chunked: fix unmarshaling of file names#1879
chunked: fix unmarshaling of file names#1879openshift-merge-bot[bot] merged 1 commit intocontainers:mainfrom
Conversation
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: giuseppe The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
LGTM |
There was a problem hiding this comment.
- Does
xattrsneed this as well? - If this does not use
StringsBuf, the fields should not be counted incount - (I am ambivalent about the concept of
StringsBuf, there is no documented rationale. Is it to save on per-object allocation cost?) - That
ReadStringAsSlicedoes not process escapes is understandable but not immediately obvious to me. Consider turninggetString([]byte)into agetStringWithoutEscapes(iter), to document that behavior in one place (and to save a bit on code size / repetitiveness).
The getString() function was used to extract string values, but it doesn't handle escaped characters. Replace it with iter.ReadString() that is slower but handles escaped characters correctly. Closes: containers#1878 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
ab17050 to
f388a77
Compare
yeah it was done exactly for that reason, but now that we are not using for For now, I've simplified the implementation and dropped the StringsBuf performance hack, we can revisit later if needed |
|
(Just to be explicit, I’m completely fine with |
mtrmac
left a comment
There was a problem hiding this comment.
LGTM for correctness, the simplification is nice.
I have no idea what’s the performance impact, I trust your judgement on this.
|
/lgtm |
The getString() function was used to extract string values, but it doesn't handle escaped characters. Replace it with iter.ReadString() that is slower but handles escaped characters correctly.
Closes: #1878