Revision: 75409
          http://sourceforge.net/p/brlcad/code/75409
Author:   starseeker
Date:     2020-04-15 18:09:57 +0000 (Wed, 15 Apr 2020)
Log Message:
-----------
right, regress-repository doesn't like strncpy

Modified Paths:
--------------
    brlcad/trunk/src/libbu/tests/dylib/plugin_1.cpp
    brlcad/trunk/src/libbu/tests/dylib/plugin_2.cpp

Modified: brlcad/trunk/src/libbu/tests/dylib/plugin_1.cpp
===================================================================
--- brlcad/trunk/src/libbu/tests/dylib/plugin_1.cpp     2020-04-15 11:49:49 UTC 
(rev 75408)
+++ brlcad/trunk/src/libbu/tests/dylib/plugin_1.cpp     2020-04-15 18:09:57 UTC 
(rev 75409)
@@ -16,6 +16,7 @@
 #include <string>
 #include <string.h>
 
+#include "bu/str.h"
 #include "./dylib.h"
 
 extern "C" int
@@ -36,7 +37,7 @@
     }
 
     // Copy the result in to the provided buffer and null terminate
-    strncpy((*result), sout.c_str(), rlen - 1);
+    bu_strlcpy((*result), sout.c_str(), rlen - 1);
     size_t npos = ((size_t)rlen < sout.length()) ? rlen - 1 : sout.length();
     (*result)[npos] = '\0';
 

Modified: brlcad/trunk/src/libbu/tests/dylib/plugin_2.cpp
===================================================================
--- brlcad/trunk/src/libbu/tests/dylib/plugin_2.cpp     2020-04-15 11:49:49 UTC 
(rev 75408)
+++ brlcad/trunk/src/libbu/tests/dylib/plugin_2.cpp     2020-04-15 18:09:57 UTC 
(rev 75409)
@@ -16,6 +16,7 @@
 #include <string>
 #include <string.h>
 
+#include "bu/str.h"
 #include "./dylib.h"
 
 extern "C" int
@@ -36,7 +37,7 @@
     }
 
     // Copy the result in to the provided buffer and null terminate
-    strncpy((*result), sout.c_str(), rlen - 1);
+    bu_strlcpy((*result), sout.c_str(), rlen - 1);
     size_t npos = ((size_t)rlen < sout.length()) ? rlen - 1 : sout.length();
     (*result)[npos] = '\0';
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to