219cf7
diff --git a/rpm2cpio.c b/rpm2cpio.c
219cf7
index 89ebdfa..ae999ff 100644
219cf7
--- a/rpm2cpio.c
219cf7
+++ b/rpm2cpio.c
219cf7
@@ -84,7 +84,12 @@ int main(int argc, char *argv[])
219cf7
 	exit(EXIT_FAILURE);
219cf7
     }
219cf7
 
219cf7
-    rc = (ufdCopy(gzdi, fdo) == payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
219cf7
+    /*
219cf7
+     * XXX HACK for #1142949: should be equality test, but archive size
219cf7
+     * short by cpio trailer size in packages built with rpm 4.12.0
219cf7
+     * and its pre-releases.
219cf7
+     */
219cf7
+    rc = (ufdCopy(gzdi, fdo) >= payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
219cf7
 
219cf7
     Fclose(fdo);
219cf7