Browse Source

[Fix] Fix strlcpy startup

tags/1.2.3
Vsevolod Stakhov 8 years ago
parent
commit
b5f2c308cd
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/libutil/str_util.c

+ 1
- 1
src/libutil/str_util.c View File

@@ -322,7 +322,7 @@ rspamd_strlcpy (gchar *dst, const gchar *src, gsize siz)
const gsize *ws;

/* Copy as many bytes as will fit */
if (n != 0) {
if (n-- != 0) {
if (((uintptr_t) s & MEM_ALIGN) == ((uintptr_t) d & MEM_ALIGN)) {
for (; ((uintptr_t) s & MEM_ALIGN) && n && (*d = *s); n--, s++, d++);
if (n && *s) {

Loading…
Cancel
Save