mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 15:54:56 +00:00
dpkg: fix use-after-free (bug 939)
This commit is contained in:
parent
55a994055f
commit
aecabffb8b
@ -304,16 +304,13 @@ static int version_compare(const unsigned int ver1, const unsigned int ver2)
|
|||||||
deb_ver2++;
|
deb_ver2++;
|
||||||
}
|
}
|
||||||
result = version_compare_part(upstream_ver1, upstream_ver2);
|
result = version_compare_part(upstream_ver1, upstream_ver2);
|
||||||
|
if (!result)
|
||||||
|
/* Compare debian versions */
|
||||||
|
result = version_compare_part(deb_ver1, deb_ver2);
|
||||||
|
|
||||||
free(upstream_ver1);
|
free(upstream_ver1);
|
||||||
free(upstream_ver2);
|
free(upstream_ver2);
|
||||||
|
return result;
|
||||||
if (result != 0) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Compare debian versions */
|
|
||||||
return version_compare_part(deb_ver1, deb_ver2);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int test_version(const unsigned int version1, const unsigned int version2, const unsigned int operator)
|
static int test_version(const unsigned int version1, const unsigned int version2, const unsigned int operator)
|
||||||
|
Loading…
Reference in New Issue
Block a user