Kaynağa Gözat

[Fix] Fix buffer overflow when printing small floats

tags/1.9.3
Vsevolod Stakhov 5 yıl önce
ebeveyn
işleme
92a1f7a412
2 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 1
    1
      contrib/fpconv/fpconv.h
  2. 1
    1
      src/libutil/printf.c

+ 1
- 1
contrib/fpconv/fpconv.h Dosyayı Görüntüle

@@ -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 Dosyayı Görüntüle

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

Loading…
İptal
Kaydet