projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
frexp, frexp-nolibm: Move AC_LIBOBJ invocations to module description.
[pspp]
/
lib
/
getcwd-lgpl.c
diff --git
a/lib/getcwd-lgpl.c
b/lib/getcwd-lgpl.c
index 53c5562357ca2138c5648e0e52c5abe5758b0330..27614228a0dafd13005453055035145583a9468e 100644
(file)
--- a/
lib/getcwd-lgpl.c
+++ b/
lib/getcwd-lgpl.c
@@
-45,7
+45,14
@@
rpl_getcwd (char *buf, size_t size)
/* Handle single size operations. */
if (buf)
- return getcwd (buf, size);
+ {
+ if (!size)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+ return getcwd (buf, size);
+ }
if (size)
{