linuxboot/fiano

guid2english sometimes unexpectedly fails

rjoleary opened this issue · 2 comments

Fails with the following error message:

Error copying buffer: transform: short destination buffer

To reproduce:

guid2english < pkg/knownguids/guids.go

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:

  1. dst will not hold the transformed text as src will be 4096 already
  2. src can stop in the middle of a GUID, so this GUID will not be replaced if we consume this part of the GUID...

#294 is merged, closing