am ff219e57: am 6435d27f: Merge "bionic: fix NULL parameter failure in getcwd()"
* commit 'ff219e57c0ffe5ac2816f79677ce4f1afa677277': bionic: fix NULL parameter failure in getcwd()
This commit is contained in:
commit
8266cf94d3
@ -26,10 +26,15 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
extern int __getcwd(char * buf, size_t size);
|
||||
|
||||
char *getcwd(char *buf, size_t size)
|
||||
{
|
||||
if (buf == NULL || size == 0) {
|
||||
errno = EINVAL;
|
||||
return NULL;
|
||||
}
|
||||
return ( __getcwd(buf, size) < 0 ) ? NULL : buf;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user