1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00
samba-mirror/testdata/source-chars-bad.c

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
481 B
C
Raw Normal View History

/*
* "Trojan Source" CVE-2021-42574 test.
*
* Based on an example from https://lwn.net/Articles/874951/
*/
#include <stdio.h>
int main(int argc, char *argv[])
{
int isAdmin = 0;
#if 0
/* This is what is really there. */
/*«RLO» } «LRI»if (isAdmin)«PDI» «LRI» begin admins only */
puts("hello admin");
/* end admin only «RLO» { «LRI»*/
#else
/* } if (isAdmin) begin admins only */
puts("hello admin");
/* end admin only { */
#endif
}