]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Issue 195: Use more portable memcmp() here.
authorTim Kientzle <kientzle@gmail.com>
Sun, 20 Nov 2011 22:20:16 +0000 (17:20 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sun, 20 Nov 2011 22:20:16 +0000 (17:20 -0500)
SVN-Revision: 3813

libarchive/archive_read_support_format_ar.c

index ddb0e0a86a253a76d643af242cca21264bc8dc5e..772354057847c3c079c907a882eb9f25575291cf 100644 (file)
@@ -159,7 +159,7 @@ archive_read_format_ar_bid(struct archive_read *a)
         */
        if ((h = __archive_read_ahead(a, 8, NULL)) == NULL)
                return (-1);
-       if (strncmp((const char*)h, "!<arch>\n", 8) == 0) {
+       if (memcmp(h, "!<arch>\n", 8) == 0) {
                return (64);
        }
        return (-1);