guid2english sometimes unexpectedly fails
rjoleary opened this issue · 2 comments
rjoleary commented
Fails with the following error message:
Error copying buffer: transform: short destination buffer
To reproduce:
guid2english < pkg/knownguids/guids.go
JulienVdG commented
I quickly looked, basically pkg/guid2emglish/transformer.g
Transform()
only works when the buffer can be processed at once: src
is small enough that dst
can hold the transformed text (size is 4096 in transform Reader implementation).
If src is not treated at once, two problems occur:
- dst will not hold the transformed text as src will be 4096 already
- src can stop in the middle of a GUID, so this GUID will not be replaced if we consume this part of the GUID...