Remove yet more fixed-length buffers (and their overruns).

Bug: 20317724
Change-Id: If137fc96f5f23576ccecd388ac87afefa47337c6
diff --git a/adb/adb_utils.cpp b/adb/adb_utils.cpp
index 5a6ac33..b515f59 100644
--- a/adb/adb_utils.cpp
+++ b/adb/adb_utils.cpp
@@ -16,10 +16,18 @@
 
 #include "adb_utils.h"
 
+#include <stdlib.h>
 #include <sys/stat.h>
 #include <sys/types.h>
 #include <unistd.h>
 
+bool getcwd(std::string* s) {
+  char* cwd = getcwd(nullptr, 0);
+  if (cwd != nullptr) *s = cwd;
+  free(cwd);
+  return (cwd != nullptr);
+}
+
 bool directory_exists(const std::string& path) {
   struct stat sb;
   return lstat(path.c_str(), &sb) != -1 && S_ISDIR(sb.st_mode);