]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Correct a length argument to invalid_mbs().
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 25 Apr 2011 10:44:29 +0000 (06:44 -0400)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Mon, 25 Apr 2011 10:44:29 +0000 (06:44 -0400)
SVN-Revision: 3271

libarchive/archive_string.c

index da767808d4dd2b321263ab1d329ef0ac0419c02f..fb2118dd08b41f0ef1c8b8ab2adee39eacb13a77 100644 (file)
@@ -1646,7 +1646,7 @@ best_effort_strncat_in_locale(struct archive_string *as, const void *_p,
 
        archive_string_append(as, _p, length);
        /* If charset is NULL, just make a copy, so return 0 as success. */
-       if (sc == NULL || (sc->same && invalid_mbs(_p, n, sc) == 0))
+       if (sc == NULL || (sc->same && invalid_mbs(_p, length, sc) == 0))
                return (0);
        if (is_all_ascii_code(as))
                return (0);