From: Ralph Boehme Date: Tue, 17 Jun 2014 17:25:45 +0000 (+0200) Subject: Memory overflow caused by 'basedir regex', bug #567 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48434418007f625f292b16c99ee0dd7f9fcb1416;p=netatalk.git Memory overflow caused by 'basedir regex', bug #567 Authored-by: Takao Shimayoshi Reviewed-by: Ralph Boehme --- diff --git a/NEWS b/NEWS index b42830e8..f305674b 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Changes in 3.1.3 attributes" and "spotlight expr" * FIX: afpd: Unarchiving certain ZIP archives fails, bug #569 * UPD: Update Unicode support to version 7.0.0 +* FIX: Memory overflow caused by 'basedir regex', bug #567 Changes in 3.1.2 ================ diff --git a/libatalk/util/netatalk_conf.c b/libatalk/util/netatalk_conf.c index 71acf884..32bda78a 100644 --- a/libatalk/util/netatalk_conf.c +++ b/libatalk/util/netatalk_conf.c @@ -1682,7 +1682,7 @@ struct vol *getvolbypath(AFPObj *obj, const char *path) strlcat(tmpbuf, "/", MAXPATHLEN); /* (5) */ - p = path + strlen(basedir); + p = path + match[0].rm_eo - match[0].rm_so; while (*p == '/') p++; EC_NULL_LOG( user = strdup(p) );