diff --git a/src/detect.c b/src/detect.c index ad0af28c8a..648c69ef7e 100644 --- a/src/detect.c +++ b/src/detect.c @@ -4902,8 +4902,8 @@ static inline void SigMultilinePrint(int i, char *prefix) void SigTableList(const char *keyword) { size_t size = sizeof(sigmatch_table) / sizeof(SigTableElmt); - size_t i; + char *proto_name; if (keyword == NULL) { printf("=====Supported keywords=====\n"); @@ -4928,8 +4928,8 @@ void SigTableList(const char *keyword) printf("%s", sigmatch_table[i].desc); } /* Build feature */ - printf(";%s;", - AppLayerGetProtoName(sigmatch_table[i].alproto)); + proto_name = AppLayerGetProtoName(sigmatch_table[i].alproto); + printf(";%s;", proto_name ? proto_name : "Unset"); PrintFeatureList(sigmatch_table[i].flags, ':'); printf(";"); if (sigmatch_table[i].url) {