]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Error check ret before calling copy_seek_stat 2825/head
authorAZero13 <gfunni234@gmail.com>
Fri, 26 Dec 2025 18:29:14 +0000 (13:29 -0500)
committerGitHub <noreply@github.com>
Fri, 26 Dec 2025 18:29:14 +0000 (13:29 -0500)
libarchive/archive_windows.c

index e55f995c77023bfaa58bf26746536d81decf292f..8e368e3284c9b5102ffd29154c9d82721f8801e5 100644 (file)
@@ -747,7 +747,8 @@ __la_seek_fstat(int fd, la_seek_stat_t *st)
        int ret;
 
        ret = __hstat((HANDLE)_get_osfhandle(fd), &u);
-       copy_seek_stat(st, &u);
+       if (ret >= 0)
+               copy_seek_stat(st, &u);
        return (ret);
 }