Don't segfault on unknown format specifiers
authorPanu Matilainen <pmatilai@redhat.com>
Thu, 18 Sep 2008 09:36:31 +0000 (12:36 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 18 Sep 2008 09:36:31 +0000 (12:36 +0300)
lib/headerfmt.c

index 1c05c89..2800d19 100644 (file)
@@ -256,7 +256,7 @@ bingo:
     if (stag->type != NULL)
        stag->fmt = rpmHeaderFormatFuncByName(stag->type);
 
-    return 0;
+    return stag->fmt ? 0 : 1;
 }
 
 /* forward ref */