aboutsummaryrefslogtreecommitdiff
path: root/io/tst-getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/tst-getcwd.c')
-rw-r--r--io/tst-getcwd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/io/tst-getcwd.c b/io/tst-getcwd.c
index 3dac2fb..4b5bc62 100644
--- a/io/tst-getcwd.c
+++ b/io/tst-getcwd.c
@@ -120,12 +120,20 @@ getcwd (NULL, sbs) = \"%s\", getcwd (thepath, sizeof thepath) = \"%s\"\n",
free (bufs[2]);
}
+ memset (thepath, '\xfe', sizeof (thepath));
if (getcwd (thepath, len) != NULL)
{
puts ("getcwd (thepath, len) didn't failed");
return 1;
}
+ for (i = len; i < sizeof thepath; ++i)
+ if (thepath[i] != '\xfe')
+ {
+ puts ("thepath[i] != '\xfe'");
+ return 1;
+ }
+
/* Now test handling of correctly sized buffers. */
bufs[0] = getcwd (NULL, len + 1);
if (bufs[0] == NULL)