alexcrichton / alexcrichton/xz2-rs
Lzma data error (again)
- Lenguaje dominante
- Rust
- Estrellas
- 93
- Forks
- 67
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
I'm back with the same error as before but this time with a bit more information:
- First the code is still valid and what I said last time about the buffer size, does NOT fix the problem it HIDES the problem.
- From the look of it the problem is with process_vec. The online C example of XZ does not have this defect.
- I identfied a way to reproduce the bug: if you must call process_vec more than 3 times in the same Run action you crash it. The next time you call it with more data will be returned with the great "lzma data error".
- This means that if you manage to find a large enough output buffer size (with_capacity) for process_vec to use and return the entire decompressed data in exatcly 3 calls, where the first returns the data the second returns 0 and the thrid returns MemNeeded, then the software will continue on the next buffer of compressed data.
- If the exact pattern stated previously is not respected (for example the output vec is not large enough) then your software will inevitably crash at the next buffer.
Why is that? Is there a way to prevent that issue?
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.