1 #include "node_revert.h"
7 unsigned int reverted = 0;
9 const char* RevertMessage(const unsigned int cve) {
10 #define V(code, label, msg) case REVERT_ ## code: return label ": " msg;
19 void Revert(const unsigned int cve) {
21 printf("SECURITY WARNING: Reverting %s\n", RevertMessage(cve));
24 void Revert(const char* cve) {
25 #define V(code, label, _) \
27 if (strcmp(cve, label) == 0) { \
28 Revert(REVERT_ ## code); \
34 printf("Error: Attempt to revert an unknown CVE [%s]\n", cve);
38 bool IsReverted(const unsigned int cve) {
39 return reverted & (1 << cve);
42 bool IsReverted(const char * cve) {
43 #define V(code, label, _) \
45 if (strcmp(cve, label) == 0) \
46 return IsReverted(REVERT_ ## code); \