Revision: 76295
http://sourceforge.net/p/brlcad/code/76295
Author: brlcad
Date: 2020-07-10 04:08:52 +0000 (Fri, 10 Jul 2020)
Log Message:
-----------
don't allow empty object names to be added to directories
Modified Paths:
--------------
brlcad/trunk/src/librt/db_lookup.c
Modified: brlcad/trunk/src/librt/db_lookup.c
===================================================================
--- brlcad/trunk/src/librt/db_lookup.c 2020-07-10 03:34:33 UTC (rev 76294)
+++ brlcad/trunk/src/librt/db_lookup.c 2020-07-10 04:08:52 UTC (rev 76295)
@@ -244,7 +244,13 @@
(void *)dbip, name, (intmax_t)laddr, len, flags, ptr);
}
- if ((tmp_ptr = strchr(name, '/')) != NULL) {
+ if (BU_STR_EMPTY(name)) {
+ bu_log("db_diradd() object with empty name is illegal, ignored\n");
+ return RT_DIR_NULL;
+ }
+
+ tmp_ptr = strchr(name, '/');
+ if (tmp_ptr != NULL) {
/* if this is a version 4 database and the offending char is beyond
NAMESIZE
* then it is not really a problem
*/
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