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