Bladeren bron

[Fix] Fix buffer overflow when printing small floats

tags/1.9.3
Vsevolod Stakhov 5 jaren geleden
bovenliggende
commit
92a1f7a412
2 gewijzigde bestanden met toevoegingen van 2 en 2 verwijderingen
  1. 1
    1
      contrib/fpconv/fpconv.h
  2. 1
    1
      src/libutil/printf.c

+ 1
- 1
contrib/fpconv/fpconv.h Bestand weergeven

@@ -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 Bestand weergeven

@@ -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;

Laden…
Annuleren
Opslaan