[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox-cvs
Subject:    svn commit: trunk/busybox/archival
From:       vda () busybox ! net (vda at busybox ! net)
Date:       2006-09-30 21:05:26
Message-ID: 20060930210526.276274859C () busybox ! net
[Download RAW message or body]

Author: vda
Date: 2006-09-30 14:05:25 -0700 (Sat, 30 Sep 2006)
New Revision: 16277

Log:
dpkg: fix use-after-free (bug 939)


Modified:
   trunk/busybox/archival/dpkg.c


Changeset:
Modified: trunk/busybox/archival/dpkg.c
===================================================================
--- trunk/busybox/archival/dpkg.c	2006-09-30 20:41:44 UTC (rev 16276)
+++ trunk/busybox/archival/dpkg.c	2006-09-30 21:05:25 UTC (rev 16277)
@@ -304,16 +304,13 @@
 		deb_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_ver2);
-
-	if (result != 0) {
-		return result;
-	}
-
-	/* Compare debian versions */
-	return version_compare_part(deb_ver1, deb_ver2);
+	return result;
 }
 
 static int test_version(const unsigned int version1, const unsigned int version2, \
const unsigned int operator)


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic