artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb6d9f7
)
Prevent tuples to be used as map key, associative array is what we want.
author
mpi
<mpi@openbsd.org>
Wed, 7 Feb 2024 19:07:42 +0000
(19:07 +0000)
committer
mpi
<mpi@openbsd.org>
Wed, 7 Feb 2024 19:07:42 +0000
(19:07 +0000)
usr.sbin/btrace/bt_parse.y
patch
|
blob
|
history
diff --git
a/usr.sbin/btrace/bt_parse.y
b/usr.sbin/btrace/bt_parse.y
index
b378b89
..
b9feb00
100644
(file)
--- a/
usr.sbin/btrace/bt_parse.y
+++ b/
usr.sbin/btrace/bt_parse.y
@@
-1,4
+1,4
@@
-/* $OpenBSD: bt_parse.y,v 1.5
7 2024/01/16 14:35:56 claudio Exp $
*/
+/* $OpenBSD: bt_parse.y,v 1.5
8 2024/02/07 19:07:42 mpi Exp $
*/
/*
* Copyright (c) 2019-2023 Martin Pieuchot <mpi@openbsd.org>
@@
-611,6
+611,9
@@
bm_insert(const char *mname, struct bt_arg *mkey, struct bt_arg *mval)
{
struct bt_arg *ba;
+ if (mkey->ba_type == B_AT_TUPLE)
+ yyerror("tuple cannot be used as map key");
+
ba = ba_new(bg_get(mname), B_AT_MAP);
ba->ba_key = mkey;