Re: hping3: fix for FTBFS
Guillaume Delacour, le Thu 04 Sep 2014 11:01:28 +0200, a écrit :
> I've tested this and the asprintf() call is not correct
Ah, sure, the whole point was to drop the PATH_MAX use :)
> (and i've just added a return control on the call):
>
> - char rcfile[PATH_MAX];
> - snprintf(rcfile, PATH_MAX, "%s/.hpingrc", home);
> - rcfile[PATH_MAX-1] = '\0';
> + char *rcfile;
> + if (asprintf(&rcfile, "%s/.hpingrc", home) < 0)
> + return NULL;
See the prototype of the function: it returns an int, not a poitner. And
see above, it returns TCL_ERROR on error.
> Tcl_EvalFile(interp, rcfile);
> Tcl_ResetResult(interp);
> + free(rcfile);
>
> Thanks for your time.
>
> >
> > Samuel
>
> --
> Guillaume Delacour <gui@iroqwa.org>
--
Samuel
<s> cool, j'ai un rapport a rendre pour le 31 decembre a minuit...
-+- #ens-mim - bonne année ! -+-
Reply to: