[LTP] [PATCH 1/4] getcwd01.c: cleanup && convert to new API
Cyril Hrubis
chrubis@suse.cz
Tue Jan 17 12:43:31 CET 2017
Hi!
> I'm not sure if the newly added check for ERANGE is good idea, since
> depending on ordering of the checks in kernel it may either reutrn
> ERANGE, if size is checked first, or EFAULT if the buffer pointer is
> checked first. It may start to fail for no good reason if the order of
> kernel chesk ends up reversed.
And looks like glibc has non-standard extension to allocate the buffer
if NULL pointer is passed. The we should ifdef the case with
#ifdef __GLIBC__
#endif
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list