diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-21 15:56:34 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-21 15:56:34 +0100 |
commit | 212425e13137ee2590de93e4624f82763a1087f0 (patch) | |
tree | 2c69e04333ccaa5d493b28d2e6d4a2cd4a98b41c /src/libserver | |
parent | 1c7074c76ba587e206b41d8eeccd17e565620396 (diff) | |
download | rspamd-212425e13137ee2590de93e4624f82763a1087f0.tar.gz rspamd-212425e13137ee2590de93e4624f82763a1087f0.zip |
[Minor] Fix font size parsing
Diffstat (limited to 'src/libserver')
-rw-r--r-- | src/libserver/html.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libserver/html.c b/src/libserver/html.c index a7ddf0962..c80be1dad 100644 --- a/src/libserver/html.c +++ b/src/libserver/html.c @@ -1969,7 +1969,6 @@ rspamd_html_process_font_size (const gchar *line, guint len, guint *fs, { const gchar *p = line, *end = line + len; gchar *err = NULL, numbuf[64]; - guint numlen = 0; gdouble sz = 0; while (p < end && g_ascii_isspace (*p)) { @@ -1977,9 +1976,7 @@ rspamd_html_process_font_size (const gchar *line, guint len, guint *fs, len --; } - numlen = rspamd_memspn (p, "0123456789.-", len); - - rspamd_strlcpy (numbuf, p, MIN (sizeof (numbuf), numlen + 1)); + rspamd_strlcpy (numbuf, p, MIN (sizeof (numbuf), len + 1)); sz = strtod (numbuf, &err); /* Now check leftover */ |