You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In bm_utils.c we have, in the tbl_open() function, the code:
if (*tdefs[tbl].name == PATH_SEP)
strcpy(fullpath, tdefs[tbl].name);
but how can a table name begin with a path separator? Shouldn't we disable this? e.g. apply something like the following: ?
diff --git a/src/bm_utils.c b/src/bm_utils.c
index a7e08c8..4cd57ca 100644
--- a/src/bm_utils.c
+++ b/src/bm_utils.c
@@ -367,9 +367,12 @@ tbl_open(int tbl, char *mode)
int retcode;
- if (*tdefs[tbl].name == PATH_SEP)
+/* This is not possible - no table names begin with a path separator
+
+ if (*tdefs[tbl].name == PATH_SEP)
strcpy(fullpath, tdefs[tbl].name);
else
+ */
sprintf(fullpath, "%s%c%s",
env_config(PATH_TAG, PATH_DFLT), PATH_SEP, tdefs[tbl].name);
The text was updated successfully, but these errors were encountered:
In
bm_utils.c
we have, in thetbl_open()
function, the code:but how can a table name begin with a path separator? Shouldn't we disable this? e.g. apply something like the following: ?
The text was updated successfully, but these errors were encountered: