fix sz < 0
This commit is contained in:
parent
4fc28b25d3
commit
6f59ae3421
@ -1,6 +1,6 @@
|
||||
Name: libtar
|
||||
Version: 1.2.20
|
||||
Release: 21
|
||||
Release: 22
|
||||
Summary: Library for manipulating tar files from within C programs.
|
||||
License: BSD
|
||||
URL: http://repo.or.cz/libtar.git
|
||||
@ -71,6 +71,9 @@ rm $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
%{_mandir}/man3/*.3*
|
||||
|
||||
%changelog
|
||||
* Sat May 07 2022 shixuantong <shixuantong@h-partners.com> - 1.2.20-22
|
||||
- fix sz < 0
|
||||
|
||||
* Wed Apr 06 2022 shixuantong <shixuantong@h-partners.com> - 1.2.20-21
|
||||
- Ensure that sz is greater than 0.
|
||||
|
||||
|
||||
@ -15,7 +15,7 @@ index 092bc28..80b41ac 100644
|
||||
if (TH_ISLONGLINK(t))
|
||||
{
|
||||
sz = th_get_size(t);
|
||||
+ if (sz <= 0)
|
||||
+ if ((int)sz <= 0)
|
||||
+ {
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
@ -27,7 +27,7 @@ index 092bc28..80b41ac 100644
|
||||
if (TH_ISLONGNAME(t))
|
||||
{
|
||||
sz = th_get_size(t);
|
||||
+ if (sz <= 0)
|
||||
+ if ((int)sz <= 0)
|
||||
+ {
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user