diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-29 09:55:03 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-29 09:55:03 +0200 |
commit | 99fc8282bd98a9d01429ad7520b603baf89994c2 (patch) | |
tree | 830c5358d8e88583eb2f17e602161943182d2626 /src/lib/eiotas_particle.c | |
parent | 0b7149acccd0b6eb25f9ad44b02f04a73133f113 (diff) | |
download | edoors-99fc8282bd98a9d01429ad7520b603baf89994c2.zip edoors-99fc8282bd98a9d01429ad7520b603baf89994c2.tar.gz |
fix buffer overflow detection
Diffstat (limited to 'src/lib/eiotas_particle.c')
-rw-r--r-- | src/lib/eiotas_particle.c | 4 |
1 files changed, 2 insertions, 2 deletions
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'; |