diff options
Diffstat (limited to 'users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp')
-rw-r--r-- | users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp b/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp new file mode 100644 index 000000000000..ee0ab4ab4117 --- /dev/null +++ b/users/tazjin/presentations/tvix-eval-2023/cppnix-example-smuggling.cpp @@ -0,0 +1,12 @@ +struct Env { + Value * values[0]; + // ... some more fields +}; + +// .... + +if (env->type == Env::HasWithExpr) { + Value * v = allocValue(); + evalAttrs(*env->up, (Expr *) env->values[0], *v, noPos, "<borked>"); + // ... +} |