diff --git a/unix/tx/TXButton.h b/unix/tx/TXButton.h
index b747279..59a8430 100644
--- a/unix/tx/TXButton.h
+++ b/unix/tx/TXButton.h
@@ -59,7 +59,7 @@
 
   // setText() changes the text in the button.
   void setText(const char* text_) {
-    text.buf = rfb::strDup(text_);
+    text.buf = safe_strdup(text_);
     int textWidth = XTextWidth(defaultFS, text.buf, strlen(text.buf));
     int textHeight = (defaultFS->ascent + defaultFS->descent);
     int newWidth = __rfbmax(width(), textWidth + xPad*2 + bevel*2);
diff --git a/unix/tx/TXLabel.h b/unix/tx/TXLabel.h
index 3d5200d..ebb8403 100644
--- a/unix/tx/TXLabel.h
+++ b/unix/tx/TXLabel.h
@@ -47,7 +47,7 @@
 
   // setText() changes the text in the label.
   void setText(const char* text_) {
-    text.buf = rfb::strDup(text_);
+    text.buf = safe_strdup(text_);
     lines = 0;
     int lineStart = 0;
     int textWidth = 0;
diff --git a/unix/tx/TXMenu.cxx b/unix/tx/TXMenu.cxx
index 92712f5..df57daf 100644
--- a/unix/tx/TXMenu.cxx
+++ b/unix/tx/TXMenu.cxx
@@ -56,7 +56,7 @@
 void TXMenu::addEntry(const char* text_, long id_)
 {
   assert(nEntries < maxEntries);
-  text[nEntries] = rfb::strDup(text_);
+  text[nEntries] = safe_strdup(text_);
   checked[nEntries] = false;
   id[nEntries++] = id_;
   int tw = 0;
diff --git a/unix/tx/TXWindow.cxx b/unix/tx/TXWindow.cxx
index 2b535df..1b695e5 100644
--- a/unix/tx/TXWindow.cxx
+++ b/unix/tx/TXWindow.cxx
@@ -93,7 +93,7 @@
   static char tickBits[] = { 0x80, 0xc0, 0xe2, 0x76, 0x3e, 0x1c, 0x08, 0x00};
   tick = XCreateBitmapFromData(dpy, DefaultRootWindow(dpy), tickBits,
                                tickSize, tickSize);
-  defaultWindowClass = rfb::strDup(defaultWindowClass_);
+  defaultWindowClass = safe_strdup(defaultWindowClass_);
 }
 
 void TXWindow::handleXEvents(Display* dpy)
diff --git a/unix/vncviewer/CConn.cxx b/unix/vncviewer/CConn.cxx
index 8231f4c..efc3c33 100644
--- a/unix/vncviewer/CConn.cxx
+++ b/unix/vncviewer/CConn.cxx
@@ -221,8 +221,8 @@
   PasswdDialog dlg(dpy, title.buf, !user);
   if (!dlg.show()) throw rfb::Exception("Authentication cancelled");
   if (user)
-    *user = strDup(dlg.userEntry.getText());
-  *password = strDup(dlg.passwdEntry.getText());
+    *user = safe_strdup(dlg.userEntry.getText());
+  *password = safe_strdup(dlg.passwdEntry.getText());
 }
 
 
diff --git a/unix/vncviewer/vncviewer.cxx b/unix/vncviewer/vncviewer.cxx
index 4a47788..203df9a 100644
--- a/unix/vncviewer/vncviewer.cxx
+++ b/unix/vncviewer/vncviewer.cxx
@@ -218,7 +218,7 @@
   if (**vncServerName != '\0')
     *remoteHost = *vncServerName;
 
-  *gatewayHost = strDup (via.getValueStr ());
+  *gatewayHost = safe_strdup (via.getValueStr ());
   *vncServerName = new char[50];
   sprintf (*vncServerName, "localhost::%d", localPort);
 }
diff --git a/unix/x0vncserver/x0vncserver.cxx b/unix/x0vncserver/x0vncserver.cxx
index ec2fd76..3e555ce 100644
--- a/unix/x0vncserver/x0vncserver.cxx
+++ b/unix/x0vncserver/x0vncserver.cxx
@@ -101,7 +101,7 @@
                                                    const char* userName,
                                                    char** reason) {
     if (queryConnectSock) {
-      *reason = strDup("Another connection is currently being queried.");
+      *reason = safe_strdup("Another connection is currently being queried.");
       return VNCServerST::REJECT;
     }
     if (!userName) userName = "(anonymous)";
diff --git a/unix/xserver/hw/vnc/XserverDesktop.cc b/unix/xserver/hw/vnc/XserverDesktop.cc
index 66c92d2..e8e4949 100644
--- a/unix/xserver/hw/vnc/XserverDesktop.cc
+++ b/unix/xserver/hw/vnc/XserverDesktop.cc
@@ -219,7 +219,7 @@
 char* XserverDesktop::substitute(const char* varName)
 {
   if (strcmp(varName, "$$") == 0) {
-    return rfb::strDup("$");
+    return safe_strdup("$");
   }
   if (strcmp(varName, "$PORT") == 0) {
     char* str = new char[10];
@@ -247,7 +247,7 @@
     return str;
   }
   if (strcmp(varName, "$DESKTOP") == 0) {
-    return rfb::strDup(server->getName());
+    return safe_strdup(server->getName());
   }
   if (strcmp(varName, "$DISPLAY") == 0) {
     struct utsname uts;
@@ -260,7 +260,7 @@
   }
   if (strcmp(varName, "$USER") == 0) {
     struct passwd* user = getpwuid(getuid());
-    return rfb::strDup(user ? user->pw_name : "?");
+    return safe_strdup(user ? user->pw_name : "?");
   }
   return 0;
 }
@@ -270,13 +270,13 @@
                                 const char* userName,
                                 char** reason) {
   if (queryConnectId) {
-    *reason = strDup("Another connection is currently being queried.");
+    *reason = safe_strdup("Another connection is currently being queried.");
     return rfb::VNCServerST::REJECT;
   }
   queryConnectAddress.replaceBuf(sock->getPeerAddress());
   if (!userName)
     userName = "(anonymous)";
-  queryConnectUsername.replaceBuf(strDup(userName));
+  queryConnectUsername.replaceBuf(safe_strdup(userName));
   queryConnectId = sock;
   vncQueryConnect(this, sock);
   return rfb::VNCServerST::PENDING;
