summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib/eiotas_iota.c2
-rw-r--r--src/lib/eiotas_particle.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/eiotas_iota.c b/src/lib/eiotas_iota.c
index 1a1f7f8..a0a4f02 100644
--- a/src/lib/eiotas_iota.c
+++ b/src/lib/eiotas_iota.c
@@ -40,7 +40,7 @@ int eiotas_iota_init(Eiotas_Iota *iota, const char *name, Eiotas_Iota *parent, E
if(parent) {
lp = eina_stringshare_strlen(parent->path);
if((ln+lp+2)>EIOTAS_MAX_PATH_LENGTH) {
- ERR("path length %d is > EIOTAS_MAX_PATH_LENGTH (%d)",(ln+lp+2),EIOTAS_MAX_PATH_LENGTH);
+ ERR("buffer overflow (%d)",(ln+lp+2));
return 1;
}
memcpy(tmp,parent->path,lp);
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c
index e1d8433..18fbdb5 100644
--- a/src/lib/eiotas_particle.c
+++ b/src/lib/eiotas_particle.c
@@ -104,8 +104,8 @@ EAPI void eiotas_particle_add_destinations(Eiotas_Particle *particle, char* dest
n = (sep-dst);
if(n==0) {
ERR("ignore empty destination");
- } else if(n+2>EIOTAS_MAX_PATH_LENGTH) {
- ERR("buffer overflow (%d)",n);
+ } else if(n+1>EIOTAS_MAX_PATH_LENGTH) {
+ ERR("buffer overflow (%d)",n+1);
} else {
memcpy(tmp,dst,n);
tmp[n]='\0';