Index: sysdeps/nacl/sysdep.h |
diff --git a/sysdeps/nacl/sysdep.h b/sysdeps/nacl/sysdep.h |
index 2e2b8b09bd908bccc50e9d42a2845249896d1a2c..cc47fab815036662c59b6146ec83302045931db9 100644 |
--- a/sysdeps/nacl/sysdep.h |
+++ b/sysdeps/nacl/sysdep.h |
@@ -598,8 +598,8 @@ INTERNAL_SYSCALL_getcwd_2 (int *err, char *buf, size_t size) |
if (*err) { |
return 0; |
} |
- for (len = 0; len < size && buf[len] != '\0'; ++len); |
- return len; |
+ for (len = 0; buf[len] != '\0'; ++len); |
Roland McGrath
2014/12/08 20:56:48
Why is it safe to presume it's terminated and not
Sam Clegg
2014/12/08 21:10:29
Because the __nacl_irt_getcwd will fail if it coul
Sam Clegg
2014/12/08 22:38:39
Ok. Done. Although in the case when __nacl_irt_ge
|
+ return len + 1; |
} |
__extern_always_inline gid_t |