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