Explorar el Código

[Fix] Fix buffer overflow when printing small floats

tags/1.9.3
Vsevolod Stakhov hace 5 años
padre
commit
92a1f7a412
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  1. 1
    1
      contrib/fpconv/fpconv.h
  2. 1
    1
      src/libutil/printf.c

+ 1
- 1
contrib/fpconv/fpconv.h Ver fichero

@@ -26,7 +26,7 @@
*
*/

int fpconv_dtoa(double fp, char dest[24], bool scientific);
int fpconv_dtoa(double fp, char dest[32], bool scientific);

#endif


+ 1
- 1
src/libutil/printf.c Ver fichero

@@ -591,7 +591,7 @@ rspamd_vprintf_common (rspamd_printf_append_func func,
const gchar *fmt,
va_list args)
{
gchar zero, numbuf[G_ASCII_DTOSTR_BUF_SIZE], dtoabuf[24], *p, *last, c;
gchar zero, numbuf[G_ASCII_DTOSTR_BUF_SIZE], dtoabuf[32], *p, *last, c;
const gchar *buf_start = fmt, *fmt_start = NULL;
gint d;
gdouble f;

Cargando…
Cancelar
Guardar