Index: chrome/browser/gtk/options/advanced_contents_gtk.cc |
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc |
index c50e77cf2ed7f3007628d486596ec3d8b2260b65..891fd71f579605be06c5932f0729046e18526800 100644 |
--- a/chrome/browser/gtk/options/advanced_contents_gtk.cc |
+++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc |
@@ -411,8 +411,10 @@ void NetworkSection::OnChangeProxiesButtonClicked(GtkButton *button, |
bool NetworkSection::SearchPATH(ProxyConfigCommand* commands, size_t ncommands, |
size_t* index) { |
const char* path = getenv("PATH"); |
+ if (!path) |
+ return false; |
FilePath bin_path; |
- StringTokenizer tk(path, ":"); |
+ CStringTokenizer tk(path, path + strlen(path), ":"); |
// Search $PATH looking for the commands in order. |
while (tk.GetNext()) { |
for (size_t i = 0; i < ncommands; i++) { |