aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2006-07-28 12:00:00 +0000
committerMark Hatle <mark.hatle@windriver.com>2010-07-22 15:47:48 -0500
commitd68890e84040cca48d3c8eaa38fbdaeba20c4f5a (patch)
tree50e0a2ead0f5fb1ec09da8e79c6863b64c7e17da
parent687632e297dbf5ff76743fe31132252a3bbefa41 (diff)
downloadprelink-cross-d68890e84040cca48d3c8eaa38fbdaeba20c4f5a.tar.gz
prelink-cross-d68890e84040cca48d3c8eaa38fbdaeba20c4f5a.tar.bz2
prelink-cross-d68890e84040cca48d3c8eaa38fbdaeba20c4f5a.zip
Import file: prelink-cache-sort-crash-rh197451.patch
* Fri Jul 28 2006 Alexandre Oliva <aoliva@redhat.com> 0.3.9-2 - Avoid SEGFAULT when sorting cache entries (#197451) Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
-rw-r--r--ChangeLog.cross4
-rw-r--r--src/cache.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog.cross b/ChangeLog.cross
index 41f5ca8..9cd2dcc 100644
--- a/ChangeLog.cross
+++ b/ChangeLog.cross
@@ -1,3 +1,7 @@
+2006-07-28 Alexandre Oliva <aoliva@redhat.com>
+
+ * src/cache.c: Avoid SEGFAULT when sorting cache entries (#197451)
+
2006-07-21 MontaVista Software, Inc.
* prelink.c: add PRELINK_TIMESTAMP support
diff --git a/src/cache.c b/src/cache.c
index 476d83d..b677e22 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -336,8 +336,8 @@ deps_cmp (const void *A, const void *B)
struct prelink_entry *a = * (struct prelink_entry **) A;
struct prelink_entry *b = * (struct prelink_entry **) B;
- if (a == NULL && b != NULL)
- return 1;
+ if (a == NULL)
+ return (b != NULL);
if (a != NULL && b == NULL)
return -1;