Buffer overflow in Database.run()
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- JavaScript
- Estrellas
- 13.7k
- Forks
- 1.1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
If a large enough string (in my case, 5k INSERT statements) is passed to the Database run() function, this leads to a buffer overflow and some kind of memory corruption. Afterwards, all sql.js functions fail with a memory access out of bounds error.
Either the input length should be unlimited, or the limit should be well documented and better handled to avoid memory corruption.
My workaround is to split into individual statements and run one at a time, which runs a bit slower due to the added overhead.
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Start from the documented Database.run() function and reproduce the failure with a large input containing about 5,000 INSERT statements. Trace how the input is handled until the memory access error occurs; done means the input no longer causes memory corruption, or any remaining limit is safely handled and documented.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- javascript, sqlite, wasm
- Área
- databases
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 38/100