[rrd-developers] RFC: [PATCH] Portability by avoiding PATH_MAX

Svante Signell svante.signell at gmail.com
Thu May 8 13:55:58 CEST 2014

On Thu, 2014-05-08 at 10:18 +0100, Steven Hartland wrote:
> ----- Original Message ----- 
> From: "Svante Signell" <svante.signell at gmail.com>
> To: "Steven Hartland" <killing at multiplay.co.uk>
> Cc: "rrdtool dev list" <rrd-developers at lists.oetiker.ch>
> Sent: Thursday, May 08, 2014 6:18 AM
> Subject: Re: [rrd-developers] RFC: [PATCH] Portability by avoiding PATH_MAX

> >> So you just malloced some memory, assigned the pointer to it then freed
> >> the memory, so your now going to get a use after free and BOOM!
> > 
> > This is of course wrong, thanks! You see the reason for having tests
> > together with valgrind to find out these problems. Did you find more?
> Obviously this means that any calls to get_abs_path need reworking in the
> patch.

Yes, it might be so that the calling functions should do freeing memory
allocated by get_abs_path, as in the example code I sent. I'll submit
modified patch(es) in due time!

> I've not had time to go through it in detail but looks like the journal_dir
> / realpath changes also have issues.

You can see that there are still FIXMEs in the code, they have to be
removed when a proper solution/verification is at hand...

> Also there's some formatting issues with tabs instead of spacing.
>     Regards
>     Steve
> Really needs a proper review as there's lots of potential for issues with
> this.

Thanks, this is what I wanted, a review. And I'll submit to the Hurd
developers for review too before creating a pull request.

More information about the rrd-developers mailing list