summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2015-06-03 20:26:13 +0300
committerTimo Teräs <timo.teras@iki.fi>2015-06-03 20:26:13 +0300
commit37e491152fef0a1134cddd137db4dc5dc268878f (patch)
tree505adaf5f07f1822eb01fa51b11cc990610a7126
parent3f76fe26ddba6e6608982bbb89d80c3b1326baeb (diff)
downloadsquark-37e491152fef0a1134cddd137db4dc5dc268878f.tar.bz2
squark-37e491152fef0a1134cddd137db4dc5dc268878f.tar.xz
fix overlapped memcpy
-rw-r--r--src/squark-auth-ip.c2
-rw-r--r--src/squark-auth-snmp.c2
-rw-r--r--src/squark-filter.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/squark-auth-ip.c b/src/squark-auth-ip.c
index 74e0583..ce56753 100644
--- a/src/squark-auth-ip.c
+++ b/src/squark-auth-ip.c
@@ -104,7 +104,7 @@ static void read_input(void)
handle_line(line);
if (b.len) {
- memcpy(buffer, b.ptr, b.len);
+ memmove(buffer, b.ptr, b.len);
b.ptr = buffer;
}
left = BLOB_PTR_LEN(buffer + b.len, sizeof(buffer) - b.len);
diff --git a/src/squark-auth-snmp.c b/src/squark-auth-snmp.c
index e9fabbe..4e7e7ad 100644
--- a/src/squark-auth-snmp.c
+++ b/src/squark-auth-snmp.c
@@ -1169,7 +1169,7 @@ static void read_input(void)
handle_line(line);
if (b.len) {
- memcpy(buffer, b.ptr, b.len);
+ memmove(buffer, b.ptr, b.len);
b.ptr = buffer;
}
left = BLOB_PTR_LEN(buffer + b.len, sizeof(buffer) - b.len);
diff --git a/src/squark-filter.c b/src/squark-filter.c
index 5ffcedf..253bc70 100644
--- a/src/squark-filter.c
+++ b/src/squark-filter.c
@@ -461,7 +461,7 @@ static void read_input(struct sqdb *db)
}
if (b.len) {
- memcpy(buffer, b.ptr, b.len);
+ memmove(buffer, b.ptr, b.len);
b.ptr = buffer;
}
left = BLOB_PTR_LEN(buffer + b.len, sizeof(buffer) - b.len);