diff --git a/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/test.cpp b/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/test.cpp index f42d6835aa7..b864336699d 100644 --- a/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/test.cpp +++ b/cpp/ql/test/query-tests/Likely Bugs/Format/NonConstantFormat/test.cpp @@ -156,3 +156,10 @@ void fmt_via_strcpy(char *data) { strcpy(data, "some string"); printf(data); // BAD } + +void fmt_with_assignment() { + const char *x, *y; + + x = y = "a"; + printf(y); +}