This fixes a race condition (revealed by my other check-in r4067) in the
[coreboot.git] / util / romtool / tools / rom-mkpayload.c
index 54fde24cec73862ba2e0670c0242e30dc8a0c583..190e53a9c8a691f1cb854e3b99d8c1c354dc8662 100644 (file)
@@ -163,7 +163,7 @@ int parse_elf(unsigned char *input, unsigned char **output, int algo,
                /* If the compressed section is larger, then use the
                   original stuff */
 
-               if (len > phdr[i].p_filesz) {
+               if ((unsigned int)len > phdr[i].p_filesz) {
                        segs[segments].compression = 0;
                        segs[segments].len = htonl(phdr[i].p_filesz);