]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix a comparison of file names in ISO images.
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 26 Feb 2012 03:16:53 +0000 (12:16 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 26 Feb 2012 07:01:31 +0000 (16:01 +0900)
libarchive/archive_write_set_format_iso9660.c

index f4a3b98e0aff2e8eb07cdf6c2f3be90214b8336a..3277803e6865c5f1f4e9891d7d0376ab3c6c8331 100644 (file)
@@ -6381,7 +6381,7 @@ isoent_cmp_iso9660_identifier(const struct isoent *p1, const struct isoent *p2)
                        if (0x20 != *s2++)
                                return (0x20
                                    - *(const unsigned char *)(s2 - 1));
-       } else if (p1->ext_len < p2->ext_len) {
+       } else if (p1->ext_len > p2->ext_len) {
                s1 += l;
                l = p1->ext_len - p2->ext_len;
                while (l--)
@@ -6469,7 +6469,7 @@ isoent_cmp_joliet_identifier(const struct isoent *p1, const struct isoent *p2)
                while (l--)
                        if (0 != *s2++)
                                return (- *(const unsigned char *)(s2 - 1));
-       } else if (p1->ext_len < p2->ext_len) {
+       } else if (p1->ext_len > p2->ext_len) {
                s1 += l;
                l = p1->ext_len - p2->ext_len;
                while (l--)