Ignore case when translating a string to an inforec type
authorJennifer Richards <jennifer@painless-security.com>
Tue, 6 Jun 2017 20:33:40 +0000 (16:33 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Tue, 6 Jun 2017 20:33:40 +0000 (16:33 -0400)
trp/trp_upd.c

index 98898ff..9e34dd0 100644 (file)
@@ -32,6 +32,7 @@
  *
  */
 
+#include <strings.h>
 #include <jansson.h>
 #include <talloc.h>
 
@@ -80,7 +81,7 @@ TRP_INFOREC_TYPE trp_inforec_type_from_string(const char *s)
   struct trp_inforec_type_entry *entry=trp_inforec_type_table;
 
   while ((entry->type != TRP_INFOREC_TYPE_UNKNOWN)
-        && (strcmp(s, entry->name)!=0)) {
+        && (strcasecmp(s, entry->name)!=0)) {
     entry++;
   }
   return entry->type;