]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Fix out of bounds read in Windows symlink support 1786/head
authorErik Olofsson <erik@olofsson.info>
Thu, 6 Oct 2022 11:13:20 +0000 (13:13 +0200)
committerErik Olofsson <erik@olofsson.info>
Thu, 6 Oct 2022 11:22:20 +0000 (13:22 +0200)
libarchive/archive_write_disk_windows.c

index c949bf9c3757f7227dfda9a27859b8f461054ecc..5474de16b32a3f3d01f4701a1081bd6284b33a56 100644 (file)
@@ -2155,6 +2155,8 @@ check_symlinks(struct archive_write_disk *a)
                                return (ARCHIVE_FAILED);
                        }
                }
+               if (!c)
+                       break;
                pn[0] = c;
                pn++;
        }