On 27.11.2012, at 10.40, Svante Signell wrote: > Hi, looks like one PATH_MAX issue remains in 2.1.7. Don't know if the > latest version 2.1.10 has solved it. The inlined patch below solves the > remaining build problem. One unclear point in the patch is if linkbuf > should be freed or not (probably it should).
It shouldn't. The compiler warning you get should discourage you from doing that. :) > Thanks! > --- a/pigeonhole/src/lib-sievestorage/sieve-storage-script.c > 2012-11-27 07:03:30.000000000 +0000 > +++ b/pigeonhole/src/lib-sievestorage/sieve-storage-script.c > 2012-11-27 08:29:16.000000000 +0000 > @@ -23,6 +23,7 @@ > #include <ctype.h> > #include <time.h> > #include <fcntl.h> > +#include "abspath.h" > > struct sieve_storage_script { > struct sieve_file_script file; > @@ -118,12 +119,12 @@ static struct sieve_script *sieve_storag > static int sieve_storage_read_active_link > (struct sieve_storage *storage, const char **link_r) > { > - char linkbuf[PATH_MAX]; > + const char *linkbuf; > int ret; > > *link_r = NULL; > > - ret = readlink(storage->active_path, linkbuf, sizeof(linkbuf)); > + ret = t_readlink(storage->active_path, &linkbuf); > > if ( ret < 0 ) { > if (errno == EINVAL) { > @@ -151,6 +152,7 @@ static int sieve_storage_read_active_lin > > /* ret is now assured to be valid, i.e. > 0 */ > *link_r = t_strndup(linkbuf, ret); > + free(linkbuf); > return 1; > } > > > > -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org